From 5683b4d5fc91dd40ec501cdf6acff39969f53835 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Mon, 27 Feb 2017 16:21:21 -0800 Subject: [PATCH] Disable the cache on the GrContext used for decoding images (flutter/engine#3451) Fixes https://github.com/flutter/flutter/issues/8429 --- engine/src/flutter/shell/common/platform_view.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/src/flutter/shell/common/platform_view.cc b/engine/src/flutter/shell/common/platform_view.cc index 98e4586cfb..12d974e562 100644 --- a/engine/src/flutter/shell/common/platform_view.cc +++ b/engine/src/flutter/shell/common/platform_view.cc @@ -177,6 +177,11 @@ void PlatformView::SetupResourceContextOnIOThreadPerform( reinterpret_cast(GrGLCreateNativeInterface()), options)); + // Do not cache textures created by the image decoder. These textures should + // be deleted when they are no longer referenced by an SkImage. + if (blink::ResourceContext::Get()) + blink::ResourceContext::Get()->setResourceCacheLimits(0, 0); + latch->Signal(); }