summaryrefslogtreecommitdiffstats
path: root/chromium/cc/tiles/software_image_decode_cache.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-10-24 11:30:15 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-10-30 12:56:19 +0000
commit6036726eb981b6c4b42047513b9d3f4ac865daac (patch)
tree673593e70678e7789766d1f732eb51f613a2703b /chromium/cc/tiles/software_image_decode_cache.cc
parent466052c4e7c052268fd931888cd58961da94c586 (diff)
BASELINE: Update Chromium to 70.0.3538.78
Change-Id: Ie634710bf039e26c1957f4ae45e101bd4c434ae7 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/cc/tiles/software_image_decode_cache.cc')
-rw-r--r--chromium/cc/tiles/software_image_decode_cache.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/chromium/cc/tiles/software_image_decode_cache.cc b/chromium/cc/tiles/software_image_decode_cache.cc
index 05038746066..8fbb0bae81d 100644
--- a/chromium/cc/tiles/software_image_decode_cache.cc
+++ b/chromium/cc/tiles/software_image_decode_cache.cc
@@ -141,10 +141,12 @@ void RecordLockExistingCachedImageHistogram(TilePriority::PriorityBin bin,
SoftwareImageDecodeCache::SoftwareImageDecodeCache(
SkColorType color_type,
- size_t locked_memory_limit_bytes)
+ size_t locked_memory_limit_bytes,
+ PaintImage::GeneratorClientId generator_client_id)
: decoded_images_(ImageMRUCache::NO_AUTO_EVICT),
locked_images_budget_(locked_memory_limit_bytes),
color_type_(color_type),
+ generator_client_id_(generator_client_id),
max_items_in_cache_(kNormalMaxItemsInCacheForSoftware) {
// In certain cases, ThreadTaskRunnerHandle isn't set (Android Webview).
// Don't register a dump provider in these cases.
@@ -367,7 +369,8 @@ void SoftwareImageDecodeCache::DecodeImageIfNecessary(
// If we can use the original decode, we'll definitely need a decode.
if (key.type() == CacheKey::kOriginal) {
base::AutoUnlock release(lock_);
- local_cache_entry = Utils::DoDecodeImage(key, paint_image, color_type_);
+ local_cache_entry = Utils::DoDecodeImage(key, paint_image, color_type_,
+ generator_client_id_);
} else {
// Attempt to find a cached decode to generate a scaled/subrected decode
// from.
@@ -394,7 +397,8 @@ void SoftwareImageDecodeCache::DecodeImageIfNecessary(
DCHECK(!should_decode_to_scale || !key.is_nearest_neighbor());
if (should_decode_to_scale) {
base::AutoUnlock release(lock_);
- local_cache_entry = Utils::DoDecodeImage(key, paint_image, color_type_);
+ local_cache_entry = Utils::DoDecodeImage(key, paint_image, color_type_,
+ generator_client_id_);
}
// Couldn't decode to scale or find a cached candidate. Create the