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

Unified Diff: debugger/SkDebugger.cpp

Issue 214953003: split SkPictureRecorder out of SkPicture (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: update to ToT (again) Created 6 years, 8 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
Index: debugger/SkDebugger.cpp
===================================================================
--- debugger/SkDebugger.cpp (revision 14159)
+++ debugger/SkDebugger.cpp (working copy)
@@ -41,8 +41,8 @@
SkPicture* SkDebugger::copyPicture() {
// We can't just call clone here since we want to removed the "deleted"
// commands. Playing back will strip those out.
- SkPicture* newPicture = new SkPicture;
- SkCanvas* canvas = newPicture->beginRecording(fPictureWidth, fPictureHeight);
+ SkPictureRecorder recorder;
+ SkCanvas* canvas = recorder.beginRecording(fPictureWidth, fPictureHeight);
bool vizMode = fDebugCanvas->getMegaVizMode();
fDebugCanvas->setMegaVizMode(false);
@@ -62,8 +62,7 @@
fDebugCanvas->setOverdrawViz(overDraw);
fDebugCanvas->setOutstandingSaveCount(saveCount);
- newPicture->endRecording();
- return newPicture;
+ return recorder.endRecording();
}
void SkDebugger::getOverviewText(const SkTDArray<double>* typeTimes,
« no previous file with comments | « bench/benchmain.cpp ('k') | dm/DMReplayTask.cpp » ('j') | samplecode/SampleTiling.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698