aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRecordDraw.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-03-17 13:09:38 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-17 13:09:52 +0000
commit1eb3fef136bc75bd8e8ed717ec7c5d4ab26def62 (patch)
treef58f12a44fbbb8bdd4727b923b587cc6d2c34c9d /src/core/SkRecordDraw.cpp
parent73e21af21390c2806eb1350253233903808edd6b (diff)
Revert "More SkVertices implementation work"
This reverts commit 14583e11fd622c686993b741499060a6f3527055. Reason for revert: leaking Direct leak of 499104 byte(s) in 2112 object(s) allocated from: #0 0x1e195f0 in operator new(unsigned long) (/b/swarm_slave/w/irazbR79/out/Debug/dm+0x1e195f0) #1 0x3142b0a in SkVertices::Builder::init(SkCanvas::VertexMode, int, int, SkVertices::Sizes const&) (/b/swarm_slave/w/irazbR79/out/Debug/dm+0x3142b0a) Original change's description: > More SkVertices implementation work > > - change virtuals to take const SkVertices*, as we do for TextBobs and Images > - override onDrawVerticesObject in recording canvases > - deserialize raw-vertices into SkVertices object > > Possibly a follow-on would intercept the raw-form directly in canvas, > and remove the virtual, and only support the object form. > > BUG=skia:6366 > > Change-Id: I57a932667ccb3b3b004beb802ac3ae6898e3c6e0 > Reviewed-on: https://skia-review.googlesource.com/9633 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:6366 Change-Id: I40bb7a20698ef6aa0a9ef71a3d6ac4c1473e081c Reviewed-on: https://skia-review.googlesource.com/9825 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core/SkRecordDraw.cpp')
-rw-r--r--src/core/SkRecordDraw.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp
index 21f9de956b..8ca3f06513 100644
--- a/src/core/SkRecordDraw.cpp
+++ b/src/core/SkRecordDraw.cpp
@@ -134,7 +134,8 @@ DRAW(DrawTextOnPath, drawTextOnPath(r.text, r.byteLength, r.path, &r.matrix, r.p
DRAW(DrawTextRSXform, drawTextRSXform(r.text, r.byteLength, r.xforms, r.cull, r.paint));
DRAW(DrawAtlas, drawAtlas(r.atlas.get(),
r.xforms, r.texs, r.colors, r.count, r.mode, r.cull, r.paint));
-DRAW(DrawVertices, drawVertices(r.vertices, r.bmode, r.paint));
+DRAW(DrawVertices, drawVertices(r.vmode, r.vertexCount, r.vertices, r.texs, r.colors,
+ r.bmode, r.indices, r.indexCount, r.paint));
DRAW(DrawAnnotation, drawAnnotation(r.rect, r.key.c_str(), r.value.get()));
#undef DRAW
@@ -453,7 +454,9 @@ private:
return this->adjustAndMap(dst, &op.paint);
}
Bounds bounds(const DrawVertices& op) const {
- return this->adjustAndMap(op.vertices->bounds(), &op.paint);
+ SkRect dst;
+ dst.set(op.vertices, op.vertexCount);
+ return this->adjustAndMap(dst, &op.paint);
}
Bounds bounds(const DrawAtlas& op) const {