-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Default clipBehavior of ClipRect to hardEdge. #21703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
9da77d3 to
4688f9d
Compare
liyuqian
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. Thanks for the quick fix!
|
LGTM, but please make sure to add more documentation soon. Thanks! |
|
FYI: My golden files update for an engine roll overwrite your golden update for this PR, see flutter/goldens#17. |
|
FYI: you can also |
e31d62b to
fbbb5cf
Compare
|
This seems to have had no effect on the regression. |
Using antiAlias in ClipRect, which is no longer the default, is now slow since flutter/engine#6199 enables AA.
Background:
Previously, the engine did not properly pass the AA flag on ClipRect.clipBehavior. flutter/engine#6199 fixes this and enables AA. However, default AA on clipRects has caused severe regressions in benchmark performance.
To maintain expected performance, we should now default the clipBehavior to hardEdge to disable default AA. This is consistent with any flutter projects that did not previously explicitly set the clipBehavior and should not change app appearance.
Migration:
For the most part, there should be minimal if any need to migrate code, but I will be glad to assist anyone to achieve the expected clipping behavior.
Summary:
clipBehavior is now properly respected instead of always hardEdge. Any expectation of anti-aliasing should be re-evaluated in regards to performance.
#21702