Index: src/core/SkPictureRecorder.cpp |
diff --git a/src/core/SkPictureRecorder.cpp b/src/core/SkPictureRecorder.cpp |
index 7c0abcef7435d16d69fcb18896d47b3e04950732..850be275300246763828217d4a4cb589a1935740 100644 |
--- a/src/core/SkPictureRecorder.cpp |
+++ b/src/core/SkPictureRecorder.cpp |
@@ -15,9 +15,7 @@ |
#include "SkRecordOpts.h" |
#include "SkTypes.h" |
-SkPictureRecorder::SkPictureRecorder() { |
- fRecorder.reset(SkNEW_ARGS(SkRecorder, (nullptr, SkRect::MakeWH(0,0)))); |
-} |
+SkPictureRecorder::SkPictureRecorder() {} |
SkPictureRecorder::~SkPictureRecorder() {} |
@@ -33,7 +31,7 @@ |
} |
fRecord.reset(SkNEW(SkRecord)); |
- fRecorder->reset(fRecord.get(), cullRect); |
+ fRecorder.reset(SkNEW_ARGS(SkRecorder, (fRecord.get(), cullRect))); |
return this->getRecordingCanvas(); |
} |
@@ -42,7 +40,6 @@ |
} |
SkPicture* SkPictureRecorder::endRecordingAsPicture() { |
- fRecorder->restoreToCount(1); // If we were missing any restores, add them now. |
// TODO: delay as much of this work until just before first playback? |
SkRecordOptimize(fRecord); |
@@ -76,6 +73,7 @@ |
} |
// release our refs now, so only the picture will be the owner. |
+ fRecorder.reset(NULL); |
fRecord.reset(NULL); |
fBBH.reset(NULL); |
@@ -160,7 +158,6 @@ |
}; |
SkDrawable* SkPictureRecorder::endRecordingAsDrawable() { |
- fRecorder->restoreToCount(1); // If we were missing any restores, add them now. |
// TODO: delay as much of this work until just before first playback? |
SkRecordOptimize(fRecord); |
@@ -174,6 +171,7 @@ |
SkToBool(fFlags & kComputeSaveLayerInfo_RecordFlag))); |
// release our refs now, so only the drawable will be the owner. |
+ fRecorder.reset(NULL); |
fRecord.reset(NULL); |
fBBH.reset(NULL); |