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

Unified Diff: src/core/SkPictureRecorder.cpp

Issue 1112833003: Straighten out SkPicture::AccelData APIs. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « src/core/SkPicture.cpp ('k') | no next file » | 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 6639bfcc85a246334ee5cd99989bc289fb05f91a..282e2c22dde20025b8d9e50da90cb32e6f1775cd 100644
--- a/src/core/SkPictureRecorder.cpp
+++ b/src/core/SkPictureRecorder.cpp
@@ -77,14 +77,12 @@ SkPicture* SkPictureRecorder::endRecordingAsPicture() {
for (int i = 0; pictList && i < pictList->count(); i++) {
subPictureBytes += SkPictureUtils::ApproximateBytesUsed(pictList->begin()[i]);
}
- SkPicture* pict = SkNEW_ARGS(SkPicture,
- (fCullRect, fRecord.detach(), pictList, fBBH.detach(), subPictureBytes));
-
- if (saveLayerData) {
- pict->EXPERIMENTAL_addAccelData(saveLayerData);
- }
-
- return pict;
+ return SkNEW_ARGS(SkPicture, (fCullRect,
+ fRecord.detach(),
+ pictList,
+ fBBH.detach(),
+ saveLayerData.detach(),
+ subPictureBytes));
}
void SkPictureRecorder::partialReplay(SkCanvas* canvas) const {
@@ -161,13 +159,12 @@ protected:
}
// SkPicture will take ownership of a ref on both fRecord and fBBH.
// We're not willing to give up our ownership, so we must ref them for SkPicture.
- SkPicture* pict = SkNEW_ARGS(SkPicture,
- (fBounds, SkRef(fRecord.get()), pictList, SkSafeRef(fBBH.get()), subPictureBytes));
-
- if (saveLayerData) {
- pict->EXPERIMENTAL_addAccelData(saveLayerData);
- }
- return pict;
+ return SkNEW_ARGS(SkPicture, (fBounds,
+ SkRef(fRecord.get()),
+ pictList,
+ SkSafeRef(fBBH.get()),
+ saveLayerData.detach(),
+ subPictureBytes));
}
};
« no previous file with comments | « src/core/SkPicture.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698