From 0102da95cd20892565cde2dfa0963093877e6fe4 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Mon, 24 Feb 2025 08:26:01 -0800 Subject: [PATCH] [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 --- .../typographer/backends/skia/typographer_context_skia.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/engine/src/flutter/impeller/typographer/backends/skia/typographer_context_skia.cc b/engine/src/flutter/impeller/typographer/backends/skia/typographer_context_skia.cc index 8f005d00fc..25b8b7d9f3 100644 --- a/engine/src/flutter/impeller/typographer/backends/skia/typographer_context_skia.cc +++ b/engine/src/flutter/impeller/typographer/backends/skia/typographer_context_skia.cc @@ -417,6 +417,12 @@ TypographerContextSkia::CollectNewGlyphs( size_t generation_id = atlas->GetAtlasGeneration(); intptr_t atlas_id = reinterpret_cast(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);