aboutsummaryrefslogtreecommitdiffhomepage
path: root/debugger
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-13 19:09:42 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-13 19:09:42 +0000
commit84b18c7e3e042bf206e1ace3d1b6ea5bb929fe51 (patch)
tree7b46e74e6212283d9efe62a7b6feaad2c009972b /debugger
parentc202ea7cc69476a20ad898d6c76bcdbcb18adf74 (diff)
split SkPictureRecorder out of SkPicture
Diffstat (limited to 'debugger')
-rw-r--r--debugger/SkDebugger.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/debugger/SkDebugger.cpp b/debugger/SkDebugger.cpp
index 82b26a1270..5bdc8a9fb4 100644
--- a/debugger/SkDebugger.cpp
+++ b/debugger/SkDebugger.cpp
@@ -41,8 +41,8 @@ void SkDebugger::loadPicture(SkPicture* picture) {
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 @@ SkPicture* SkDebugger::copyPicture() {
fDebugCanvas->setOverdrawViz(overDraw);
fDebugCanvas->setOutstandingSaveCount(saveCount);
- newPicture->endRecording();
- return newPicture;
+ return recorder.endRecording();
}
void SkDebugger::getOverviewText(const SkTDArray<double>* typeTimes,