Repository navigation
[Impeller] fix position of cached single glyph text shadows - #191325
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors text rendering tests and optimizations in Impeller. It introduces a helper function RePositionTextFrame to shift text frames, updates MakeDefaultTextFrame to support custom text strings, adds a new unit test for single-glyph text with shadows, and simplifies fingerprint generation in Canvas::AttemptBlurredTextOptimization. Feedback suggests updating the original parameter in RePositionTextFrame to be a const reference to comply with the Google C++ Style Guide.
…gle-glyph-shadow-caching
|
This change points out that the font and "single_glyph" entries in the |
gaaclarke
left a comment
There was a problem hiding this comment.
lgtm! if any benchmarks regress we can reevaluate
Thoughts on simplifying the Key struct here or in a follow-on PR? I'm leaning towards a follow-on since this particular fix should be safe to CP if we need to, but trying to simplify the Key struct, even if it is fairly obvious, could introduce another bug... |
If we want to CP it, we would need to CP #190681 first, right? Is that what we want to do? |
Good point. I don't think this is fixable without #190681, though. The whole idea of the fix is that it makes the lookup key more specific than just the basic glyph id info. So, if we CP, we have to CP a bunch of the current stuff. |
|
I committed to the full fix with removing the redundant key elements. |
…gle-glyph-shadow-caching
b-luk
left a comment
There was a problem hiding this comment.
One cleanup comment about the unit test. Otherwise LGTM
Roll Flutter from c2437523d308 to 65c9a8dc60bc (195 revisions) flutter/flutter@c243752...65c9a8d 2026-08-22 [email protected] Roll ICU from d578f2e8b7bd to 8cc91d9b6ab9 (1 revision) (flutter/flutter#191542) 2026-08-22 [email protected] Roll Skia from 666a9b3d5cf0 to ad2106c0bb64 (3 revisions) (flutter/flutter#191527) 2026-08-22 [email protected] Roll Fuchsia Test Scripts from KaOq3EE4qJ9fnaaaK... to 0iCv10IlKfiilEBOU... (flutter/flutter#191524) 2026-08-22 [email protected] [flutter_tools] Add tests for negative lookahead regex in test runner and batch entrypoints (flutter/flutter#191438) 2026-08-22 [email protected] Roll Skia from 0c37868737fa to 666a9b3d5cf0 (2 revisions) (flutter/flutter#191518) 2026-08-21 [email protected] Revert "[input] Migrate fuchsia.ui.pointerinjector to TouchSource (#190855) (flutter/flutter#191509) 2026-08-21 [email protected] Fixes windows gallery benchmarks by forcing mobile layout (flutter/flutter#191507) 2026-08-21 [email protected] [flutter_tools] Restrict WebAssetServer source resolution to source map extensions (flutter/flutter#191501) 2026-08-21 [email protected] Roll Skia from f6900c5b8439 to 0c37868737fa (2 revisions) (flutter/flutter#191504) 2026-08-21 [email protected] Refactor `FlutterDevice.connect` and VM service discovery (flutter/flutter#191221) 2026-08-21 [email protected] [flutter_tools] Fix crash when migrating flow-style exclude lists in analysis_options.yaml (flutter/flutter#191269) 2026-08-21 [email protected] [rules] Add packages/flutter_tools/gradle/AGENTS.md rules (flutter/flutter#191486) 2026-08-21 [email protected] [flutter_tools] refactor CLI argument architecture with typed option descriptors and bundles (PoC) (flutter/flutter#191018) 2026-08-21 [email protected] tools: Extract Dart SDK to temp directory before moving to final location (flutter/flutter#191263) 2026-08-21 [email protected] [web] Move CanvasKit fragment shader classes to canvaskit/fragment_shader.dart (flutter/flutter#191451) 2026-08-21 [email protected] Roll Fuchsia Linux SDK from GCQlmt6h-esJsNubS... to ic6GjOSn-KN508XyK... (flutter/flutter#191485) 2026-08-21 [email protected] [Widget Preview] Isolate PageStorage scope in widget preview group expansion tile (flutter/flutter#191378) 2026-08-21 [email protected] [flutter_tools] Deprecate --build and --no-build flags on flutter run (flutter/flutter#191358) 2026-08-21 [email protected] Roll Skia from 70988bed1b3b to f6900c5b8439 (2 revisions) (flutter/flutter#191481) 2026-08-21 [email protected] Roll Packages from 1785501 to 252bb33 (6 revisions) (flutter/flutter#191480) 2026-08-21 [email protected] Roll Fuchsia Linux SDK from 20IJas24bZiNmCZTK... to GCQlmt6h-esJsNubS... (flutter/flutter#191415) 2026-08-21 [email protected] Roll Skia from 2ba6971bd0d1 to 70988bed1b3b (2 revisions) (flutter/flutter#191476) 2026-08-21 [email protected] Roll Skia from 1d5f72537ba6 to 2ba6971bd0d1 (2 revisions) (flutter/flutter#191473) 2026-08-21 [email protected] Roll Skia from 2c25efd2e369 to 1d5f72537ba6 (1 revision) (flutter/flutter#191472) 2026-08-21 [email protected] Roll Skia from 09b1b810850a to 2c25efd2e369 (9 revisions) (flutter/flutter#191470) 2026-08-21 [email protected] [Impeller] fix position of cached single glyph text shadows (flutter/flutter#191325) 2026-08-21 [email protected] Roll Skia from abdf8821f313 to 09b1b810850a (15 revisions) (flutter/flutter#191458) 2026-08-21 [email protected] Document that programmatic TextEditingController changes do not run input formatters (flutter/flutter#190166) 2026-08-21 [email protected] Adds new gallery benchmarks to windows (skia and impeller) (flutter/flutter#191454) 2026-08-21 [email protected] iOS: Deprecate FlutterEngine.isGpuDisabled (flutter/flutter#191393) 2026-08-21 [email protected] Revert: [web] Unskip decoration image lerp tests (flutter/flutter#191462) 2026-08-20 [email protected] android_hardware_smoke_test: Improve reliability (flutter/flutter#191374) 2026-08-20 [email protected] Don't size or offset the Android platform view before it is laid out (flutter/flutter#190895) 2026-08-20 [email protected] [iOS][add2app] Skip building SwiftPM plugins when generating CocoaPods artifacts (flutter/flutter#190736) 2026-08-20 [email protected] Optimize JSONMessageCodec UTF-8 conversion (flutter/flutter#190529) 2026-08-20 [email protected] [FML] Replace deprecated wstring_convert with Win32 APIs (flutter/flutter#191394) 2026-08-20 [email protected] SliverFillRemaining extends beyond viewport size when fillOverscroll is true (flutter/flutter#191236) 2026-08-20 [email protected] [flutter_tools] Update argParser usageLineLength when --wrap-column is passed (flutter/flutter#191264) 2026-08-20 [email protected] [flutter_tools] Fix UNC path resolution in depfile parsing on Windows (flutter/flutter#191265) 2026-08-20 [email protected] [web] Unskip decoration image lerp tests (flutter/flutter#191426) 2026-08-20 [email protected] Do not inject 'type' and 'method' into service extension responses (flutter/flutter#190946) 2026-08-20 [email protected] [flutter_tools] Fix crash in symbolize command on stream error (flutter/flutter#191273) 2026-08-20 [email protected] [flutter_tools] Prevent deletion of shared native asset hooks outputs as stale (flutter/flutter#191272) 2026-08-20 [email protected] [flutter_tools] Support package wildcard assets in app pubspec (flutter/flutter#191266) 2026-08-20 [email protected] Add SliverClipRect and SliverClipRRect (flutter/flutter#179003) 2026-08-20 [email protected] [flutter_tools] Implement Diagnostics extension slice and doctor integration (flutter/flutter#191162) ...
The cache key for single-glyph
TextFrameshadows did not include enough information to accurately resolve the operation with their cached shadows. This PR removes the special case for the single glyph case so allTextFrames will now be cached consistently and correctly.Fixes: #191161
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on [Discord].
If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.