Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Unified Diff: src/gpu/GrAADistanceFieldPathRenderer.cpp

Issue 1121463002: Move bounds to GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « src/gpu/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698