diff options
author | bsalomon <bsalomon@google.com> | 2016-05-05 09:26:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-05 09:26:22 -0700 |
commit | d6f25bf0ef353da39859fb4173d2cf60d52277e4 (patch) | |
tree | bfe6ef191686532010689419d09120103971c438 /src/gpu/batches | |
parent | f0cf355b55eec7dacaa6c8e87c736e359b3ee278 (diff) |
Make GrPathRenderer only support fills for path stenciling
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1950893002
Review-Url: https://codereview.chromium.org/1950893002
Diffstat (limited to 'src/gpu/batches')
-rwxr-xr-x | src/gpu/batches/GrAADistanceFieldPathRenderer.h | 2 | ||||
-rw-r--r-- | src/gpu/batches/GrDashLinePathRenderer.h | 2 | ||||
-rw-r--r-- | src/gpu/batches/GrDefaultPathRenderer.cpp | 6 | ||||
-rw-r--r-- | src/gpu/batches/GrDefaultPathRenderer.h | 2 | ||||
-rw-r--r-- | src/gpu/batches/GrMSAAPathRenderer.cpp | 6 | ||||
-rw-r--r-- | src/gpu/batches/GrMSAAPathRenderer.h | 2 | ||||
-rw-r--r-- | src/gpu/batches/GrStencilAndCoverPathRenderer.cpp | 2 | ||||
-rw-r--r-- | src/gpu/batches/GrStencilAndCoverPathRenderer.h | 2 | ||||
-rw-r--r-- | src/gpu/batches/GrTessellatingPathRenderer.h | 2 |
9 files changed, 13 insertions, 13 deletions
diff --git a/src/gpu/batches/GrAADistanceFieldPathRenderer.h b/src/gpu/batches/GrAADistanceFieldPathRenderer.h index 200d315a97..099d0c7ebe 100755 --- a/src/gpu/batches/GrAADistanceFieldPathRenderer.h +++ b/src/gpu/batches/GrAADistanceFieldPathRenderer.h @@ -23,7 +23,7 @@ public: virtual ~GrAADistanceFieldPathRenderer(); private: - StencilSupport onGetStencilSupport(const SkPath&, const GrStrokeInfo&) const override { + StencilSupport onGetStencilSupport(const SkPath&) const override { return GrPathRenderer::kNoSupport_StencilSupport; } diff --git a/src/gpu/batches/GrDashLinePathRenderer.h b/src/gpu/batches/GrDashLinePathRenderer.h index af8324d6f0..e25f882d57 100644 --- a/src/gpu/batches/GrDashLinePathRenderer.h +++ b/src/gpu/batches/GrDashLinePathRenderer.h @@ -14,7 +14,7 @@ class GrDashLinePathRenderer : public GrPathRenderer { private: bool onCanDrawPath(const CanDrawPathArgs&) const override; - StencilSupport onGetStencilSupport(const SkPath&, const GrStrokeInfo&) const override { + StencilSupport onGetStencilSupport(const SkPath&) const override { return kNoSupport_StencilSupport; } diff --git a/src/gpu/batches/GrDefaultPathRenderer.cpp b/src/gpu/batches/GrDefaultPathRenderer.cpp index 708bcd7234..1de0bf771e 100644 --- a/src/gpu/batches/GrDefaultPathRenderer.cpp +++ b/src/gpu/batches/GrDefaultPathRenderer.cpp @@ -46,8 +46,8 @@ static inline bool single_pass_path(const SkPath& path, const SkStrokeRec& strok } GrPathRenderer::StencilSupport -GrDefaultPathRenderer::onGetStencilSupport(const SkPath& path, const GrStrokeInfo& stroke) const { - if (single_pass_path(path, stroke)) { +GrDefaultPathRenderer::onGetStencilSupport(const SkPath& path) const { + if (single_pass_path(path, SkStrokeRec(SkStrokeRec::kFill_InitStyle))) { return GrPathRenderer::kNoRestriction_StencilSupport; } else { return GrPathRenderer::kStencilOnly_StencilSupport; @@ -618,7 +618,7 @@ 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); + *args.fPath, GrStrokeInfo::FillInfo(), true); } /////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/gpu/batches/GrDefaultPathRenderer.h b/src/gpu/batches/GrDefaultPathRenderer.h index 9973c2be5e..8156462a51 100644 --- a/src/gpu/batches/GrDefaultPathRenderer.h +++ b/src/gpu/batches/GrDefaultPathRenderer.h @@ -22,7 +22,7 @@ public: private: - StencilSupport onGetStencilSupport(const SkPath&, const GrStrokeInfo&) const override; + StencilSupport onGetStencilSupport(const SkPath&) const override; bool onCanDrawPath(const CanDrawPathArgs&) const override; diff --git a/src/gpu/batches/GrMSAAPathRenderer.cpp b/src/gpu/batches/GrMSAAPathRenderer.cpp index 988952822a..a9ba06c5f4 100644 --- a/src/gpu/batches/GrMSAAPathRenderer.cpp +++ b/src/gpu/batches/GrMSAAPathRenderer.cpp @@ -37,8 +37,8 @@ static inline bool single_pass_path(const SkPath& path, const SkStrokeRec& strok } GrPathRenderer::StencilSupport -GrMSAAPathRenderer::onGetStencilSupport(const SkPath& path, const GrStrokeInfo& stroke) const { - if (single_pass_path(path, stroke)) { +GrMSAAPathRenderer::onGetStencilSupport(const SkPath& path) const { + if (single_pass_path(path, SkStrokeRec(SkStrokeRec::kFill_InitStyle))) { return GrPathRenderer::kNoRestriction_StencilSupport; } else { return GrPathRenderer::kStencilOnly_StencilSupport; @@ -739,7 +739,7 @@ void GrMSAAPathRenderer::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); + *args.fPath, GrStrokeInfo::FillInfo(), true); } /////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/gpu/batches/GrMSAAPathRenderer.h b/src/gpu/batches/GrMSAAPathRenderer.h index 0ffd280291..a35536014e 100644 --- a/src/gpu/batches/GrMSAAPathRenderer.h +++ b/src/gpu/batches/GrMSAAPathRenderer.h @@ -13,7 +13,7 @@ class SK_API GrMSAAPathRenderer : public GrPathRenderer { private: - StencilSupport onGetStencilSupport(const SkPath&, const GrStrokeInfo&) const override; + StencilSupport onGetStencilSupport(const SkPath&) const override; bool onCanDrawPath(const CanDrawPathArgs&) const override; diff --git a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp index 4aaea84957..6933efebe3 100644 --- a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp +++ b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp @@ -66,7 +66,7 @@ void GrStencilAndCoverPathRenderer::onStencilPath(const StencilPathArgs& args) { GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(), "GrStencilAndCoverPathRenderer::onStencilPath"); SkASSERT(!args.fPath->isInverseFillType()); - SkAutoTUnref<GrPath> p(get_gr_path(fResourceProvider, *args.fPath, *args.fStroke)); + SkAutoTUnref<GrPath> p(get_gr_path(fResourceProvider, *args.fPath, GrStrokeInfo::FillInfo())); args.fTarget->stencilPath(*args.fPipelineBuilder, *args.fViewMatrix, p, p->getFillType()); } diff --git a/src/gpu/batches/GrStencilAndCoverPathRenderer.h b/src/gpu/batches/GrStencilAndCoverPathRenderer.h index 8fec6c6342..cec8126e7b 100644 --- a/src/gpu/batches/GrStencilAndCoverPathRenderer.h +++ b/src/gpu/batches/GrStencilAndCoverPathRenderer.h @@ -24,7 +24,7 @@ public: private: - StencilSupport onGetStencilSupport(const SkPath&, const GrStrokeInfo&) const override { + StencilSupport onGetStencilSupport(const SkPath&) const override { return GrPathRenderer::kStencilOnly_StencilSupport; } diff --git a/src/gpu/batches/GrTessellatingPathRenderer.h b/src/gpu/batches/GrTessellatingPathRenderer.h index 7598ceb065..f1faa608a6 100644 --- a/src/gpu/batches/GrTessellatingPathRenderer.h +++ b/src/gpu/batches/GrTessellatingPathRenderer.h @@ -21,7 +21,7 @@ public: private: bool onCanDrawPath(const CanDrawPathArgs& ) const override; - StencilSupport onGetStencilSupport(const SkPath&, const GrStrokeInfo&) const override { + StencilSupport onGetStencilSupport(const SkPath&) const override { return GrPathRenderer::kNoSupport_StencilSupport; } |