| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 | 8 |
| 9 #include "GrPathRendererChain.h" | 9 #include "GrPathRendererChain.h" |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 const GrCaps& caps = *context->caps(); | 29 const GrCaps& caps = *context->caps(); |
| 30 this->addPathRenderer(new GrDashLinePathRenderer)->unref(); | 30 this->addPathRenderer(new GrDashLinePathRenderer)->unref(); |
| 31 | 31 |
| 32 if (GrPathRenderer* pr = GrStencilAndCoverPathRenderer::Create(context->reso
urceProvider(), | 32 if (GrPathRenderer* pr = GrStencilAndCoverPathRenderer::Create(context->reso
urceProvider(), |
| 33 caps)) { | 33 caps)) { |
| 34 this->addPathRenderer(pr)->unref(); | 34 this->addPathRenderer(pr)->unref(); |
| 35 } | 35 } |
| 36 if (caps.sampleShadingSupport()) { | 36 if (caps.sampleShadingSupport()) { |
| 37 this->addPathRenderer(new GrMSAAPathRenderer)->unref(); | 37 this->addPathRenderer(new GrMSAAPathRenderer)->unref(); |
| 38 } | 38 } |
| 39 this->addPathRenderer(new GrTessellatingPathRenderer)->unref(); | |
| 40 this->addPathRenderer(new GrAAHairLinePathRenderer)->unref(); | 39 this->addPathRenderer(new GrAAHairLinePathRenderer)->unref(); |
| 41 this->addPathRenderer(new GrAAConvexPathRenderer)->unref(); | 40 this->addPathRenderer(new GrAAConvexPathRenderer)->unref(); |
| 42 this->addPathRenderer(new GrAALinearizingConvexPathRenderer)->unref(); | 41 this->addPathRenderer(new GrAALinearizingConvexPathRenderer)->unref(); |
| 43 if (caps.shaderCaps()->plsPathRenderingSupport()) { | 42 if (caps.shaderCaps()->plsPathRenderingSupport()) { |
| 44 this->addPathRenderer(new GrPLSPathRenderer)->unref(); | 43 this->addPathRenderer(new GrPLSPathRenderer)->unref(); |
| 45 } | 44 } |
| 46 this->addPathRenderer(new GrAADistanceFieldPathRenderer)->unref(); | 45 this->addPathRenderer(new GrAADistanceFieldPathRenderer)->unref(); |
| 46 this->addPathRenderer(new GrTessellatingPathRenderer)->unref(); |
| 47 this->addPathRenderer(new GrDefaultPathRenderer(caps.twoSidedStencilSupport(
), | 47 this->addPathRenderer(new GrDefaultPathRenderer(caps.twoSidedStencilSupport(
), |
| 48 caps.stencilWrapOpsSupport()
))->unref(); | 48 caps.stencilWrapOpsSupport()
))->unref(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 GrPathRendererChain::~GrPathRendererChain() { | 51 GrPathRendererChain::~GrPathRendererChain() { |
| 52 for (int i = 0; i < fChain.count(); ++i) { | 52 for (int i = 0; i < fChain.count(); ++i) { |
| 53 fChain[i]->unref(); | 53 fChain[i]->unref(); |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 | 56 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 continue; | 92 continue; |
| 93 } else if (stencilSupport) { | 93 } else if (stencilSupport) { |
| 94 *stencilSupport = support; | 94 *stencilSupport = support; |
| 95 } | 95 } |
| 96 } | 96 } |
| 97 return fChain[i]; | 97 return fChain[i]; |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 return nullptr; | 100 return nullptr; |
| 101 } | 101 } |
| OLD | NEW |