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) |