diff options
author | kkinnunen <kkinnunen@nvidia.com> | 2015-01-05 11:51:13 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-05 11:51:13 -0800 |
commit | 5a2315e750f65a8b61faa509a65840c622f04424 (patch) | |
tree | b613d574d9e7bf42753dc05a5e84e2a23e45c461 /debugger | |
parent | b280646beba5d2d247994f2241b8d0c69a1e031d (diff) |
debugger: Update the picture view when the first command is selected
Update the picture view in the debugger when the first command is
selected. DebugCanvas::drawTo(index) draws up to and including the index.
Review URL: https://codereview.chromium.org/837483002
Diffstat (limited to 'debugger')
-rw-r--r-- | debugger/SkDebugger.cpp | 6 | ||||
-rw-r--r-- | debugger/SkDebugger.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/debugger/SkDebugger.cpp b/debugger/SkDebugger.cpp index b2200433b2..43823c12f0 100644 --- a/debugger/SkDebugger.cpp +++ b/debugger/SkDebugger.cpp @@ -11,11 +11,11 @@ #include "SkString.h" -SkDebugger::SkDebugger() { +SkDebugger::SkDebugger() + : fPicture(NULL) + , fIndex(-1) { // Create this some other dynamic way? fDebugCanvas = new SkDebugCanvas(0, 0); - fPicture = NULL; - fIndex = 0; } SkDebugger::~SkDebugger() { diff --git a/debugger/SkDebugger.h b/debugger/SkDebugger.h index 683b98d6d9..5906acc43e 100644 --- a/debugger/SkDebugger.h +++ b/debugger/SkDebugger.h @@ -26,7 +26,7 @@ public: fIndex = index; } void draw(SkCanvas* canvas) { - if (fIndex > 0) { + if (fIndex >= 0) { fDebugCanvas->drawTo(canvas, fIndex); } } |