aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrStencilAndCoverPathRenderer.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-10 19:10:17 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-10 19:10:17 +0000
commit45a15f551b5b3c6c747d8eaf6466b7d3b76a8fae (patch)
tree49c9fd68caf3a90c7ed5a1ac89f418d6ce7b4afb /src/gpu/GrStencilAndCoverPathRenderer.cpp
parent6f9286202831dd807daf9b1e39271da8f390210e (diff)
Modifications to GrPatherRenderer(Chain) interfaces to support clip mask manager.
R=robertphillips@google.com Review URL: https://codereview.appspot.com/6904069 git-svn-id: http://skia.googlecode.com/svn/trunk@6741 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrStencilAndCoverPathRenderer.cpp')
-rw-r--r--src/gpu/GrStencilAndCoverPathRenderer.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gpu/GrStencilAndCoverPathRenderer.cpp b/src/gpu/GrStencilAndCoverPathRenderer.cpp
index 28e18edf8d..a9bddda2b2 100644
--- a/src/gpu/GrStencilAndCoverPathRenderer.cpp
+++ b/src/gpu/GrStencilAndCoverPathRenderer.cpp
@@ -42,15 +42,16 @@ bool GrStencilAndCoverPathRenderer::canDrawPath(const SkPath& path,
target->getDrawState().getStencil().isDisabled();
}
-bool GrStencilAndCoverPathRenderer::requiresStencilPass(const SkPath& path,
- const SkStroke& stroke,
- const GrDrawTarget* target) const {
- return true;
+GrPathRenderer::StencilSupport GrStencilAndCoverPathRenderer::onGetStencilSupport(
+ const SkPath&,
+ const SkStroke& ,
+ const GrDrawTarget*) const {
+ return GrPathRenderer::kStencilOnly_StencilSupport;
}
-void GrStencilAndCoverPathRenderer::drawPathToStencil(const SkPath& path,
- const SkStroke& stroke,
- GrDrawTarget* target) {
+void GrStencilAndCoverPathRenderer::onStencilPath(const SkPath& path,
+ const SkStroke& stroke,
+ GrDrawTarget* target) {
GrAssert(!path.isInverseFillType());
SkAutoTUnref<GrPath> p(fGpu->createPath(path));
target->stencilPath(p, stroke, path.getFillType());