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

Unified Diff: src/core/SkPictureRecorder.cpp

Issue 2448593002: Remove SkAutoTUnref and SkAutoTDelete from public includes. (Closed)
Patch Set: And Vulcan. Created 4 years, 2 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 | « src/core/SkPictureData.cpp ('k') | src/core/SkRecordedDrawable.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureRecorder.cpp
diff --git a/src/core/SkPictureRecorder.cpp b/src/core/SkPictureRecorder.cpp
index 5631a081d4a049c398f884e2644f6f8702597a93..758aa3e5ec5c85fc1f647a455613f748987cad7a 100644
--- a/src/core/SkPictureRecorder.cpp
+++ b/src/core/SkPictureRecorder.cpp
@@ -62,7 +62,7 @@ sk_sp<SkPicture> SkPictureRecorder::finishRecordingAsPicture(uint32_t finishFlag
}
// TODO: delay as much of this work until just before first playback?
- SkRecordOptimize(fRecord);
+ SkRecordOptimize(fRecord.get());
if (fRecord->count() == 0) {
if (finishFlags & kReturnNullForEmpty_FinishFlag) {
@@ -122,7 +122,7 @@ sk_sp<SkDrawable> SkPictureRecorder::finishRecordingAsDrawable(uint32_t finishFl
fRecorder->flushMiniRecorder();
fRecorder->restoreToCount(1); // If we were missing any restores, add them now.
- SkRecordOptimize(fRecord);
+ SkRecordOptimize(fRecord.get());
if (fRecord->count() == 0) {
if (finishFlags & kReturnNullForEmpty_FinishFlag) {
@@ -137,11 +137,8 @@ sk_sp<SkDrawable> SkPictureRecorder::finishRecordingAsDrawable(uint32_t finishFl
}
sk_sp<SkDrawable> drawable =
- sk_make_sp<SkRecordedDrawable>(fRecord, fBBH, fRecorder->detachDrawableList(), fCullRect);
-
- // release our refs now, so only the drawable will be the owner.
- fRecord.reset(nullptr);
- fBBH.reset(nullptr);
+ sk_make_sp<SkRecordedDrawable>(std::move(fRecord), std::move(fBBH),
+ fRecorder->detachDrawableList(), fCullRect);
return drawable;
}
« no previous file with comments | « src/core/SkPictureData.cpp ('k') | src/core/SkRecordedDrawable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698