| Index: src/gpu/GrAAConvexPathRenderer.cpp
|
| diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp
|
| index fc6cae68c62298fc26430154ae6c9090f47f2bf7..e76f0c805a07c07c682be9fbe00dfdf701faba15 100644
|
| --- a/src/gpu/GrAAConvexPathRenderer.cpp
|
| +++ b/src/gpu/GrAAConvexPathRenderer.cpp
|
| @@ -660,6 +660,24 @@ bool GrAAConvexPathRenderer::onDrawPath(const SkPath& origPath,
|
| SkSTArray<kPreallocDrawCnt, Draw, true> draws;
|
| create_vertices(segments, fanPt, &draws, verts, idxs);
|
|
|
| + // This is valid because all the computed verts are within 1 pixel of the path control points.
|
| + SkRect devBounds;
|
| + devBounds = origPath.getBounds();
|
| + adcd.getOriginalMatrix().mapRect(&devBounds);
|
| + devBounds.outset(SK_Scalar1, SK_Scalar1);
|
| +
|
| + // Check devBounds
|
| +#if GR_DEBUG
|
| + SkRect tolDevBounds = devBounds;
|
| + tolDevBounds.outset(SK_Scalar1 / 10000, SK_Scalar1 / 10000);
|
| + SkRect actualBounds;
|
| + actualBounds.set(verts[0].fPos, verts[1].fPos);
|
| + for (int i = 2; i < vCount; ++i) {
|
| + actualBounds.growToInclude(verts[i].fPos.fX, verts[i].fPos.fY);
|
| + }
|
| + GrAssert(tolDevBounds.contains(actualBounds));
|
| +#endif
|
| +
|
| int vOffset = 0;
|
| for (int i = 0; i < draws.count(); ++i) {
|
| const Draw& draw = draws[i];
|
| @@ -667,7 +685,8 @@ bool GrAAConvexPathRenderer::onDrawPath(const SkPath& origPath,
|
| vOffset, // start vertex
|
| 0, // start index
|
| draw.fVertexCnt,
|
| - draw.fIndexCnt);
|
| + draw.fIndexCnt,
|
| + &devBounds);
|
| vOffset += draw.fVertexCnt;
|
| }
|
|
|
|
|