diff options
author | mtklein <mtklein@google.com> | 2015-04-07 15:27:14 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-07 15:27:14 -0700 |
commit | c654e9016a15985ebeb24f94f819d113ad48a251 (patch) | |
tree | 7d204411123a5a8fb965fb6ae4ff676183dc0aef /src/core/SkPictureRecorder.cpp | |
parent | f920e468ac66a36c9653d1b11181480295044c7d (diff) |
Revert of SkCanvas::resetForNextPicture() (patchset #4 id:60001 of https://codereview.chromium.org/1067893002/)
Reason for revert:
https://uberchromegw.corp.google.com/i/client.skia/builders/Linux%20Tests/builds/1816
Original issue's description:
> SkCanvas::resetForNextPicture()
>
> No diffs against head for DM --config 8888 gpu 2ndpic-8888 2ndpic-gpu.
>
> picture_overhead_draw 1.62us -> 1.6us 0.99x
> picture_overhead_nodraw 792ns -> 342ns 0.43x
>
> tiles and serialization modes will also test this a bit.
>
> BUG=chromium:470553
>
> Committed: https://skia.googlesource.com/skia/+/f920e468ac66a36c9653d1b11181480295044c7d
TBR=mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:470553
Review URL: https://codereview.chromium.org/1062353002
Diffstat (limited to 'src/core/SkPictureRecorder.cpp')
-rw-r--r-- | src/core/SkPictureRecorder.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/SkPictureRecorder.cpp b/src/core/SkPictureRecorder.cpp index 7c0abcef74..850be27530 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 @@ SkCanvas* SkPictureRecorder::beginRecording(const SkRect& cullRect, } fRecord.reset(SkNEW(SkRecord)); - fRecorder->reset(fRecord.get(), cullRect); + fRecorder.reset(SkNEW_ARGS(SkRecorder, (fRecord.get(), cullRect))); return this->getRecordingCanvas(); } @@ -42,7 +40,6 @@ SkCanvas* SkPictureRecorder::getRecordingCanvas() { } 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 @@ SkPicture* SkPictureRecorder::endRecordingAsPicture() { } // 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 @@ protected: }; 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 @@ SkDrawable* SkPictureRecorder::endRecordingAsDrawable() { 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); |