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
This commit is contained in:
kkinnunen 2015-01-05 11:51:13 -08:00 committed by Commit bot
parent b280646beb
commit 5a2315e750
2 changed files with 4 additions and 4 deletions

View File

@ -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() {

View File

@ -26,7 +26,7 @@ public:
fIndex = index;
}
void draw(SkCanvas* canvas) {
if (fIndex > 0) {
if (fIndex >= 0) {
fDebugCanvas->drawTo(canvas, fIndex);
}
}