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(); }