| 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" | 10 #include "GrStencilAndCoverPathRenderer.h" |
| 11 #include "GrContext.h" | 11 #include "GrContext.h" |
| 12 #include "GrDrawTargetCaps.h" |
| 12 #include "GrGpu.h" | 13 #include "GrGpu.h" |
| 13 #include "GrPath.h" | 14 #include "GrPath.h" |
| 14 #include "SkStrokeRec.h" | 15 #include "SkStrokeRec.h" |
| 15 | 16 |
| 16 GrPathRenderer* GrStencilAndCoverPathRenderer::Create(GrContext* context) { | 17 GrPathRenderer* GrStencilAndCoverPathRenderer::Create(GrContext* context) { |
| 17 GrAssert(NULL != context); | 18 GrAssert(NULL != context); |
| 18 GrAssert(NULL != context->getGpu()); | 19 GrAssert(NULL != context->getGpu()); |
| 19 if (context->getGpu()->caps()->pathStencilingSupport()) { | 20 if (context->getGpu()->caps()->pathStencilingSupport()) { |
| 20 return SkNEW_ARGS(GrStencilAndCoverPathRenderer, (context->getGpu())); | 21 return SkNEW_ARGS(GrStencilAndCoverPathRenderer, (context->getGpu())); |
| 21 } else { | 22 } else { |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 adcd.set(drawState); | 114 adcd.set(drawState); |
| 114 bloat = 0; | 115 bloat = 0; |
| 115 } | 116 } |
| 116 *drawState->stencil() = kInvertedStencilPass; | 117 *drawState->stencil() = kInvertedStencilPass; |
| 117 } | 118 } |
| 118 bounds.outset(bloat, bloat); | 119 bounds.outset(bloat, bloat); |
| 119 target->drawSimpleRect(bounds, NULL); | 120 target->drawSimpleRect(bounds, NULL); |
| 120 target->drawState()->stencil()->setDisabled(); | 121 target->drawState()->stencil()->setDisabled(); |
| 121 return true; | 122 return true; |
| 122 } | 123 } |
| OLD | NEW |