Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@jonahwilliams
Copy link
Contributor

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.

@flutter-dashboard
Copy link

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.

jonahwilliams added 2 commits August 6, 2024 18:52
@flutter-dashboard
Copy link

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.

Changes reported for pull request #54379 at sha 9efaa96

Copy link
Member

@chinmaygarde chinmaygarde left a 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(
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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?

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 7, 2024
@auto-submit auto-submit bot merged commit 8562dd0 into flutter:main Aug 7, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 7, 2024
@jonahwilliams jonahwilliams deleted the fix_ff_perf branch August 7, 2024 22:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App e: impeller will affect goldens

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Impeller] first raster performance regresses with UI thread = platform thread.

2 participants