-
Notifications
You must be signed in to change notification settings - Fork 6k
[web]Update @dart annotation. Change shaders to allocate smaller canvas #22481
Conversation
yjbanov
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.
| } | ||
| } | ||
|
|
||
| /// Applys path to drawing context, preparing for fill and other operations. |
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.
nit: Applies
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.
Done.
|
|
||
| /// Applys path to drawing context, preparing for fill and other operations. | ||
| /// | ||
| /// !Don't refactor _runPath/_runPathWithOffset. Latency sensitive |
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.
nit: move the ! to the end of the sentence. Alternatively, begin with "WARNING:"
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.
Done.
| shaderBounds.left + 2 * (shaderBounds.width * (centerX - 0.5)), | ||
| -shaderBounds.top - 2 * (shaderBounds.height * (centerY - 0.5))); | ||
| 2 * (shaderBounds.width * (centerX - 0.5)), | ||
| 2 * (shaderBounds.height * (centerY - 0.5))); |
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.
nit: a trailing comma could help dartfmt do a better job
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.
3 param function. I try to do it for lists and widget trees

Description
To align origin of shader pattern to target rect, we used to allocate large canvas(s). This PR compensates for the shader pattern origin.
Also updates engine files to 1.12.
Related Issues
Step towards addressing:
flutter/flutter#46833
Tests
Covered by golden tests.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.Reviewer Checklist
Breaking Change
Did any tests fail when you ran them? Please read [handling breaking changes].