Index: src/gpu/GrAADistanceFieldPathRenderer.cpp |
diff --git a/src/gpu/GrAADistanceFieldPathRenderer.cpp b/src/gpu/GrAADistanceFieldPathRenderer.cpp |
index f0b6c7779b304e9072d62c370e95ea773eaae793..669ec09d97ae02ab629204199a5f22fc38500390 100755 |
--- a/src/gpu/GrAADistanceFieldPathRenderer.cpp |
+++ b/src/gpu/GrAADistanceFieldPathRenderer.cpp |
@@ -312,6 +312,10 @@ private: |
fAtlas = atlas; |
fPathCache = pathCache; |
fPathList = pathList; |
+ |
+ // Compute bounds |
+ fBounds = geometry.fPath.getBounds(); |
+ viewMatrix.mapRect(&fBounds); |
} |
bool addPathToAtlas(GrBatchTarget* batchTarget, |
@@ -548,6 +552,7 @@ private: |
} |
fGeoData.push_back_n(that->geoData()->count(), that->geoData()->begin()); |
+ this->joinBounds(that->bounds()); |
return true; |
} |
@@ -607,10 +612,7 @@ bool GrAADistanceFieldPathRenderer::onDrawPath(GrDrawTarget* target, |
SkAutoTUnref<GrBatch> batch(AADistanceFieldPathBatch::Create(geometry, color, viewMatrix, |
fAtlas, &fPathCache, &fPathList)); |
- |
- SkRect bounds = path.getBounds(); |
- viewMatrix.mapRect(&bounds); |
- target->drawBatch(pipelineBuilder, batch, &bounds); |
+ target->drawBatch(pipelineBuilder, batch); |
return true; |
} |