aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPicture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkPicture.cpp')
-rw-r--r--src/core/SkPicture.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index 4848345e51..a8e160f855 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)