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

Unified Diff: src/gpu/GrAAConvexPathRenderer.cpp

Issue 1265763002: Args structs to GrPathRenderer functions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more Created 5 years, 5 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.h ('k') | src/gpu/GrAADistanceFieldPathRenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAAConvexPathRenderer.cpp
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp
index 7e65fccc4502b5d314e324b711af6140723263f7..344b11921cd161023ba30cd896db00be9ff9a8c7 100644
--- a/src/gpu/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/GrAAConvexPathRenderer.cpp
@@ -678,14 +678,10 @@ GrGeometryProcessor* QuadEdgeEffect::TestCreate(GrProcessorTestData* d) {
///////////////////////////////////////////////////////////////////////////////
-bool GrAAConvexPathRenderer::canDrawPath(const GrDrawTarget* target,
- const GrPipelineBuilder*,
- const SkMatrix& viewMatrix,
- const SkPath& path,
- const GrStrokeInfo& stroke,
- bool antiAlias) const {
- return (target->caps()->shaderCaps()->shaderDerivativeSupport() && antiAlias &&
- stroke.isFillStyle() && !path.isInverseFillType() && path.isConvex());
+bool GrAAConvexPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
+ return (args.fTarget->caps()->shaderCaps()->shaderDerivativeSupport() && args.fAntiAlias &&
+ args.fStroke->isFillStyle() && !args.fPath->isInverseFillType() &&
+ args.fPath->isConvex());
}
// extract the result vertices and indices from the GrAAConvexTessellator
@@ -988,24 +984,18 @@ private:
SkSTArray<1, Geometry, true> fGeoData;
};
-bool GrAAConvexPathRenderer::onDrawPath(GrDrawTarget* target,
- GrPipelineBuilder* pipelineBuilder,
- GrColor color,
- const SkMatrix& vm,
- const SkPath& path,
- const GrStrokeInfo&,
- bool antiAlias) {
- if (path.isEmpty()) {
+bool GrAAConvexPathRenderer::onDrawPath(const DrawPathArgs& args) {
+ if (args.fPath->isEmpty()) {
return true;
}
AAConvexPathBatch::Geometry geometry;
- geometry.fColor = color;
- geometry.fViewMatrix = vm;
- geometry.fPath = path;
+ geometry.fColor = args.fColor;
+ geometry.fViewMatrix = *args.fViewMatrix;
+ geometry.fPath = *args.fPath;
SkAutoTUnref<GrBatch> batch(AAConvexPathBatch::Create(geometry));
- target->drawBatch(*pipelineBuilder, batch);
+ args.fTarget->drawBatch(*args.fPipelineBuilder, batch);
return true;
« no previous file with comments | « src/gpu/GrAAConvexPathRenderer.h ('k') | src/gpu/GrAADistanceFieldPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698