| Index: src/gpu/GrDefaultPathRenderer.cpp
|
| diff --git a/src/gpu/GrDefaultPathRenderer.cpp b/src/gpu/GrDefaultPathRenderer.cpp
|
| index 531b5e5f4a8128cedbb5870410078de2b7b1d00a..13eb6e4c8f8855bfa0ede8bfbeed241ebc2c32f9 100644
|
| --- a/src/gpu/GrDefaultPathRenderer.cpp
|
| +++ b/src/gpu/GrDefaultPathRenderer.cpp
|
| @@ -14,6 +14,7 @@
|
| #include "GrDefaultGeoProcFactory.h"
|
| #include "GrPathUtils.h"
|
| #include "GrPipelineBuilder.h"
|
| +#include "GrStrokeInfo.h"
|
| #include "SkGeometry.h"
|
| #include "SkString.h"
|
| #include "SkStrokeRec.h"
|
| @@ -170,8 +171,8 @@ GrPathRenderer::StencilSupport
|
| GrDefaultPathRenderer::onGetStencilSupport(const GrDrawTarget*,
|
| const GrPipelineBuilder*,
|
| const SkPath& path,
|
| - const SkStrokeRec& stroke) const {
|
| - if (single_pass_path(path, stroke)) {
|
| + const GrStrokeInfo& stroke) const {
|
| + if (single_pass_path(path, stroke.getStrokeRec())) {
|
| return GrPathRenderer::kNoRestriction_StencilSupport;
|
| } else {
|
| return GrPathRenderer::kStencilOnly_StencilSupport;
|
| @@ -545,9 +546,9 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawTarget* target,
|
| GrColor color,
|
| const SkMatrix& viewMatrix,
|
| const SkPath& path,
|
| - const SkStrokeRec& origStroke,
|
| + const GrStrokeInfo& origStroke,
|
| bool stencilOnly) {
|
| - SkTCopyOnFirstWrite<SkStrokeRec> stroke(origStroke);
|
| + SkTCopyOnFirstWrite<SkStrokeRec> stroke(origStroke.getStrokeRec());
|
|
|
| SkScalar hairlineCoverage;
|
| uint8_t newCoverage = 0xff;
|
| @@ -719,12 +720,11 @@ bool GrDefaultPathRenderer::canDrawPath(const GrDrawTarget* target,
|
| const GrPipelineBuilder* pipelineBuilder,
|
| const SkMatrix& viewMatrix,
|
| const SkPath& path,
|
| - const SkStrokeRec& stroke,
|
| + const GrStrokeInfo& stroke,
|
| bool antiAlias) 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 !antiAlias && (stroke.getStrokeRec().isFillStyle() ||
|
| + IsStrokeHairlineOrEquivalent(stroke.getStrokeRec(), viewMatrix, NULL));
|
| }
|
|
|
| bool GrDefaultPathRenderer::onDrawPath(GrDrawTarget* target,
|
| @@ -732,7 +732,7 @@ bool GrDefaultPathRenderer::onDrawPath(GrDrawTarget* target,
|
| GrColor color,
|
| const SkMatrix& viewMatrix,
|
| const SkPath& path,
|
| - const SkStrokeRec& stroke,
|
| + const GrStrokeInfo& stroke,
|
| bool antiAlias) {
|
| return this->internalDrawPath(target,
|
| pipelineBuilder,
|
| @@ -747,7 +747,7 @@ void GrDefaultPathRenderer::onStencilPath(GrDrawTarget* target,
|
| GrPipelineBuilder* pipelineBuilder,
|
| const SkMatrix& viewMatrix,
|
| const SkPath& path,
|
| - const SkStrokeRec& stroke) {
|
| + 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);
|
|
|