-
Notifications
You must be signed in to change notification settings - Fork 6k
[canvaskit] Fall back to multi-context rendering on Firefox and Safari #49572
[canvaskit] Fall back to multi-context rendering on Firefox and Safari #49572
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 "@test-exemption-reviewer" in 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. |
b5bd3ec
to
9222b8e
Compare
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. |
Will fix goldens tomorrow |
09ebf43
to
408d8f6
Compare
lib/web_ui/lib/src/engine/canvaskit/multi_surface_rasterizer.dart
Outdated
Show resolved
Hide resolved
lib/web_ui/lib/src/engine/canvaskit/offscreen_canvas_rasterizer.dart
Outdated
Show resolved
Hide resolved
@@ -13,11 +13,13 @@ void main() { | |||
} | |||
|
|||
void testMain() { | |||
group('$RenderCanvasFactory', () { | |||
group('$OverlayCanvasFactory', () { |
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.
How do we test the two strategies? We want to make sure tests cover single and multi context modes.
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.
The only difference between those modes is the factory function which creates the DisplayCanvas. This test is just for the functions of DisplayCanvas
itself, so it should be agnostic to what kinds of DisplayCanvas
es are actually made. I refactored the test a bit to clarify that.
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.
Thanks! PTAL
lib/web_ui/lib/src/engine/canvaskit/multi_surface_rasterizer.dart
Outdated
Show resolved
Hide resolved
lib/web_ui/lib/src/engine/canvaskit/offscreen_canvas_rasterizer.dart
Outdated
Show resolved
Hide resolved
@@ -13,11 +13,13 @@ void main() { | |||
} | |||
|
|||
void testMain() { | |||
group('$RenderCanvasFactory', () { | |||
group('$OverlayCanvasFactory', () { |
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.
The only difference between those modes is the factory function which creates the DisplayCanvas. This test is just for the functions of DisplayCanvas
itself, so it should be agnostic to what kinds of DisplayCanvas
es are actually made. I refactored the test a bit to clarify that.
Golden file changes are available for triage from new commit, Click here to view. |
PTAL. I also added a test for the off-by-one blurriness issue in |
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.
Fixes flutter/flutter#140748 |
Thanks @harryterkelsen!! Hope this will end up being temporary 🤞 |
…141800) flutter/engine@75400c4...f4a4f04 2024-01-18 [email protected] [canvaskit] Fall back to multi-context rendering on Firefox and Safari (flutter/engine#49572) 2024-01-18 [email protected] Use any mac machine available for orchestrator run. (flutter/engine#49845) 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
Just a question, how do I check whether this landed in stable channel or perhaps if you know if this will end up somewhere in the 3.19.x? |
Looking for the same information here. Would be awesome if this landed in a hotfix. |
flutter#49572) This PR refactors rasterization to support two different modes, single GL context mode backed by a single OffscreenCanvas (Chrome), and multi-context mode which uses many GL contexts and canvases. ## 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
…Safari (#52141) Cherry pick of #49572 to fix flutter/flutter#145563 Cherry-pick request issue: flutter/flutter#146787 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This PR refactors rasterization to support two different modes, single GL context mode backed by a single OffscreenCanvas (Chrome), and multi-context mode which uses many GL contexts and canvases.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.