[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.
This commit is contained in:
Jonah Williams
2024-10-22 15:27:02 -07:00
committed by GitHub
parent 10f2a2ccd1
commit ba956aac92

View File

@@ -1283,6 +1283,7 @@ std::shared_ptr<Texture> DisplayListToTexture(
context.GetContentContext().GetTransientsBuffer().Reset();
}
context.GetContentContext().GetLazyGlyphAtlas()->ResetTextFrames();
context.GetContext()->DisposeThreadLocalCachedResources();
return target.GetRenderTargetTexture();
}