-
Notifications
You must be signed in to change notification settings - Fork 6k
Optimize overlays in CanvasKit #47317
Optimize overlays in CanvasKit #47317
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie or stuartmorgan on the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). 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. |
|
This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold. |
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.
Mostly looks good, but I had a question about some of the matrix math when calculating the platform view bounds.
lib/web_ui/lib/src/engine/canvaskit/overlay_scene_optimizer.dart
Outdated
Show resolved
Hide resolved
|
Thanks for the reviews! PTAL |
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! (Suggested a small fix for the analyzer)
…144862) flutter/engine@953927e...7541e90 2024-03-08 [email protected] [Impeller] implement mask blur for textures (flutter/engine#51183) 2024-03-08 [email protected] Don't rely on dart binary on PATH in run_test.py (flutter/engine#51302) 2024-03-08 [email protected] Mark the Flutter Views as focusable by setting a tabindex value. (flutter/engine#50876) 2024-03-08 [email protected] Update the instructions for updating licenses. (flutter/engine#51297) 2024-03-08 [email protected] Optimize overlays in CanvasKit (flutter/engine#47317) 2024-03-08 [email protected] Roll Fuchsia Linux SDK from 5Ra_AjCji-uR1GaX7... to lAV5jgp4796siOZgI... (flutter/engine#51296) 2024-03-08 [email protected] [Impeller] Add the KHR prefix to existing swapchain utilities. (flutter/engine#51295) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from 5Ra_AjCji-uR to lAV5jgp4796s 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] 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
|
Awesome! That is absolutely intended by this change. Excellent to see the perf improvements! |
There is a bug in CanvasKit where a backdrop filter with a platform view as a child will cause the backdrop filter to apply multiple times. This change fixes it by only applying the backdrop filter once. The bug case is more likely to happen since #47317 landed because when we encounter an invisible platform view, we always create a new SkPicture instead of continuing to use the same SkPicture. BEFORE:  AFTER:  ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
Optimize overlays by detecting when Flutter-rendered content intersects with platform views. Overlay canvases are only needed when the content intersects, so by checking for this, we can optimize out most overlays.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.