aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPathRendererChain.cpp
diff options
context:
space:
mode:
authorGravatar senorblanco <senorblanco@chromium.org>2016-08-31 08:41:57 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-31 08:41:57 -0700
commit9992bdef8ae97b3e5b109d278ccfab84c66bcbf0 (patch)
tree65fb6c71cdbb90c72e13ab89709ca6aa5a43daf2 /src/gpu/GrPathRendererChain.cpp
parent4bcd62e3313da60c3aa96ccd12b7ea440c7266d4 (diff)
Screenspace AA tessellated GPU path rendering.
This is an approach to antialiased concave path rendering on the GPU without using MSAA. It uses GrTessellator to extract boundary contours from the given path, then inflates by half a pixel in screen space each direction, then renders the result with zero alpha on the outer contour and one alpha on in the inner contour. This requires two passes through the tessellation code: one to extract the boundaries, then one to tessellate the result. This gives approximately a 3X improvement on the IE chalkboard demo in non-MSAA mode, a 30-40% improvement on MotionMark's "Fill Paths", and a ~3X improvement on MotionMark's "canvas arcTo segments". It works best for large, simple paths, so there's currently a limit of 10 verbs in the onCanDrawPath() check. This dovetails nicely with the distance field path renderer's support for small, detailed (and cached) paths. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1152733009 Review-Url: https://codereview.chromium.org/1152733009
Diffstat (limited to 'src/gpu/GrPathRendererChain.cpp')
-rw-r--r--src/gpu/GrPathRendererChain.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/GrPathRendererChain.cpp b/src/gpu/GrPathRendererChain.cpp
index bed56f8b86..44dc343952 100644
--- a/src/gpu/GrPathRendererChain.cpp
+++ b/src/gpu/GrPathRendererChain.cpp
@@ -36,7 +36,6 @@ GrPathRendererChain::GrPathRendererChain(GrContext* context) {
if (caps.sampleShadingSupport()) {
this->addPathRenderer(new GrMSAAPathRenderer)->unref();
}
- this->addPathRenderer(new GrTessellatingPathRenderer)->unref();
this->addPathRenderer(new GrAAHairLinePathRenderer)->unref();
this->addPathRenderer(new GrAAConvexPathRenderer)->unref();
this->addPathRenderer(new GrAALinearizingConvexPathRenderer)->unref();
@@ -44,6 +43,7 @@ GrPathRendererChain::GrPathRendererChain(GrContext* context) {
this->addPathRenderer(new GrPLSPathRenderer)->unref();
}
this->addPathRenderer(new GrAADistanceFieldPathRenderer)->unref();
+ this->addPathRenderer(new GrTessellatingPathRenderer)->unref();
this->addPathRenderer(new GrDefaultPathRenderer(caps.twoSidedStencilSupport(),
caps.stencilWrapOpsSupport()))->unref();
}