aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/debugger/SkDrawCommand.h
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2014-10-16 14:28:28 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-16 14:28:28 -0700
commit70171683e6977af7472f0f465bd81852d0644ddd (patch)
tree6658846b90529d06b19f0e084a30890bc56fe7f6 /src/utils/debugger/SkDrawCommand.h
parent427cf28861867c0ea9aafca3a23878ec4068ad99 (diff)
"Fix" debugger's setMatrix handling
This remedies two problems with the debugger's matrix handling: 1) the user matrix was not being passed to the setMatrix command (for a concat) 2) the setting of the user matrix was not consistently forcing a complete re-rendering of the scene BUG=skia:3018 Review URL: https://codereview.chromium.org/660883002
Diffstat (limited to 'src/utils/debugger/SkDrawCommand.h')
-rw-r--r--src/utils/debugger/SkDrawCommand.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils/debugger/SkDrawCommand.h b/src/utils/debugger/SkDrawCommand.h
index def0db4d8a..1d3d373ac8 100644
--- a/src/utils/debugger/SkDrawCommand.h
+++ b/src/utils/debugger/SkDrawCommand.h
@@ -41,6 +41,9 @@ public:
SkTDArray<SkString*>* Info() {return &fInfo; };
virtual void execute(SkCanvas* canvas) = 0;
virtual void vizExecute(SkCanvas* canvas) { };
+
+ virtual void setUserMatrix(const SkMatrix& userMtx) { };
+
/** Does nothing by default, but used by save() and restore()-type
subclasses to track unresolved save() calls. */
virtual void trackSaveState(int* state) { };
@@ -592,8 +595,10 @@ private:
class SkSetMatrixCommand : public SkDrawCommand {
public:
SkSetMatrixCommand(const SkMatrix& matrix);
+ virtual void setUserMatrix(const SkMatrix&) SK_OVERRIDE;
virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
private:
+ SkMatrix fUserMatrix;
SkMatrix fMatrix;
typedef SkDrawCommand INHERITED;