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

Unified Diff: src/core/SkPicture.cpp

Issue 746553002: SkData -> SkPicture::SnapshotArray (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ctor 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 | « 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 4848345e51c9cf81e33ad9c1b0d0b066a55456f6..a8e160f855f7a8aa7693d9de563c49c9a7360992 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -270,18 +270,11 @@ bool SkPicture::Analysis::suitableForGpuRasterization(const char** reason,
///////////////////////////////////////////////////////////////////////////////
int SkPicture::drawableCount() const {
- if (fDrawablePicts.get()) {
- return SkToInt(fDrawablePicts->size() / sizeof(SkPicture*));
- } else {
- return 0;
- }
+ return fDrawablePicts.get() ? fDrawablePicts->count() : 0;
}
SkPicture const* const* SkPicture::drawablePicts() const {
- if (fDrawablePicts) {
- return reinterpret_cast<SkPicture* const*>(fDrawablePicts->data());
- }
- return NULL;
+ return fDrawablePicts.get() ? fDrawablePicts->begin() : NULL;
}
SkPicture::~SkPicture() {
@@ -524,7 +517,7 @@ 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, SkData* drawablePicts,
+SkPicture::SkPicture(const SkRect& cullRect, SkRecord* record, SnapshotArray* drawablePicts,
SkBBoxHierarchy* bbh)
: fUniqueID(next_picture_generation_id())
, fCullRect(cullRect)
« 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