This repository was archived by the owner on Feb 25, 2025. It is now read-only.
[Impeller] optimize clip rects by checking if integral coverage is sufficient.#56041
Merged
auto-submit[bot] merged 4 commits intoflutter:mainfrom Oct 23, 2024
Merged
[Impeller] optimize clip rects by checking if integral coverage is sufficient.#56041auto-submit[bot] merged 4 commits intoflutter:mainfrom
auto-submit[bot] merged 4 commits intoflutter:mainfrom
Conversation
jonahwilliams
commented
Oct 23, 2024
| if (!clip_coverage.is_difference_or_non_square && | ||
| clip_coverage.coverage.has_value()) { | ||
| const Rect& coverage = clip_coverage.coverage.value(); | ||
| constexpr Scalar threshold = 0.2; |
Contributor
There was a problem hiding this comment.
The default 4x MSAA sample positions are 2/16 (0.125) pixels away from the edges. So maybe go with something a bit smaller, like 0.124?
bdero
reviewed
Oct 23, 2024
| if (!clip_coverage.is_difference_or_non_square && | ||
| clip_coverage.coverage.has_value()) { | ||
| const Rect& coverage = clip_coverage.coverage.value(); | ||
| constexpr Scalar threshold = 0.2; |
Contributor
There was a problem hiding this comment.
The default 4x MSAA sample positions are 2/16 (0.125) pixels away from the edges. So maybe go with something a bit smaller, like 0.124?
| threshold)) { | ||
| subpass_state.clip_coverage.push_back(ClipCoverageLayer{ | ||
| .coverage = Rect::Round(clip_coverage.coverage.value()), // | ||
| .clip_height = previous_clip_height + 1 // |
Contributor
There was a problem hiding this comment.
Don't we still need to track the clip coverage layer so that the scissor will get set during clip replays?
Contributor
Author
There was a problem hiding this comment.
Yeah good point, let me refactor this so I can just make should_render conditional.
added 2 commits
October 23, 2024 08:41
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 23, 2024
…ge is sufficient. (flutter/engine#56041)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 23, 2024
…ge is sufficient. (flutter/engine#56041)
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Oct 24, 2024
flutter/engine@73c54fa...5d7caf7 2024-10-23 34871572+gmackall@users.noreply.github.com Delete v1 android engine embedding (flutter/engine#52022) 2024-10-23 41930132+hellohuanlin@users.noreply.github.com [ios][platform_view]force reset forwarding recognizer state when its stuck (flutter/engine#55958) 2024-10-23 jason-simmons@users.noreply.github.com Allow running the YAPF formatter using Python version 3.11 (flutter/engine#56062) 2024-10-23 jonahwilliams@google.com [Impeller] optimize clip rects by checking if integral coverage is sufficient. (flutter/engine#56041) 2024-10-23 a-siva@users.noreply.github.com Switch the web compilation step to use an AOT snapshot (flutter/engine#56040) 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 codefu@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
Contributor
Author
M97Chahboun
pushed a commit
to M97Chahboun/flutter
that referenced
this pull request
Oct 30, 2024
…7478) flutter/engine@73c54fa...5d7caf7 2024-10-23 34871572+gmackall@users.noreply.github.com Delete v1 android engine embedding (flutter/engine#52022) 2024-10-23 41930132+hellohuanlin@users.noreply.github.com [ios][platform_view]force reset forwarding recognizer state when its stuck (flutter/engine#55958) 2024-10-23 jason-simmons@users.noreply.github.com Allow running the YAPF formatter using Python version 3.11 (flutter/engine#56062) 2024-10-23 jonahwilliams@google.com [Impeller] optimize clip rects by checking if integral coverage is sufficient. (flutter/engine#56041) 2024-10-23 a-siva@users.noreply.github.com Switch the web compilation step to use an AOT snapshot (flutter/engine#56040) 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 codefu@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
nick9822
pushed a commit
to nick9822/flutter
that referenced
this pull request
Dec 18, 2024
…fficient. (flutter/engine#56041) For non-aa axis aligned difference clip rects or aa axis aligned difference clips that are very nearly integral, just use the scissor update and don't perform the depth write at all.
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
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.

For non-aa axis aligned difference clip rects or aa axis aligned difference clips that are very nearly integral, just use the scissor update and don't perform the depth write at all.