aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrReducedClip.cpp
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2017-09-08 16:25:08 -0600
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-12 20:04:20 +0000
commitdb91c6e7fbfc9d1d8fd203f7e08eefb602e4a0b9 (patch)
treecb13d0253d2161a7e995bc94fc8cedb85df7dd04 /src/gpu/GrReducedClip.cpp
parenta640c49b7ecf667696542143edec96d10a940592 (diff)
Improve heuristics for when to use ccpr
Gives the convex and tessellating renderers first claim on larger paths, and the distance field renderer first claim on complex, non-volatile paths. This also requires plumbing the clip bounds through GrPathRenderer::CanDrawPathArgs. Bug: skia: Change-Id: I16e1d35ad5ee63251e33f113b1579cbba60456da Reviewed-on: https://skia-review.googlesource.com/42224 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/GrReducedClip.cpp')
-rw-r--r--src/gpu/GrReducedClip.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpu/GrReducedClip.cpp b/src/gpu/GrReducedClip.cpp
index ed5ce8a52d..22316c5c0a 100644
--- a/src/gpu/GrReducedClip.cpp
+++ b/src/gpu/GrReducedClip.cpp
@@ -743,6 +743,7 @@ bool GrReducedClip::drawStencilClipMask(GrContext* context,
GrShape shape(clipPath, GrStyle::SimpleFill());
GrPathRenderer::CanDrawPathArgs canDrawArgs;
canDrawArgs.fCaps = context->caps();
+ canDrawArgs.fClipConservativeBounds = &stencilClip.fixedClip().scissorRect();
canDrawArgs.fViewMatrix = &SkMatrix::I();
canDrawArgs.fShape = &shape;
canDrawArgs.fAAType = aaType;
@@ -793,6 +794,7 @@ bool GrReducedClip::drawStencilClipMask(GrContext* context,
&kDrawToStencil,
renderTargetContext,
&stencilClip.fixedClip(),
+ &stencilClip.fixedClip().scissorRect(),
&SkMatrix::I(),
&shape,
aaType,
@@ -803,6 +805,7 @@ bool GrReducedClip::drawStencilClipMask(GrContext* context,
args.fContext = context;
args.fRenderTargetContext = renderTargetContext;
args.fClip = &stencilClip.fixedClip();
+ args.fClipConservativeBounds = &stencilClip.fixedClip().scissorRect();
args.fViewMatrix = &SkMatrix::I();
args.fAAType = aaType;
args.fShape = &shape;
@@ -829,6 +832,7 @@ bool GrReducedClip::drawStencilClipMask(GrContext* context,
*pass,
renderTargetContext,
&stencilClip,
+ &stencilClip.fixedClip().scissorRect(),
&SkMatrix::I(),
&shape,
aaType,