aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPictureData.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@google.com>2016-04-27 09:29:34 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-27 09:29:34 -0700
commit569b02151f399628b0c0c0ca825dfe7b6e2795e1 (patch)
tree8c10668cf5feee18fbe7fa3e691449753fe875f0 /src/core/SkPictureData.cpp
parentd636950e8ecba89c0021ce4e76037c67aa6ee2cd (diff)
Revert of Enable flattening of SkRecordedDrawable (patchset #8 id:140001 of https://codereview.chromium.org/1913843002/ )
Reason for revert: Release mode bots appear to be crashing while loading .skp files in nanobench. Original issue's description: > Enable flattening of SkRecordedDrawable > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1913843002 > > Committed: https://skia.googlesource.com/skia/+/d636950e8ecba89c0021ce4e76037c67aa6ee2cd TBR=djsollen@google.com,reed@google.com,msarett@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/1923393002
Diffstat (limited to 'src/core/SkPictureData.cpp')
-rw-r--r--src/core/SkPictureData.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/core/SkPictureData.cpp b/src/core/SkPictureData.cpp
index 4de1cc3cec..92aa2410ad 100644
--- a/src/core/SkPictureData.cpp
+++ b/src/core/SkPictureData.cpp
@@ -66,16 +66,6 @@ SkPictureData::SkPictureData(const SkPictureRecord& record,
}
}
- 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 @@ SkPictureData::SkPictureData(const SkPictureRecord& record,
void SkPictureData::init() {
fPictureRefs = nullptr;
fPictureCount = 0;
- fDrawableRefs = nullptr;
- fDrawableCount = 0;
fTextBlobRefs = nullptr;
fTextBlobCount = 0;
fImageRefs = nullptr;
@@ -114,14 +102,6 @@ SkPictureData::~SkPictureData() {
}
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();
}
@@ -326,13 +306,6 @@ void SkPictureData::flatten(SkWriteBuffer& buffer) const {
}
}
- if (fDrawableCount > 0) {
- write_tag_size(buffer, SK_PICT_DRAWABLE_TAG, fDrawableCount);
- for (int i = 0; i < fDrawableCount; i++) {
- buffer.writeFlattenable(fDrawableRefs[i]);
- }
- }
-
// Write this picture playback's data into a writebuffer
this->flattenToBuffer(buffer);
buffer.write32(SK_PICT_EOF_TAG);
@@ -477,10 +450,6 @@ static const SkPicture* create_picture_from_buffer(SkReadBuffer& buffer) {
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 @@ bool SkPictureData::parseBufferTag(SkReadBuffer& buffer, uint32_t tag, uint32_t
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;