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/SkRecorder.cpp | |
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/SkRecorder.cpp')
-rw-r--r-- | src/core/SkRecorder.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp index fb0bda7e0b..9b38bcd2b3 100644 --- a/src/core/SkRecorder.cpp +++ b/src/core/SkRecorder.cpp @@ -331,15 +331,13 @@ void SkRecorder::onDrawVertices(VertexMode vmode, const SkPoint texs[], const SkColor colors[], SkBlendMode bmode, const uint16_t indices[], int indexCount, const SkPaint& paint) { - APPEND(DrawVertices, paint, - vmode, - vertexCount, - this->copy(vertices, vertexCount), - texs ? this->copy(texs, vertexCount) : nullptr, - colors ? this->copy(colors, vertexCount) : nullptr, - bmode, - this->copy(indices, indexCount), - indexCount); + this->onDrawVerticesObject(SkVertices::MakeCopy(vmode, vertexCount, vertices, texs, colors, + indexCount, indices).get(), bmode, paint); +} + +void SkRecorder::onDrawVerticesObject(const SkVertices* vertices, SkBlendMode bmode, + const SkPaint& paint) { + APPEND(DrawVertices, paint, sk_ref_sp(const_cast<SkVertices*>(vertices)), bmode); } void SkRecorder::onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], |