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

Unified Diff: src/core/SkPicture.cpp

Issue 1098183003: Reduce ref counting in SkPictureRecorder. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 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
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPictureRecorder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPicture.cpp
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index 4d4364aec6988d641b17c9d714d7ad65d35e4228..619be8b3ca1a9a8572494a496e74fd3e1eac8e99 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -456,8 +456,8 @@ SkPicture::SkPicture(const SkRect& cullRect, SkRecord* record, SnapshotArray* dr
SkBBoxHierarchy* bbh, size_t approxBytesUsedBySubPictures)
: fUniqueID(0)
, fCullRect(cullRect)
- , fRecord(SkRef(record))
- , fBBH(SkSafeRef(bbh))
+ , fRecord(record) // For performance, we take ownership of the caller's ref.
+ , fBBH(bbh) // Ditto.
, fDrawablePicts(drawablePicts) // take ownership
, fApproxBytesUsedBySubPictures(approxBytesUsedBySubPictures)
, fAnalysis(*fRecord)
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkPictureRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698