[Impeller] Disable text cache. (#163906)

I forgot to make a master branch version of the cherry pick here:
https://github.com/flutter/flutter/pull/163754
This commit is contained in:
Jonah Williams 2025-02-24 08:26:01 -08:00 committed by GitHub
parent 9a13fd785f
commit 0102da95cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -417,6 +417,12 @@ TypographerContextSkia::CollectNewGlyphs(
size_t generation_id = atlas->GetAtlasGeneration();
intptr_t atlas_id = reinterpret_cast<intptr_t>(atlas.get());
for (const auto& frame : text_frames) {
// TODO(jonahwilliams): determine how to re-enable this. See
// https://github.com/flutter/flutter/issues/163730 for example. This can
// happen when the Aiks/Typographer context are re-created, but the last
// DisplayList is re-used. The "atlas_id" check is not reliable, perhaps
// because it may end up with the same memory?
#if false
auto [frame_generation_id, frame_atlas_id] =
frame->GetAtlasGenerationAndID();
if (atlas->IsValid() && frame->IsFrameComplete() &&
@ -424,6 +430,7 @@ TypographerContextSkia::CollectNewGlyphs(
!frame->GetFrameBounds(0).is_placeholder) {
continue;
}
#endif // false
frame->ClearFrameBounds();
frame->SetAtlasGeneration(generation_id, atlas_id);