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
Create a mechanism to manage layer state #36458
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
dfc22b4
recreate previous prototype on more recent source commit
flar ab3af3d
update recently added unit tests for new behavior
flar 6c92f50
fix translation rejection bug
flar 2168b5c
lint
flar c45f326
fix issue with layer bounds rejection when rendering a tree to a DL
flar 20ed976
add tests for state tracking after a platform layer and fix a bug
flar 0255507
rename some methods, consolidate state, add attribute interaction uni…
flar cf27cad
tests to verify saveLayer attribute commutability assumptions
flar 09db174
shift Preroll from MutatorsStack to LayerStateStack
flar 001228b
move cull_rect and preroll transform into layer state stack
flar 24413fb
fix initial matrix/clip when reapplying for new canvas/builder
flar 7d5254f
don't use a reference to store what could be a temp local value
flar 862dab6
add canvas to delegate when rendering layers for layer cache
flar 9094ab0
render ImageFilterLayer children with transformed filter
flar c648e4a
ignore set_delegate calls that set the same delegate
flar 894bf2f
add design/usage comment to LayerStateStack
flar e658ff8
review feedback, mostly naming
flar 7632996
add back automatic saveLayer tracing calls
flar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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 will exclude Z perspective right? That's probably fine for this patch, but should we have an issue to follow up on this?
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.
That's complicated. Since the bounds have no Z then you don't need the Z column. Since we drop the Z while rendering, and we're looking for a 2D bounds, you don't need the Z row either. So, it doesn't drop anything that affects this particular operation.
It does not drop perspective, though. The 3x3 matrix has perspective components. It just drops Z. The reason that down-converting a 4x4 to a 3x3 is bad is because you can no longer compose it accurately with other 4x4 matrices. But, for a given 2D rendering operation (and bounds operation) I don't think you need those elements of the matrix.
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.
I should have said "for a leaf 2D operation". All you lose with the 3x3 is composing with future 4x4 matrices and ability to take or generate Z components. None of our geometry has Z and we don't output Z so the only thing that matters is the composability.
That composability is critical for TransformLayer because it could be nested with another TransformLayer, but not in single layer operations.