Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(861)

Unified Diff: src/utils/debugger/SkDrawCommand.cpp

Issue 660883002: "Fix" debugger's setMatrix handling (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/utils/debugger/SkDrawCommand.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/debugger/SkDrawCommand.cpp
diff --git a/src/utils/debugger/SkDrawCommand.cpp b/src/utils/debugger/SkDrawCommand.cpp
index 0da8f98954b295bad1a36ccc5de8ed681d979b7f..93c436df6494cf4a0127b0e0ed1a73a47838769e 100644
--- a/src/utils/debugger/SkDrawCommand.cpp
+++ b/src/utils/debugger/SkDrawCommand.cpp
@@ -964,13 +964,19 @@ void SkScaleCommand::execute(SkCanvas* canvas) {
SkSetMatrixCommand::SkSetMatrixCommand(const SkMatrix& matrix)
: INHERITED(SET_MATRIX) {
+ fUserMatrix.reset();
fMatrix = matrix;
fInfo.push(SkObjectParser::MatrixToString(matrix));
}
+void SkSetMatrixCommand::setUserMatrix(const SkMatrix& userMatrix) {
+ fUserMatrix = userMatrix;
+}
+
void SkSetMatrixCommand::execute(SkCanvas* canvas) {
- canvas->setMatrix(fMatrix);
+ SkMatrix temp = SkMatrix::Concat(fUserMatrix, fMatrix);
+ canvas->setMatrix(temp);
}
SkSkewCommand::SkSkewCommand(SkScalar sx, SkScalar sy)
« no previous file with comments | « src/utils/debugger/SkDrawCommand.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698