diff options
author | Mike Reed <reed@google.com> | 2017-03-17 09:50:46 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-17 14:27:33 +0000 |
commit | e88a1cb20e6b4c9f099070112225a88693a4630b (patch) | |
tree | c35774aef5ec56eb377d5bb9ed1ea2694e72efc6 /src/core/SkPictureData.h | |
parent | a392dbaa998e9f137103f7a7e86f89cb7224552f (diff) |
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>
Diffstat (limited to 'src/core/SkPictureData.h')
-rw-r--r-- | src/core/SkPictureData.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/SkPictureData.h b/src/core/SkPictureData.h index 332b799638..37a02373be 100644 --- a/src/core/SkPictureData.h +++ b/src/core/SkPictureData.h @@ -68,6 +68,7 @@ public: #define SK_PICT_PAINT_BUFFER_TAG SkSetFourByteTag('p', 'n', 't', ' ') #define SK_PICT_PATH_BUFFER_TAG SkSetFourByteTag('p', 't', 'h', ' ') #define SK_PICT_TEXTBLOB_BUFFER_TAG SkSetFourByteTag('b', 'l', 'o', 'b') +#define SK_PICT_VERTICES_BUFFER_TAG SkSetFourByteTag('v', 'e', 'r', 't') #define SK_PICT_IMAGE_BUFFER_TAG SkSetFourByteTag('i', 'm', 'a', 'g') // Always write this guy last (with no length field afterwards) @@ -143,6 +144,11 @@ public: return reader->validateIndex(index, fTextBlobCount) ? fTextBlobRefs[index] : nullptr; } + const SkVertices* getVertices(SkReadBuffer* reader) const { + const int index = reader->readInt() - 1; + return reader->validateIndex(index, fVerticesCount) ? fVerticesRefs[index] : nullptr; + } + #if SK_SUPPORT_GPU /** * sampleCount is the number of samples-per-pixel or zero if non-MSAA. @@ -185,6 +191,8 @@ private: int fDrawableCount; const SkTextBlob** fTextBlobRefs; int fTextBlobCount; + const SkVertices** fVerticesRefs; + int fVerticesCount; const SkImage** fImageRefs; int fImageCount; const SkImage** fBitmapImageRefs; |