Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(928)

Side by Side Diff: src/gpu/GrStencilAndCoverPathRenderer.cpp

Issue 1116713002: Pull out shader-specific caps into GrShaderCaps and GrGLSLCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up some comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrPrimitiveProcessor.h ('k') | src/gpu/GrXferProcessor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 17 matching lines...) Expand all
28 return GrPathRendering::kWinding_FillType; 28 return GrPathRendering::kWinding_FillType;
29 case SkPath::kEvenOdd_FillType: 29 case SkPath::kEvenOdd_FillType:
30 case SkPath::kInverseEvenOdd_FillType: 30 case SkPath::kInverseEvenOdd_FillType:
31 return GrPathRendering::kEvenOdd_FillType; 31 return GrPathRendering::kEvenOdd_FillType;
32 } 32 }
33 } 33 }
34 34
35 GrPathRenderer* GrStencilAndCoverPathRenderer::Create(GrContext* context) { 35 GrPathRenderer* GrStencilAndCoverPathRenderer::Create(GrContext* context) {
36 SkASSERT(context); 36 SkASSERT(context);
37 SkASSERT(context->getGpu()); 37 SkASSERT(context->getGpu());
38 if (context->getGpu()->caps()->pathRenderingSupport()) { 38 if (context->getGpu()->caps()->shaderCaps()->pathRenderingSupport()) {
39 return SkNEW_ARGS(GrStencilAndCoverPathRenderer, (context->getGpu())); 39 return SkNEW_ARGS(GrStencilAndCoverPathRenderer, (context->getGpu()));
40 } else { 40 } else {
41 return NULL; 41 return NULL;
42 } 42 }
43 } 43 }
44 44
45 GrStencilAndCoverPathRenderer::GrStencilAndCoverPathRenderer(GrGpu* gpu) { 45 GrStencilAndCoverPathRenderer::GrStencilAndCoverPathRenderer(GrGpu* gpu) {
46 SkASSERT(gpu->caps()->pathRenderingSupport()); 46 SkASSERT(gpu->caps()->shaderCaps()->pathRenderingSupport());
47 fGpu = gpu; 47 fGpu = gpu;
48 gpu->ref(); 48 gpu->ref();
49 } 49 }
50 50
51 GrStencilAndCoverPathRenderer::~GrStencilAndCoverPathRenderer() { 51 GrStencilAndCoverPathRenderer::~GrStencilAndCoverPathRenderer() {
52 fGpu->unref(); 52 fGpu->unref();
53 } 53 }
54 54
55 bool GrStencilAndCoverPathRenderer::canDrawPath(const GrDrawTarget* target, 55 bool GrStencilAndCoverPathRenderer::canDrawPath(const GrDrawTarget* target,
56 const GrPipelineBuilder* pipelin eBuilder, 56 const GrPipelineBuilder* pipelin eBuilder,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 0xffff); 156 0xffff);
157 157
158 pipelineBuilder->setStencil(kStencilPass); 158 pipelineBuilder->setStencil(kStencilPass);
159 SkAutoTUnref<GrPathProcessor> pp(GrPathProcessor::Create(color, viewMatr ix)); 159 SkAutoTUnref<GrPathProcessor> pp(GrPathProcessor::Create(color, viewMatr ix));
160 target->drawPath(pipelineBuilder, pp, p, convert_skpath_filltype(path.ge tFillType())); 160 target->drawPath(pipelineBuilder, pp, p, convert_skpath_filltype(path.ge tFillType()));
161 } 161 }
162 162
163 pipelineBuilder->stencil()->setDisabled(); 163 pipelineBuilder->stencil()->setDisabled();
164 return true; 164 return true;
165 } 165 }
OLDNEW
« no previous file with comments | « src/gpu/GrPrimitiveProcessor.h ('k') | src/gpu/GrXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698