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

Unified Diff: debugger/SkDebugger.cpp

Issue 211383003: Debugger improvements (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fix Mac 10.8 compilation issue Created 6 years, 9 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 | « debugger/SkDebugger.h ('k') | src/utils/debugger/SkDebugCanvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: debugger/SkDebugger.cpp
===================================================================
--- debugger/SkDebugger.cpp (revision 13942)
+++ debugger/SkDebugger.cpp (working copy)
@@ -31,7 +31,9 @@
delete fDebugCanvas;
fDebugCanvas = new SkDebugCanvas(fPictureWidth, fPictureHeight);
fDebugCanvas->setBounds(fPictureWidth, fPictureHeight);
+ fDebugCanvas->setPicture(picture);
picture->draw(fDebugCanvas);
+ fDebugCanvas->setPicture(NULL);
fIndex = fDebugCanvas->getSize() - 1;
SkRefCnt_SafeAssign(fPicture, picture);
}
@@ -41,7 +43,25 @@
// commands. Playing back will strip those out.
SkPicture* newPicture = new SkPicture;
SkCanvas* canvas = newPicture->beginRecording(fPictureWidth, fPictureHeight);
+
+ bool vizMode = fDebugCanvas->getMegaVizMode();
+ fDebugCanvas->setMegaVizMode(false);
+ bool overDraw = fDebugCanvas->getOverdrawViz();
+ fDebugCanvas->setOverdrawViz(false);
+ int saveCount = fDebugCanvas->getOutstandingSaveCount();
+ fDebugCanvas->setOutstandingSaveCount(0);
+
fDebugCanvas->draw(canvas);
+
+ int temp = fDebugCanvas->getOutstandingSaveCount();
+ for (int i = 0; i < temp; ++i) {
+ canvas->restore();
+ }
+
+ fDebugCanvas->setMegaVizMode(vizMode);
+ fDebugCanvas->setOverdrawViz(overDraw);
+ fDebugCanvas->setOutstandingSaveCount(saveCount);
+
newPicture->endRecording();
return newPicture;
}
« no previous file with comments | « debugger/SkDebugger.h ('k') | src/utils/debugger/SkDebugCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698