From b9f2bacea86ddae8c4e01a5ffa3ea1debb871042 Mon Sep 17 00:00:00 2001 From: liyuqian Date: Wed, 20 Nov 2019 16:36:23 -0800 Subject: [PATCH] Fix picture raster cache throttling (flutter/engine#13710) Previously, we're also counting the pictures that are already raster cached. This fixes https://github.com/flutter/flutter/issues/44252 and helps solving the GPU thread issue of https://github.com/flutter/flutter/issues/43083 https://github.com/flutter/flutter/pull/45050 is a performance test in the framework repo to reveal this bug. --- engine/src/flutter/flow/raster_cache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/flutter/flow/raster_cache.cc b/engine/src/flutter/flow/raster_cache.cc index 0a2e084c96..7854dac3fb 100644 --- a/engine/src/flutter/flow/raster_cache.cc +++ b/engine/src/flutter/flow/raster_cache.cc @@ -219,8 +219,8 @@ bool RasterCache::Prepare(GrContext* context, if (!entry.image.is_valid()) { entry.image = RasterizePicture(picture, context, transformation_matrix, dst_color_space, checkerboard_images_); + picture_cached_this_frame_++; } - picture_cached_this_frame_++; return true; }