Remove historical assert in AAConvexPathRenderer
authorjoshualitt <joshualitt@chromium.org>
Fri, 20 Feb 2015 20:40:45 +0000 (12:40 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 20 Feb 2015 20:40:45 +0000 (12:40 -0800)
BUG=skia:

Review URL: https://codereview.chromium.org/944873004

src/gpu/GrAAConvexPathRenderer.cpp

index e3e0d5d..3ab8af5 100644 (file)
@@ -694,7 +694,6 @@ public:
         GrColor fColor;
         SkMatrix fViewMatrix;
         SkPath fPath;
-        SkDEBUGCODE(SkRect fDevBounds;)
     };
 
     static GrBatch* Create(const Geometry& geometry) {
@@ -730,7 +729,7 @@ public:
         int instanceCount = fGeoData.count();
 
         SkMatrix invert;
-        if (!this->viewMatrix().invert(&invert)) {
+        if (this->usesLocalCoords() && !this->viewMatrix().invert(&invert)) {
             SkDebugf("Could not invert viewmatrix\n");
             return;
         }
@@ -798,16 +797,6 @@ public:
             SkSTArray<kPreallocDrawCnt, Draw, true> draws;
             create_vertices(segments, fanPt, &draws, verts, idxs);
 
-#ifdef SK_DEBUG
-            // Check devBounds
-            SkRect actualBounds;
-            actualBounds.set(verts[0].fPos, verts[1].fPos);
-            for (int i = 2; i < vertexCount; ++i) {
-                actualBounds.growToInclude(verts[i].fPos.fX, verts[i].fPos.fY);
-            }
-            SkASSERT(args.fDevBounds.contains(actualBounds));
-#endif
-
             GrDrawTarget::DrawInfo info;
             info.setVertexBuffer(vertexBuffer);
             info.setIndexBuffer(indexBuffer);
@@ -886,7 +875,6 @@ bool GrAAConvexPathRenderer::onDrawPath(GrDrawTarget* target,
     geometry.fColor = color;
     geometry.fViewMatrix = vm;
     geometry.fPath = path;
-    SkDEBUGCODE(geometry.fDevBounds = devRect;)
 
     SkAutoTUnref<GrBatch> batch(AAConvexPathBatch::Create(geometry));
     target->drawBatch(pipelineBuilder, batch, &devRect);