This repository was archived by the owner on Feb 25, 2025. It is now read-only.
[Impeller] Avoid culling when the current matrix has perspective.#44089
Merged
auto-submit[bot] merged 2 commits intoflutter:mainfrom Jul 28, 2023
Merged
[Impeller] Avoid culling when the current matrix has perspective.#44089auto-submit[bot] merged 2 commits intoflutter:mainfrom
auto-submit[bot] merged 2 commits intoflutter:mainfrom
Conversation
bdero
approved these changes
Jul 27, 2023
| } | ||
|
|
||
| if (display_list->has_rtree()) { | ||
| if (display_list->has_rtree() && !initial_matrix_.HasPerspective()) { |
Contributor
There was a problem hiding this comment.
Nit: Add todo comment nearby linking to the new bug?
flar
approved these changes
Jul 28, 2023
Contributor
flar
left a comment
There was a problem hiding this comment.
LGTM, would like to see a comment pointing to a filed issue as well...
| } | ||
|
|
||
| constexpr bool HasPerspective() const { | ||
| return m[3] != 0 || m[7] != 0 || m[11] != 0 || m[15] != 1; |
Contributor
There was a problem hiding this comment.
That should be safe. We may not care about 11 for the case at hand since it is the Z component of W and Z=0, but it can't hurt to bail on that for simplicity/robustness sake.
dnfield
added a commit
to dnfield/engine
that referenced
this pull request
Jul 28, 2023
…utter#44089) Fixes flutter/flutter#130613 Before this patch, the test would fail to render anything because the culling would decide it fell outside the cull rect when the transform has perspective sometimes. We should fix our Rect::TransformBounds implementation, but I can't quite seem to get it happy enough here so I'm just bailing out on culling if there is perspective instead, which is safe. This also makes the patch a bit easier/safer to cherry pick since it's a simple de-optimization when perspective is involved for the sake of fidelity, instead of a larger change that may have other side effects. Filed flutter/flutter#131445 to track the perspective issue.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jul 28, 2023
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Jul 28, 2023
flutter/engine@73615d6...182e118 2023-07-28 [email protected] [Impeller] Avoid culling when the current matrix has perspective. (flutter/engine#44089) 2023-07-28 [email protected] Roll Chrome to 115 (flutter/engine#44076) 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 [email protected],[email protected],[email protected] 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
LouiseHsu
pushed a commit
to LouiseHsu/flutter
that referenced
this pull request
Jul 31, 2023
…1492) flutter/engine@73615d6...182e118 2023-07-28 [email protected] [Impeller] Avoid culling when the current matrix has perspective. (flutter/engine#44089) 2023-07-28 [email protected] Roll Chrome to 115 (flutter/engine#44076) 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 [email protected],[email protected],[email protected] 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
vashworth
pushed a commit
to vashworth/flutter
that referenced
this pull request
Aug 2, 2023
…1492) flutter/engine@73615d6...182e118 2023-07-28 [email protected] [Impeller] Avoid culling when the current matrix has perspective. (flutter/engine#44089) 2023-07-28 [email protected] Roll Chrome to 115 (flutter/engine#44076) 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 [email protected],[email protected],[email protected] 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
XilaiZhang
pushed a commit
that referenced
this pull request
Aug 2, 2023
…#44106) Cherry pick of #44089 Before this patch, the test would fail to render anything because the culling would decide it fell outside the cull rect when the transform has perspective sometimes. We should fix our Rect::TransformBounds implementation, but I can't quite seem to get it happy enough here so I'm just bailing out on culling if there is perspective instead, which is safe. This also makes the patch a bit easier/safer to cherry pick since it's a simple de-optimization when perspective is involved for the sake of fidelity, instead of a larger change that may have other side effects.
gaaclarke
pushed a commit
to gaaclarke/engine
that referenced
this pull request
Aug 30, 2023
…utter#44089) Fixes flutter/flutter#130613 Before this patch, the test would fail to render anything because the culling would decide it fell outside the cull rect when the transform has perspective sometimes. We should fix our Rect::TransformBounds implementation, but I can't quite seem to get it happy enough here so I'm just bailing out on culling if there is perspective instead, which is safe. This also makes the patch a bit easier/safer to cherry pick since it's a simple de-optimization when perspective is involved for the sake of fidelity, instead of a larger change that may have other side effects. Filed flutter/flutter#131445 to track the perspective issue.
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.
Fixes flutter/flutter#130613
Before this patch, the test would fail to render anything because the culling would decide it fell outside the cull rect when the transform has perspective sometimes. We should fix our Rect::TransformBounds implementation, but I can't quite seem to get it happy enough here so I'm just bailing out on culling if there is perspective instead, which is safe. This also makes the patch a bit easier/safer to cherry pick since it's a simple de-optimization when perspective is involved for the sake of fidelity, instead of a larger change that may have other side effects.
Filed flutter/flutter#131445 to track the perspective issue.