[CP][Impeller] Fix text glitch when returning to foreground. (#163754)

Fixes https://github.com/flutter/flutter/issues/163730
Fixes https://github.com/flutter/flutter/issues/163452
This commit is contained in:
Jonah Williams 2025-02-20 12:46:07 -08:00 committed by GitHub
parent 703ef37a89
commit 7253c79e2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View File

@ -42,6 +42,7 @@ INTERNAL NOTE
- [flutter/163304](https://github.com/flutter/flutter/issues/163304) Fixes crash when using backdrop filter on GLES backend.
- [flutter/161334](https://github.com/flutter/flutter/issues/161334) Disable Vulkan on certain Xclipse GPU models.
- [flutter/163730](https://github.com/flutter/flutter/issues/163730) Fixes text rendering artifacts when returning application to foreground.
- [flutter/163429](https://github.com/flutter/flutter/issues/163429) Fixes jittery scrolling on iOS devices.
- [flutter/163236](https://github.com/flutter/flutter/pull/163236) Disable Vulkan on older Exynos SoC to work around Android HardwareBuffer import error.

View File

@ -417,13 +417,17 @@ TypographerContextSkia::CollectNewGlyphs(
size_t generation_id = atlas->GetAtlasGeneration();
intptr_t atlas_id = reinterpret_cast<intptr_t>(atlas.get());
for (const auto& frame : text_frames) {
auto [frame_generation_id, frame_atlas_id] =
frame->GetAtlasGenerationAndID();
if (atlas->IsValid() && frame->IsFrameComplete() &&
// TODO(jonahwilliams): re-enable glyph condition once
// https://github.com/flutter/flutter/issues/163730 is fixed
#if false
auto [frame_generation_id, frame_atlas_id] =
frame->GetAtlasGenerationAndID();
if (atlas->IsValid() && frame->IsFrameComplete() &&
frame_generation_id == generation_id && frame_atlas_id == atlas_id &&
!frame->GetFrameBounds(0).is_placeholder) {
continue;
}
#endif // false
frame->ClearFrameBounds();
frame->SetAtlasGeneration(generation_id, atlas_id);