| Index: src/gpu/GrSoftwarePathRenderer.cpp
|
| diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp
|
| index 5389a9bcb6b21921d6b7d0183567567d3910c341..401246ea5c6f7e0c3afb1f3298124d2d46a5061e 100644
|
| --- a/src/gpu/GrSoftwarePathRenderer.cpp
|
| +++ b/src/gpu/GrSoftwarePathRenderer.cpp
|
| @@ -12,16 +12,11 @@
|
| #include "GrVertexBuffer.h"
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| -bool GrSoftwarePathRenderer::canDrawPath(const GrDrawTarget*,
|
| - const GrPipelineBuilder*,
|
| - const SkMatrix& viewMatrix,
|
| - const SkPath&,
|
| - const GrStrokeInfo& stroke,
|
| - bool antiAlias) const {
|
| +bool GrSoftwarePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
|
| if (NULL == fContext) {
|
| return false;
|
| }
|
| - if (stroke.isDashed()) {
|
| + if (args.fStroke->isDashed()) {
|
| return false;
|
| }
|
| return true;
|
| @@ -117,41 +112,35 @@ void draw_around_inv_path(GrDrawTarget* target,
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // return true on success; false on failure
|
| -bool GrSoftwarePathRenderer::onDrawPath(GrDrawTarget* target,
|
| - GrPipelineBuilder* pipelineBuilder,
|
| - GrColor color,
|
| - const SkMatrix& viewMatrix,
|
| - const SkPath& path,
|
| - const GrStrokeInfo& stroke,
|
| - bool antiAlias) {
|
| +bool GrSoftwarePathRenderer::onDrawPath(const DrawPathArgs& args) {
|
| if (NULL == fContext) {
|
| return false;
|
| }
|
|
|
| SkIRect devPathBounds, devClipBounds;
|
| - if (!get_path_and_clip_bounds(target, pipelineBuilder, path, viewMatrix, &devPathBounds,
|
| - &devClipBounds)) {
|
| - if (path.isInverseFillType()) {
|
| - draw_around_inv_path(target, pipelineBuilder, color, viewMatrix, devClipBounds,
|
| - devPathBounds);
|
| + if (!get_path_and_clip_bounds(args.fTarget, args.fPipelineBuilder, *args.fPath,
|
| + *args.fViewMatrix, &devPathBounds, &devClipBounds)) {
|
| + if (args.fPath->isInverseFillType()) {
|
| + draw_around_inv_path(args.fTarget, args.fPipelineBuilder, args.fColor,
|
| + *args.fViewMatrix, devClipBounds, devPathBounds);
|
| }
|
| return true;
|
| }
|
|
|
| SkAutoTUnref<GrTexture> texture(
|
| - GrSWMaskHelper::DrawPathMaskToTexture(fContext, path, stroke,
|
| + GrSWMaskHelper::DrawPathMaskToTexture(fContext, *args.fPath, *args.fStroke,
|
| devPathBounds,
|
| - antiAlias, &viewMatrix));
|
| + args.fAntiAlias, args.fViewMatrix));
|
| if (NULL == texture) {
|
| return false;
|
| }
|
|
|
| - GrSWMaskHelper::DrawToTargetWithPathMask(texture, target, pipelineBuilder, color, viewMatrix,
|
| - devPathBounds);
|
| + GrSWMaskHelper::DrawToTargetWithPathMask(texture, args.fTarget, args.fPipelineBuilder,
|
| + args.fColor, *args.fViewMatrix, devPathBounds);
|
|
|
| - if (path.isInverseFillType()) {
|
| - draw_around_inv_path(target, pipelineBuilder, color, viewMatrix, devClipBounds,
|
| - devPathBounds);
|
| + if (args.fPath->isInverseFillType()) {
|
| + draw_around_inv_path(args.fTarget, args.fPipelineBuilder, args.fColor, *args.fViewMatrix,
|
| + devClipBounds, devPathBounds);
|
| }
|
|
|
| return true;
|
|
|