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" |
11 | 11 |
12 #include "GrContext.h" | 12 #include "GrContext.h" |
13 #include "GrDefaultPathRenderer.h" | 13 #include "GrDefaultPathRenderer.h" |
| 14 #include "GrDrawTargetCaps.h" |
14 #include "GrGpu.h" | 15 #include "GrGpu.h" |
15 | 16 |
16 SK_DEFINE_INST_COUNT(GrPathRendererChain) | 17 SK_DEFINE_INST_COUNT(GrPathRendererChain) |
17 | 18 |
18 GrPathRendererChain::GrPathRendererChain(GrContext* context) | 19 GrPathRendererChain::GrPathRendererChain(GrContext* context) |
19 : fInit(false) | 20 : fInit(false) |
20 , fOwner(context) { | 21 , fOwner(context) { |
21 } | 22 } |
22 | 23 |
23 GrPathRendererChain::~GrPathRendererChain() { | 24 GrPathRendererChain::~GrPathRendererChain() { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 void GrPathRendererChain::init() { | 80 void GrPathRendererChain::init() { |
80 GrAssert(!fInit); | 81 GrAssert(!fInit); |
81 GrGpu* gpu = fOwner->getGpu(); | 82 GrGpu* gpu = fOwner->getGpu(); |
82 bool twoSided = gpu->caps()->twoSidedStencilSupport(); | 83 bool twoSided = gpu->caps()->twoSidedStencilSupport(); |
83 bool wrapOp = gpu->caps()->stencilWrapOpsSupport(); | 84 bool wrapOp = gpu->caps()->stencilWrapOpsSupport(); |
84 GrPathRenderer::AddPathRenderers(fOwner, this); | 85 GrPathRenderer::AddPathRenderers(fOwner, this); |
85 this->addPathRenderer(SkNEW_ARGS(GrDefaultPathRenderer, | 86 this->addPathRenderer(SkNEW_ARGS(GrDefaultPathRenderer, |
86 (twoSided, wrapOp)))->unref(); | 87 (twoSided, wrapOp)))->unref(); |
87 fInit = true; | 88 fInit = true; |
88 } | 89 } |
OLD | NEW |