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