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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/utils/debugger/SkDrawCommand.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkDrawCommand.h" 10 #include "SkDrawCommand.h"
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 fInfo.push(SkObjectParser::ScalarToString(sx, "SkScalar sx: ")); 957 fInfo.push(SkObjectParser::ScalarToString(sx, "SkScalar sx: "));
958 fInfo.push(SkObjectParser::ScalarToString(sy, "SkScalar sy: ")); 958 fInfo.push(SkObjectParser::ScalarToString(sy, "SkScalar sy: "));
959 } 959 }
960 960
961 void SkScaleCommand::execute(SkCanvas* canvas) { 961 void SkScaleCommand::execute(SkCanvas* canvas) {
962 canvas->scale(fSx, fSy); 962 canvas->scale(fSx, fSy);
963 } 963 }
964 964
965 SkSetMatrixCommand::SkSetMatrixCommand(const SkMatrix& matrix) 965 SkSetMatrixCommand::SkSetMatrixCommand(const SkMatrix& matrix)
966 : INHERITED(SET_MATRIX) { 966 : INHERITED(SET_MATRIX) {
967 fUserMatrix.reset();
967 fMatrix = matrix; 968 fMatrix = matrix;
968 969
969 fInfo.push(SkObjectParser::MatrixToString(matrix)); 970 fInfo.push(SkObjectParser::MatrixToString(matrix));
970 } 971 }
971 972
973 void SkSetMatrixCommand::setUserMatrix(const SkMatrix& userMatrix) {
974 fUserMatrix = userMatrix;
975 }
976
972 void SkSetMatrixCommand::execute(SkCanvas* canvas) { 977 void SkSetMatrixCommand::execute(SkCanvas* canvas) {
973 canvas->setMatrix(fMatrix); 978 SkMatrix temp = SkMatrix::Concat(fUserMatrix, fMatrix);
979 canvas->setMatrix(temp);
974 } 980 }
975 981
976 SkSkewCommand::SkSkewCommand(SkScalar sx, SkScalar sy) 982 SkSkewCommand::SkSkewCommand(SkScalar sx, SkScalar sy)
977 : INHERITED(SKEW) { 983 : INHERITED(SKEW) {
978 fSx = sx; 984 fSx = sx;
979 fSy = sy; 985 fSy = sy;
980 986
981 fInfo.push(SkObjectParser::ScalarToString(sx, "SkScalar sx: ")); 987 fInfo.push(SkObjectParser::ScalarToString(sx, "SkScalar sx: "));
982 fInfo.push(SkObjectParser::ScalarToString(sy, "SkScalar sy: ")); 988 fInfo.push(SkObjectParser::ScalarToString(sy, "SkScalar sy: "));
983 } 989 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 p.setColor(SK_ColorCYAN); 1022 p.setColor(SK_ColorCYAN);
1017 p.setStyle(SkPaint::kStroke_Style); 1023 p.setStyle(SkPaint::kStroke_Style);
1018 canvas->drawRect(fCullRect, p); 1024 canvas->drawRect(fCullRect, p);
1019 } 1025 }
1020 1026
1021 SkPopCullCommand::SkPopCullCommand() : INHERITED(POP_CULL) { } 1027 SkPopCullCommand::SkPopCullCommand() : INHERITED(POP_CULL) { }
1022 1028
1023 void SkPopCullCommand::execute(SkCanvas* canvas) { 1029 void SkPopCullCommand::execute(SkCanvas* canvas) {
1024 canvas->popCull(); 1030 canvas->popCull();
1025 } 1031 }
OLDNEW
« 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