| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 "GrPathRendererChain.h" | 10 #include "GrPathRendererChain.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 | 59 |
| 60 for (int i = 0; i < fChain.count(); ++i) { | 60 for (int i = 0; i < fChain.count(); ++i) { |
| 61 if (fChain[i]->canDrawPath(path, stroke, target, antiAlias)) { | 61 if (fChain[i]->canDrawPath(path, stroke, target, antiAlias)) { |
| 62 if (GrPathRenderer::kNoSupport_StencilSupport != minStencilSupport)
{ | 62 if (GrPathRenderer::kNoSupport_StencilSupport != minStencilSupport)
{ |
| 63 GrPathRenderer::StencilSupport support = fChain[i]->getStencilSu
pport(path, | 63 GrPathRenderer::StencilSupport support = fChain[i]->getStencilSu
pport(path, |
| 64
stroke, | 64
stroke, |
| 65
target); | 65
target); |
| 66 if (support < minStencilSupport) { | 66 if (support < minStencilSupport) { |
| 67 continue; | 67 continue; |
| 68 } else if (NULL != stencilSupport) { | 68 } else if (stencilSupport) { |
| 69 *stencilSupport = support; | 69 *stencilSupport = support; |
| 70 } | 70 } |
| 71 } | 71 } |
| 72 return fChain[i]; | 72 return fChain[i]; |
| 73 } | 73 } |
| 74 } | 74 } |
| 75 return NULL; | 75 return NULL; |
| 76 } | 76 } |
| 77 | 77 |
| 78 void GrPathRendererChain::init() { | 78 void GrPathRendererChain::init() { |
| 79 SkASSERT(!fInit); | 79 SkASSERT(!fInit); |
| 80 GrGpu* gpu = fOwner->getGpu(); | 80 GrGpu* gpu = fOwner->getGpu(); |
| 81 bool twoSided = gpu->caps()->twoSidedStencilSupport(); | 81 bool twoSided = gpu->caps()->twoSidedStencilSupport(); |
| 82 bool wrapOp = gpu->caps()->stencilWrapOpsSupport(); | 82 bool wrapOp = gpu->caps()->stencilWrapOpsSupport(); |
| 83 GrPathRenderer::AddPathRenderers(fOwner, this); | 83 GrPathRenderer::AddPathRenderers(fOwner, this); |
| 84 this->addPathRenderer(SkNEW_ARGS(GrDefaultPathRenderer, | 84 this->addPathRenderer(SkNEW_ARGS(GrDefaultPathRenderer, |
| 85 (twoSided, wrapOp)))->unref(); | 85 (twoSided, wrapOp)))->unref(); |
| 86 fInit = true; | 86 fInit = true; |
| 87 } | 87 } |
| OLD | NEW |