OLD | NEW |
| (Empty) |
1 | |
2 /* | |
3 * Copyright 2012 Google Inc. | |
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 | |
9 | |
10 #include "GrContext.h" | |
11 #include "GrGpu.h" | |
12 | |
13 #include "batches/GrAAConvexPathRenderer.h" | |
14 #include "batches/GrAAHairLinePathRenderer.h" | |
15 #include "batches/GrAALinearizingConvexPathRenderer.h" | |
16 #include "batches/GrAADistanceFieldPathRenderer.h" | |
17 #include "batches/GrDashLinePathRenderer.h" | |
18 #include "batches/GrStencilAndCoverPathRenderer.h" | |
19 #include "batches/GrTessellatingPathRenderer.h" | |
20 | |
21 void GrPathRenderer::AddPathRenderers(GrContext* ctx, GrPathRendererChain* chain
) { | |
22 chain->addPathRenderer(new GrDashLinePathRenderer)->unref(); | |
23 | |
24 if (GrPathRenderer* pr = GrStencilAndCoverPathRenderer::Create(ctx->resource
Provider(), | |
25 *ctx->caps())
) { | |
26 chain->addPathRenderer(pr)->unref(); | |
27 } | |
28 chain->addPathRenderer(new GrTessellatingPathRenderer)->unref(); | |
29 if (GrPathRenderer* pr = GrAAHairLinePathRenderer::Create()) { | |
30 chain->addPathRenderer(pr)->unref(); | |
31 } | |
32 chain->addPathRenderer(new GrAAConvexPathRenderer)->unref(); | |
33 chain->addPathRenderer(new GrAALinearizingConvexPathRenderer)->unref(); | |
34 chain->addPathRenderer(new GrAADistanceFieldPathRenderer)->unref(); | |
35 } | |
OLD | NEW |