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

Unified Diff: src/gpu/GrDefaultPathRenderer.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/GrDefaultPathRenderer.h ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDefaultPathRenderer.cpp
diff --git a/src/gpu/GrDefaultPathRenderer.cpp b/src/gpu/GrDefaultPathRenderer.cpp
index 77af9e9856511d2ab804b5778f8cffa4b7d3489e..9258bfb1d83f2fc09950d8432aab0021d9058ff1 100644
--- a/src/gpu/GrDefaultPathRenderer.cpp
+++ b/src/gpu/GrDefaultPathRenderer.cpp
@@ -702,42 +702,28 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawTarget* target,
return true;
}
-bool GrDefaultPathRenderer::canDrawPath(const GrDrawTarget* target,
- const GrPipelineBuilder* pipelineBuilder,
- const SkMatrix& viewMatrix,
- const SkPath& path,
- const GrStrokeInfo& stroke,
- bool antiAlias) const {
+bool GrDefaultPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
// this class can draw any path with any fill but doesn't do any anti-aliasing.
- return !antiAlias && (stroke.isFillStyle() || IsStrokeHairlineOrEquivalent(stroke,
- viewMatrix,
- NULL));
+ return !args.fAntiAlias && (args.fStroke->isFillStyle() ||
+ IsStrokeHairlineOrEquivalent(*args.fStroke, *args.fViewMatrix,
+ NULL));
}
-bool GrDefaultPathRenderer::onDrawPath(GrDrawTarget* target,
- GrPipelineBuilder* pipelineBuilder,
- GrColor color,
- const SkMatrix& viewMatrix,
- const SkPath& path,
- const GrStrokeInfo& stroke,
- bool antiAlias) {
- return this->internalDrawPath(target,
- pipelineBuilder,
- color,
- viewMatrix,
- path,
- stroke,
+bool GrDefaultPathRenderer::onDrawPath(const DrawPathArgs& args) {
+ return this->internalDrawPath(args.fTarget,
+ args.fPipelineBuilder,
+ args.fColor,
+ *args.fViewMatrix,
+ *args.fPath,
+ *args.fStroke,
false);
}
-void GrDefaultPathRenderer::onStencilPath(GrDrawTarget* target,
- GrPipelineBuilder* pipelineBuilder,
- const SkMatrix& viewMatrix,
- const SkPath& path,
- const GrStrokeInfo& stroke) {
- SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType());
- SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType());
- this->internalDrawPath(target, pipelineBuilder, GrColor_WHITE, viewMatrix, path, stroke, true);
+void GrDefaultPathRenderer::onStencilPath(const StencilPathArgs& args) {
+ SkASSERT(SkPath::kInverseEvenOdd_FillType != args.fPath->getFillType());
+ SkASSERT(SkPath::kInverseWinding_FillType != args.fPath->getFillType());
+ this->internalDrawPath(args.fTarget, args.fPipelineBuilder, GrColor_WHITE, *args.fViewMatrix,
+ *args.fPath, *args.fStroke, true);
}
///////////////////////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/gpu/GrDefaultPathRenderer.h ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698