Revert change of bounds computation in MSAA path renderer.
authorbsalomon <bsalomon@google.com>
Fri, 8 Jul 2016 16:14:07 +0000 (09:14 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 8 Jul 2016 16:14:07 +0000 (09:14 -0700)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2133773002

Review-Url: https://codereview.chromium.org/2133773002

src/gpu/batches/GrMSAAPathRenderer.cpp

index 51389ec..5b49e6b 100644 (file)
@@ -225,11 +225,12 @@ class MSAAPathBatch : public GrVertexBatch {
 public:
     DEFINE_BATCH_CLASS_ID
 
-    MSAAPathBatch(GrColor color, const SkPath& path, const SkMatrix& viewMatrix)
+    MSAAPathBatch(GrColor color, const SkPath& path, const SkMatrix& viewMatrix,
+                  const SkRect& devBounds)
             : INHERITED(ClassID())
             , fViewMatrix(viewMatrix) {
         fPaths.emplace_back(PathInfo{color, path});
-        this->setTransformedBounds(path.getBounds(), viewMatrix, HasAABloat::kNo, IsZeroArea::kNo);
+        this->setBounds(devBounds, HasAABloat::kNo, IsZeroArea::kNo);
         int contourCount;
         this->computeWorstCasePointCount(path, &contourCount, &fMaxLineVertices, &fMaxQuadVertices);
         fMaxLineIndices = fMaxLineVertices * 3;
@@ -668,7 +669,7 @@ bool GrMSAAPathRenderer::internalDrawPath(GrDrawContext* drawContext,
             drawContext->drawBatch(pipelineBuilder, clip, batch);
         } else {
             SkAutoTUnref<MSAAPathBatch> batch(new MSAAPathBatch(paint.getColor(), path,
-                                                                viewMatrix));
+                                                                viewMatrix, devBounds));
             if (!batch->isValid()) {
                 return false;
             }