-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] bulk update fresh glyph atlas. #54379
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. |
chinmaygarde
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I think a copy can be avoided.
|
|
||
| // Writing to a malloc'd buffer and then copying to the staging buffers | ||
| // benchmarks as substantially faster on a number of Android devices. | ||
| BufferView buffer_view = host_buffer.Emplace( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could reserve an arena in the host buffer itself and wrap that arena as an SkBitmap to reduce one copy. There is a HostBuffer::Emplace overload that takes a callback that will give you the pointer to the buffer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you recall from a while back: Skia is going to read from the buffer (even with BlendMode.src rendering) while rendering the glyphs, and the device buffers are not host read cached - so the performance tanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, I remember now. Add a comment to that effect maybe?
…153048) flutter/engine@69c29fb...317eb61 2024-08-07 [email protected] [Impeller] made Vector3 naming match Vector2 naming. (flutter/engine#54396) 2024-08-07 [email protected] [Impeller] bulk update fresh glyph atlas. (flutter/engine#54379) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#153048) flutter/engine@69c29fb...317eb61 2024-08-07 [email protected] [Impeller] made Vector3 naming match Vector2 naming. (flutter/engine#54396) 2024-08-07 [email protected] [Impeller] bulk update fresh glyph atlas. (flutter/engine#54379) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#153048) flutter/engine@69c29fb...317eb61 2024-08-07 [email protected] [Impeller] made Vector3 naming match Vector2 naming. (flutter/engine#54396) 2024-08-07 [email protected] [Impeller] bulk update fresh glyph atlas. (flutter/engine#54379) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Fixes flutter/flutter#152977
When creating a new glyph atlas texture, write glyphs in bulk. Additionally uses this operation to clear the glyph atlas, removing the need for the other blit pass.