-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Reland [DisplayList] Add support for clipOval to leverage Impeller optimization #53642
Conversation
In looking back at this, there is no code in the engine or dart::ui code that can produce an inverse fill path, so this is a check against an unused feature of SkPaths. In reality, we would have never encountered this problem and so it is unlikely it caused the golden changes that led to the revert of the first version. It would be nice to have our own Path objects that simply omit this inverse fill feature, but until then these tests will protect operation of the DL code. |
What was the reason for the revert? |
There were golden changes (you can see the list in the engine roll PR). I now expect the same golden failures on the new version but time will tell... |
Those golden diffs seem trivial so I probably would have just accepted them. OK, good to know there were no major issues. |
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
Normally, but I didn't see how promoting ClipOval would lead to the line of edge pixels all being off by one...??? |
…mpeller optimization (flutter/engine#53642)
I think I figured out why it might have had an impact on goldens - we now promote rect/oval/rrect SkPaths to their corresponding primitive call in |
…151016) flutter/engine@f828363...ad1343c 2024-06-28 yjbanov@google.com [web] switch from .didGain/LoseAccessibilityFocus to .focus (flutter/engine#53360) 2024-06-28 flar@google.com Reland [DisplayList] Add support for clipOval to leverage Impeller optimization (flutter/engine#53642) 2024-06-28 jonahwilliams@google.com [Impeller] experimental canvas bdf support. (flutter/engine#53597) 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 jimgraham@google.com,rmistry@google.com,zra@google.com 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
Reason for revert: This change causes 10k golden updates internally and we need to land this out of band (go/lssc). There is also an existing issue with one particular client screenshot test - see b/350129213 for more details. |
Time to revert pull request flutter/engine/53642 has elapsed. |
…lutter#151016) flutter/engine@f828363...ad1343c 2024-06-28 yjbanov@google.com [web] switch from .didGain/LoseAccessibilityFocus to .focus (flutter/engine#53360) 2024-06-28 flar@google.com Reland [DisplayList] Add support for clipOval to leverage Impeller optimization (flutter/engine#53642) 2024-06-28 jonahwilliams@google.com [Impeller] experimental canvas bdf support. (flutter/engine#53597) 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 jimgraham@google.com,rmistry@google.com,zra@google.com 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
…riate (#54088) Fixes: flutter/flutter#151850 Re-adding an optimization originally included in #53642 that detects when ClipRRect and ClipPath operations are actually ovals and redirects them to the ClipOval path during recording to save space and reduce the need for dispatchers to do the same detections and optimizations.
@@ -1188,6 +1223,22 @@ void DisplayListBuilder::DrawDRRect(const SkRRect& outer, | |||
drawDRRect(outer, inner); | |||
} | |||
void DisplayListBuilder::drawPath(const SkPath& path) { | |||
if (!path.isInverseFillType()) { | |||
SkRect rect; | |||
if (path.isRect(&rect)) { |
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.
This fails because it should ask if the rect is closed and only pass here if it is closed or if we are filling the path.
Reland of #53622 that checks the inverse fill flag of the paths.