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

Unified Diff: src/core/SkPicture.cpp

Issue 750723002: add endRecordingAsDrawable experiment (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: seems to work, TODO around immediate mode drawing Created 6 years, 1 month 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/SkCanvasDrawable.cpp ('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 b24f7196d0d25f13b55149c94fb6bf764f70e353..acc7af4329902ac4aee4f03b01faea43785388fd 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -279,6 +279,7 @@ SkPicture const* const* SkPicture::drawablePicts() const {
SkPicture::~SkPicture() {
this->callDeletionListeners();
+ fRecord.reset(NULL);
}
void SkPicture::EXPERIMENTAL_addAccelData(const SkPicture::AccelData* data) const {
@@ -521,9 +522,9 @@ SkPicture::SkPicture(const SkRect& cullRect, SkRecord* record, SnapshotArray* dr
SkBBoxHierarchy* bbh)
: fUniqueID(next_picture_generation_id())
, fCullRect(cullRect)
- , fRecord(record)
+ , fRecord(SkRef(record))
, fBBH(SkSafeRef(bbh))
- , fDrawablePicts(drawablePicts)
+ , fDrawablePicts(drawablePicts) // take ownership
, fAnalysis(*fRecord)
{}
« no previous file with comments | « src/core/SkCanvasDrawable.cpp ('k') | src/core/SkPictureRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698