This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Reland "add non-rendering operation culling to DisplayListBuilder" (#41463) #42330
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jonahwilliams
approved these changes
Jun 1, 2023
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
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jun 1, 2023
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Jun 1, 2023
…128064) flutter/engine@7c0a639...3a453f2 2023-06-01 flar@google.com Reland "add non-rendering operation culling to DisplayListBuilder" (#41463) (flutter/engine#42330) 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 jonahwilliams@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This PR seems to have caused some golden failures down the line so I'm creating a revert. |
auto-submit bot
pushed a commit
that referenced
this pull request
Jun 5, 2023
Fixes: flutter/flutter#128159 In diagnosing test failures for #42330 we discovered that the DisplayList code was not always backwards compatible with computing the bounds of inverted rectangles (where left > right or top > bottom). Historically such rectangles were always rendered as if they were sorted (i.e. `SkRect::makeSorted()`), but we computed bounds as if the bounds only mattered if the supplied rectangle was ordered. So, we would sometimes render a rectangle for which we mis-computed the bounds. This would rarely surface in the current code as most rendered rectangles would pass through `SkMatrix::mapRect()` which implicitly orders the rectangle as it transforms it, but any attributes applied to the bounds before that method may have been applied "in the wrong direction" - such as: - stroke width padding - mask blur padding - image filter padding
This was referenced Jun 5, 2023
auto-submit bot
pushed a commit
that referenced
this pull request
Jun 11, 2023
…41463) (#42584) This reverts commit 2553def. Fixes flutter/flutter#125338 This PR should fix the blendmode/color analysis that caused failures for #41463 as well as the bounds failures for inverted rectangles that caused failures for #42330 (incorporating the fix from #42556). The description from the [previous PR](#41463) updated with the new name of the DL property: --------------------------------- This optimization avoids recording unnecessary render operations that will not affect the output and also eliminates the need for "draw detection" mechanisms like `DlOpSpy` and `CanvasSpy` by remembering if any non-transparent operations were included. The `DlOpSpy` unit tests were updated to check if the results from that object match the new `DisplayList::modifies_transparent_black()` method. Fixes flutter/flutter#125338 In addition, this change will unblock some other Issues: - flutter/flutter#125318 - flutter/flutter#125403
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The original PR caused some golden test failures down the line, likely due to bad analysis of when the combined BlendMode and color would result in a NOP situation.
This PR adds tests that go through every BlandMode and pair it with a variety of colors and Color/ImageFilters to verify that the operations are only omitted when they actually produce no change in the output. It also checks the validity of the "modifies_transparent_black" property of DisplayLists which can be used in place of the current CanvasSpy/DlOpSpy classes.
The description from the previous PR updated with the new name of the DL property:
This optimization avoids recording unnecessary render operations that will not affect the output and also eliminates the need for "draw detection" mechanisms like
DlOpSpy
andCanvasSpy
by remembering if any non-transparent operations were included. TheDlOpSpy
unit tests were updated to check if the results from that object match the newDisplayList::modifies_transparent_black()
method.Fixes flutter/flutter#125338
In addition, this change will unblock some other Issues: