bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
bsalomon@google.com | 69cc6ad | 2012-01-17 14:25:10 +0000 | [diff] [blame] | 3 | * Copyright 2012 Google Inc. |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | |
bsalomon@google.com | ded4f4b | 2012-06-28 18:48:06 +0000 | [diff] [blame] | 9 | |
| 10 | #include "GrStencilAndCoverPathRenderer.h" |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 11 | #include "GrAAHairLinePathRenderer.h" |
bsalomon@google.com | 69cc6ad | 2012-01-17 14:25:10 +0000 | [diff] [blame] | 12 | #include "GrAAConvexPathRenderer.h" |
sugoi@google.com | e3453cb | 2013-01-07 14:26:40 +0000 | [diff] [blame] | 13 | #if GR_STROKE_PATH_RENDERING |
| 14 | #include "../../experimental/StrokePathRenderer/GrStrokePathRenderer.h" |
| 15 | #endif |
jvanverth@google.com | 74dda90 | 2013-01-09 21:04:52 +0000 | [diff] [blame] | 16 | #if GR_ANDROID_PATH_RENDERING |
| 17 | #include "../../experimental/AndroidPathRenderer/GrAndroidPathRenderer.h" |
| 18 | #endif |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 19 | |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 20 | void GrPathRenderer::AddPathRenderers(GrContext* ctx, GrPathRendererChain* chain) { |
sugoi@google.com | e3453cb | 2013-01-07 14:26:40 +0000 | [diff] [blame] | 21 | #if GR_STROKE_PATH_RENDERING |
| 22 | chain->addPathRenderer(SkNEW(GrStrokePathRenderer))->unref(); |
| 23 | #endif |
jvanverth@google.com | 74dda90 | 2013-01-09 21:04:52 +0000 | [diff] [blame] | 24 | #if GR_ANDROID_PATH_RENDERING |
| 25 | chain->addPathRenderer(SkNEW(GrAndroidPathRenderer))->unref(); |
| 26 | #endif |
bsalomon@google.com | ded4f4b | 2012-06-28 18:48:06 +0000 | [diff] [blame] | 27 | if (GrPathRenderer* pr = GrStencilAndCoverPathRenderer::Create(ctx)) { |
| 28 | chain->addPathRenderer(pr)->unref(); |
| 29 | } |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 30 | if (GrPathRenderer* pr = GrAAHairLinePathRenderer::Create(ctx)) { |
| 31 | chain->addPathRenderer(pr)->unref(); |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 32 | } |
bsalomon@google.com | 45a15f5 | 2012-12-10 19:10:17 +0000 | [diff] [blame] | 33 | chain->addPathRenderer(SkNEW(GrAAConvexPathRenderer))->unref(); |
bsalomon@google.com | aeb2160 | 2011-08-30 18:13:44 +0000 | [diff] [blame] | 34 | } |