Revert[2] "More SkVertices implementation work""
The fix was to release the array of vertices in the picturerecorder
destructor (where we also release textblobs etc.
This reverts commit 1eb3fef136bc75bd8e8ed717ec7c5d4ab26def62.
BUG=skia:
Change-Id: I3bf4acd6ad209205b0832a3cb7f94cd89dfcefc5
Reviewed-on: https://skia-review.googlesource.com/9826
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/src/core/SkPictureRecord.h b/src/core/SkPictureRecord.h
index 587233c..197684e 100644
--- a/src/core/SkPictureRecord.h
+++ b/src/core/SkPictureRecord.h
@@ -44,7 +44,11 @@
return fTextBlobRefs;
}
- const SkTDArray<const SkImage* >& getImageRefs() const {
+ const SkTDArray<const SkVertices* >& getVerticesRefs() const {
+ return fVerticesRefs;
+ }
+
+ const SkTDArray<const SkImage* >& getImageRefs() const {
return fImageRefs;
}
@@ -141,6 +145,7 @@
void addRegion(const SkRegion& region);
void addText(const void* text, size_t byteLength);
void addTextBlob(const SkTextBlob* blob);
+ void addVertices(const SkVertices*);
int find(const SkBitmap& bitmap);
@@ -204,10 +209,7 @@
const SkColor colors[], SkBlendMode,
const uint16_t indices[], int indexCount,
const SkPaint&) override;
- void onDrawVerticesObject(sk_sp<SkVertices> vertices, SkBlendMode mode, const SkPaint& paint,
- uint32_t flags) override {
- this->onDrawVerticesObjectFallback(std::move(vertices), mode, paint, flags);
- }
+ void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
void onClipRect(const SkRect&, SkClipOp, ClipEdgeStyle) override;
void onClipRRect(const SkRRect&, SkClipOp, ClipEdgeStyle) override;
@@ -277,6 +279,7 @@
SkTDArray<const SkPicture*> fPictureRefs;
SkTDArray<SkDrawable*> fDrawableRefs;
SkTDArray<const SkTextBlob*> fTextBlobRefs;
+ SkTDArray<const SkVertices*> fVerticesRefs;
uint32_t fRecordFlags;
int fInitialSaveCount;