OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "GrStencilAndCoverPathRenderer.h" | 10 #include "GrStencilAndCoverPathRenderer.h" |
11 #include "GrAAHairLinePathRenderer.h" | 11 #include "GrAAHairLinePathRenderer.h" |
12 #include "GrAAConvexPathRenderer.h" | 12 #include "GrAAConvexPathRenderer.h" |
13 #include "GrAADistanceFieldPathRenderer.h" | 13 #include "GrAADistanceFieldPathRenderer.h" |
| 14 #include "GrDashLinePathRenderer.h" |
14 #include "GrTessellatingPathRenderer.h" | 15 #include "GrTessellatingPathRenderer.h" |
15 #if GR_STROKE_PATH_RENDERING | 16 #if GR_STROKE_PATH_RENDERING |
16 #include "../../experimental/StrokePathRenderer/GrStrokePathRenderer.h" | 17 #include "../../experimental/StrokePathRenderer/GrStrokePathRenderer.h" |
17 #endif | 18 #endif |
18 #if GR_ANDROID_PATH_RENDERING | 19 #if GR_ANDROID_PATH_RENDERING |
19 #include "../../experimental/AndroidPathRenderer/GrAndroidPathRenderer.h" | 20 #include "../../experimental/AndroidPathRenderer/GrAndroidPathRenderer.h" |
20 #endif | 21 #endif |
21 | 22 |
22 #ifndef GR_TESSELLATING_PATH_RENDERING | 23 #ifndef GR_TESSELLATING_PATH_RENDERING |
23 #define GR_TESSELLATING_PATH_RENDERING 1 | 24 #define GR_TESSELLATING_PATH_RENDERING 1 |
24 #endif | 25 #endif |
25 | 26 |
26 void GrPathRenderer::AddPathRenderers(GrContext* ctx, GrPathRendererChain* chain
) { | 27 void GrPathRenderer::AddPathRenderers(GrContext* ctx, GrPathRendererChain* chain
) { |
| 28 chain->addPathRenderer(SkNEW_ARGS(GrDashLinePathRenderer, (ctx)))->unref(); |
| 29 |
27 #if GR_STROKE_PATH_RENDERING | 30 #if GR_STROKE_PATH_RENDERING |
28 chain->addPathRenderer(SkNEW(GrStrokePathRenderer))->unref(); | 31 chain->addPathRenderer(SkNEW(GrStrokePathRenderer))->unref(); |
29 #endif | 32 #endif |
30 #if GR_ANDROID_PATH_RENDERING | 33 #if GR_ANDROID_PATH_RENDERING |
31 chain->addPathRenderer(SkNEW(GrAndroidPathRenderer))->unref(); | 34 chain->addPathRenderer(SkNEW(GrAndroidPathRenderer))->unref(); |
32 #endif | 35 #endif |
33 #if GR_TESSELLATING_PATH_RENDERING | 36 #if GR_TESSELLATING_PATH_RENDERING |
34 chain->addPathRenderer(new GrTessellatingPathRenderer)->unref(); | 37 chain->addPathRenderer(new GrTessellatingPathRenderer)->unref(); |
35 #endif | 38 #endif |
36 if (GrPathRenderer* pr = GrStencilAndCoverPathRenderer::Create(ctx)) { | 39 if (GrPathRenderer* pr = GrStencilAndCoverPathRenderer::Create(ctx)) { |
37 chain->addPathRenderer(pr)->unref(); | 40 chain->addPathRenderer(pr)->unref(); |
38 } | 41 } |
39 if (GrPathRenderer* pr = GrAAHairLinePathRenderer::Create(ctx)) { | 42 if (GrPathRenderer* pr = GrAAHairLinePathRenderer::Create(ctx)) { |
40 chain->addPathRenderer(pr)->unref(); | 43 chain->addPathRenderer(pr)->unref(); |
41 } | 44 } |
42 chain->addPathRenderer(SkNEW(GrAAConvexPathRenderer))->unref(); | 45 chain->addPathRenderer(SkNEW(GrAAConvexPathRenderer))->unref(); |
43 chain->addPathRenderer(SkNEW_ARGS(GrAADistanceFieldPathRenderer, (ctx)))->un
ref(); | 46 chain->addPathRenderer(SkNEW_ARGS(GrAADistanceFieldPathRenderer, (ctx)))->un
ref(); |
44 } | 47 } |
OLD | NEW |