From 0f2f3754deb1c93bb17b619dc2b6b634f52dd898 Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Thu, 4 Nov 2021 11:29:22 -0700 Subject: [PATCH] [raster_cache] Increment access_count on Touch This is to maintain compatibility with the earlier behavior see: https://github.com/flutter/flutter/issues/93067 --- flow/raster_cache.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flow/raster_cache.cc b/flow/raster_cache.cc index 892bdf1a0f49a..5707afd7ff3da 100644 --- a/flow/raster_cache.cc +++ b/flow/raster_cache.cc @@ -324,6 +324,7 @@ void RasterCache::Touch(Layer* layer, const SkMatrix& ctm) { auto it = layer_cache_.find(cache_key); if (it != layer_cache_.end()) { it->second.used_this_frame = true; + it->second.access_count++; } } @@ -333,6 +334,7 @@ void RasterCache::Touch(SkPicture* picture, auto it = picture_cache_.find(cache_key); if (it != picture_cache_.end()) { it->second.used_this_frame = true; + it->second.access_count++; } } @@ -343,6 +345,7 @@ void RasterCache::Touch(DisplayList* display_list, auto it = display_list_cache_.find(cache_key); if (it != display_list_cache_.end()) { it->second.used_this_frame = true; + it->second.access_count++; } }