-
Notifications
You must be signed in to change notification settings - Fork 6k
Add a display list op to clear the transformation stack. #32050
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,6 +152,11 @@ void SkMatrixDispatchHelper::transformFullPerspective( | |
|
||
// clang-format on | ||
|
||
void SkMatrixDispatchHelper::transformReset() { | ||
matrix_ = {}; | ||
matrix33_ = {}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, I think Fixing both issues. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nevermind. I can't confirm this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SkMatrixDispatchHelper already has a reset() method. I'm not sure if it is used any more (I used to collect saveLayer bounds in their native coordinate space, but had to back off on that due to bugs). You don't want saved_ to be cleared, if they restore() then they should undo the reset. The set to identity should not escape the enclosing save/restore. There probably should be a protection here for over-restore, but the caller generally already does that. It would be redundant for existing use cases, but we shouldn't rely on that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Filed flutter/flutter#100176 |
||
} | ||
|
||
void SkMatrixDispatchHelper::save() { | ||
saved_.push_back(matrix_); | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.