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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 fChain[i]->getStencilSupp
ort(path, stroke); | 73 fChain[i]->getStencilSupp
ort(path, stroke); |
74 if (support < minStencilSupport) { | 74 if (support < minStencilSupport) { |
75 continue; | 75 continue; |
76 } else if (stencilSupport) { | 76 } else if (stencilSupport) { |
77 *stencilSupport = support; | 77 *stencilSupport = support; |
78 } | 78 } |
79 } | 79 } |
80 return fChain[i]; | 80 return fChain[i]; |
81 } | 81 } |
82 } | 82 } |
83 return NULL; | 83 return nullptr; |
84 } | 84 } |
85 | 85 |
86 void GrPathRendererChain::init() { | 86 void GrPathRendererChain::init() { |
87 SkASSERT(!fInit); | 87 SkASSERT(!fInit); |
88 const GrCaps* caps = fOwner->caps(); | 88 const GrCaps* caps = fOwner->caps(); |
89 bool twoSided = caps->twoSidedStencilSupport(); | 89 bool twoSided = caps->twoSidedStencilSupport(); |
90 bool wrapOp = caps->stencilWrapOpsSupport(); | 90 bool wrapOp = caps->stencilWrapOpsSupport(); |
91 GrPathRenderer::AddPathRenderers(fOwner, this); | 91 GrPathRenderer::AddPathRenderers(fOwner, this); |
92 this->addPathRenderer(new GrDefaultPathRenderer(twoSided, wrapOp))->unref(); | 92 this->addPathRenderer(new GrDefaultPathRenderer(twoSided, wrapOp))->unref(); |
93 fInit = true; | 93 fInit = true; |
94 } | 94 } |
OLD | NEW |