From ba956aac924192518298d9698f9e434d9a854db1 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Tue, 22 Oct 2024 15:27:02 -0700 Subject: [PATCH] [Impeller] flush thread local resources during toImage/toImageSync. (flutter/engine#56037) I suspect not flushing is related to occassionaly timeouts on flutter tester --enable impelller. because the flutter_tester never actually pumps a frame, it won't naturally flush these resources. It shouldn't be harmful to otherwise flush. --- engine/src/flutter/impeller/display_list/dl_dispatcher.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/src/flutter/impeller/display_list/dl_dispatcher.cc b/engine/src/flutter/impeller/display_list/dl_dispatcher.cc index c8a1bc6ac4..3c6f156368 100644 --- a/engine/src/flutter/impeller/display_list/dl_dispatcher.cc +++ b/engine/src/flutter/impeller/display_list/dl_dispatcher.cc @@ -1283,6 +1283,7 @@ std::shared_ptr DisplayListToTexture( context.GetContentContext().GetTransientsBuffer().Reset(); } context.GetContentContext().GetLazyGlyphAtlas()->ResetTextFrames(); + context.GetContext()->DisposeThreadLocalCachedResources(); return target.GetRenderTargetTexture(); }