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

Unified Diff: src/core/SkPicture.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 | « 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 619be8b3ca1a9a8572494a496e74fd3e1eac8e99..c0148793542a7f84c8aff65175bcb345a5d6f9aa 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -241,10 +241,6 @@ SkPicture::~SkPicture() {
}
}
-void SkPicture::EXPERIMENTAL_addAccelData(const SkPicture::AccelData* data) const {
- fAccelData.reset(SkRef(data));
-}
-
const SkPicture::AccelData* SkPicture::EXPERIMENTAL_getAccelData(
SkPicture::AccelData::Key key) const {
if (fAccelData.get() && fAccelData->getKey() == key) {
@@ -452,13 +448,18 @@ bool SkPicture::hasText() const { return fAnalysis.fHasText; }
bool SkPicture::willPlayBackBitmaps() const { return fAnalysis.fWillPlaybackBitmaps; }
int SkPicture::approximateOpCount() const { return fRecord->count(); }
-SkPicture::SkPicture(const SkRect& cullRect, SkRecord* record, SnapshotArray* drawablePicts,
- SkBBoxHierarchy* bbh, size_t approxBytesUsedBySubPictures)
+SkPicture::SkPicture(const SkRect& cullRect,
+ SkRecord* record,
+ SnapshotArray* drawablePicts,
+ SkBBoxHierarchy* bbh,
+ AccelData* accelData,
+ size_t approxBytesUsedBySubPictures)
: fUniqueID(0)
, fCullRect(cullRect)
- , fRecord(record) // For performance, we take ownership of the caller's ref.
- , fBBH(bbh) // Ditto.
- , fDrawablePicts(drawablePicts) // take ownership
+ , fRecord(record) // Take ownership of caller's ref.
+ , fDrawablePicts(drawablePicts) // Take ownership.
+ , fBBH(bbh) // Take ownership of caller's ref.
+ , fAccelData(accelData) // Take ownership of caller's ref.
, 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