Index: src/core/SkPictureData.cpp |
diff --git a/src/core/SkPictureData.cpp b/src/core/SkPictureData.cpp |
index 4de1cc3cec9e03b683a2388ad2f0b0f6248a7eb6..92aa2410ad824edb52904262b7008352d9449640 100644 |
--- a/src/core/SkPictureData.cpp |
+++ b/src/core/SkPictureData.cpp |
@@ -66,16 +66,6 @@ |
} |
} |
- const SkTDArray<SkDrawable* >& drawables = record.getDrawableRefs(); |
- fDrawableCount = drawables.count(); |
- if (fDrawableCount > 0) { |
- fDrawableRefs = new SkDrawable* [fDrawableCount]; |
- for (int i = 0; i < fDrawableCount; i++) { |
- fDrawableRefs[i] = drawables[i]; |
- fDrawableRefs[i]->ref(); |
- } |
- } |
- |
// templatize to consolidate with similar picture logic? |
const SkTDArray<const SkTextBlob*>& blobs = record.getTextBlobRefs(); |
fTextBlobCount = blobs.count(); |
@@ -99,8 +89,6 @@ |
void SkPictureData::init() { |
fPictureRefs = nullptr; |
fPictureCount = 0; |
- fDrawableRefs = nullptr; |
- fDrawableCount = 0; |
fTextBlobRefs = nullptr; |
fTextBlobCount = 0; |
fImageRefs = nullptr; |
@@ -113,14 +101,6 @@ |
fPictureRefs[i]->unref(); |
} |
delete[] fPictureRefs; |
- |
- for (int i = 0; i < fDrawableCount; i++) { |
- fDrawableRefs[i]->unref(); |
- } |
- if (fDrawableCount > 0) { |
- SkASSERT(fDrawableRefs); |
- delete[] fDrawableRefs; |
- } |
for (int i = 0; i < fTextBlobCount; i++) { |
fTextBlobRefs[i]->unref(); |
@@ -323,13 +303,6 @@ |
write_tag_size(buffer, SK_PICT_PICTURE_TAG, fPictureCount); |
for (int i = 0; i < fPictureCount; i++) { |
fPictureRefs[i]->flatten(buffer); |
- } |
- } |
- |
- if (fDrawableCount > 0) { |
- write_tag_size(buffer, SK_PICT_DRAWABLE_TAG, fDrawableCount); |
- for (int i = 0; i < fDrawableCount; i++) { |
- buffer.writeFlattenable(fDrawableRefs[i]); |
} |
} |
@@ -477,10 +450,6 @@ |
return SkPicture::MakeFromBuffer(buffer).release(); |
} |
-static const SkDrawable* create_drawable_from_buffer(SkReadBuffer& buffer) { |
- return (SkDrawable*) buffer.readFlattenable(SkFlattenable::kSkDrawable_Type); |
-} |
- |
template <typename T> |
bool new_array_from_buffer(SkReadBuffer& buffer, uint32_t inCount, |
const T*** array, int* outCount, const T* (*factory)(SkReadBuffer&)) { |
@@ -571,12 +540,6 @@ |
return false; |
} |
break; |
- case SK_PICT_DRAWABLE_TAG: |
- if (!new_array_from_buffer(buffer, size, (const SkDrawable***)&fDrawableRefs, |
- &fDrawableCount, create_drawable_from_buffer)) { |
- return false; |
- } |
- break; |
default: |
// The tag was invalid. |
return false; |