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

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

Issue 1506823004: Remove drawPathsFromRange from GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: formatting Created 5 years 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/batches/GrDrawPathBatch.cpp ('k') | no next file » | 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"
11 #include "GrCaps.h" 11 #include "GrCaps.h"
12 #include "GrContext.h" 12 #include "GrContext.h"
13 #include "GrDrawPathBatch.h"
13 #include "GrGpu.h" 14 #include "GrGpu.h"
14 #include "GrPath.h" 15 #include "GrPath.h"
15 #include "GrRenderTarget.h" 16 #include "GrRenderTarget.h"
16 #include "GrResourceProvider.h" 17 #include "GrResourceProvider.h"
17 #include "GrStrokeInfo.h" 18 #include "GrStrokeInfo.h"
18 19
19 GrPathRenderer* GrStencilAndCoverPathRenderer::Create(GrResourceProvider* resour ceProvider, 20 GrPathRenderer* GrStencilAndCoverPathRenderer::Create(GrResourceProvider* resour ceProvider,
20 const GrCaps& caps) { 21 const GrCaps& caps) {
21 if (caps.shaderCaps()->pathRenderingSupport()) { 22 if (caps.shaderCaps()->pathRenderingSupport()) {
22 return new GrStencilAndCoverPathRenderer(resourceProvider); 23 return new GrStencilAndCoverPathRenderer(resourceProvider);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } else { 125 } else {
125 GR_STATIC_CONST_SAME_STENCIL(kStencilPass, 126 GR_STATIC_CONST_SAME_STENCIL(kStencilPass,
126 kZero_StencilOp, 127 kZero_StencilOp,
127 kKeep_StencilOp, 128 kKeep_StencilOp,
128 kNotEqual_StencilFunc, 129 kNotEqual_StencilFunc,
129 0xffff, 130 0xffff,
130 0x0000, 131 0x0000,
131 0xffff); 132 0xffff);
132 133
133 pipelineBuilder->setStencil(kStencilPass); 134 pipelineBuilder->setStencil(kStencilPass);
134 args.fTarget->drawPath(*pipelineBuilder, viewMatrix, args.fColor, p, p-> getFillType()); 135 SkAutoTUnref<GrDrawPathBatchBase> batch(
136 GrDrawPathBatch::Create(viewMatrix, args.fColor, p->getFillType( ), p));
137 args.fTarget->drawPathBatch(*pipelineBuilder, batch);
135 } 138 }
136 139
137 pipelineBuilder->stencil()->setDisabled(); 140 pipelineBuilder->stencil()->setDisabled();
138 return true; 141 return true;
139 } 142 }
OLDNEW
« no previous file with comments | « src/gpu/batches/GrDrawPathBatch.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698