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

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

Issue 1407883004: Remove GrPipelineBuilder from getPathRenderer call (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Hide GrContext::drawingManager entry point Created 5 years, 1 month 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/GrPipelineBuilder.h ('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"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 GrStencilAndCoverPathRenderer::GrStencilAndCoverPathRenderer(GrResourceProvider* resourceProvider) 44 GrStencilAndCoverPathRenderer::GrStencilAndCoverPathRenderer(GrResourceProvider* resourceProvider)
45 : fResourceProvider(resourceProvider) { 45 : fResourceProvider(resourceProvider) {
46 } 46 }
47 47
48 bool GrStencilAndCoverPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) c onst { 48 bool GrStencilAndCoverPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) c onst {
49 if (args.fStroke->isHairlineStyle()) { 49 if (args.fStroke->isHairlineStyle()) {
50 return false; 50 return false;
51 } 51 }
52 if (!args.fPipelineBuilder->getStencil().isDisabled()) { 52 if (!args.fIsStencilDisabled) {
53 return false; 53 return false;
54 } 54 }
55 if (args.fAntiAlias) { 55 if (args.fAntiAlias) {
56 return args.fPipelineBuilder->getRenderTarget()->isStencilBufferMultisam pled(); 56 return args.fIsStencilBufferMSAA;
57 } else { 57 } else {
58 return true; // doesn't do per-path AA, relies on the target having MSAA 58 return true; // doesn't do per-path AA, relies on the target having MSAA
59 } 59 }
60 } 60 }
61 61
62 static GrPath* get_gr_path(GrResourceProvider* resourceProvider, const SkPath& s kPath, 62 static GrPath* get_gr_path(GrResourceProvider* resourceProvider, const SkPath& s kPath,
63 const GrStrokeInfo& stroke) { 63 const GrStrokeInfo& stroke) {
64 GrUniqueKey key; 64 GrUniqueKey key;
65 bool isVolatile; 65 bool isVolatile;
66 GrPath::ComputeKey(skPath, stroke, &key, &isVolatile); 66 GrPath::ComputeKey(skPath, stroke, &key, &isVolatile);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 0xffff); 146 0xffff);
147 147
148 pipelineBuilder->setStencil(kStencilPass); 148 pipelineBuilder->setStencil(kStencilPass);
149 args.fTarget->drawPath(*pipelineBuilder, viewMatrix, args.fColor, p, 149 args.fTarget->drawPath(*pipelineBuilder, viewMatrix, args.fColor, p,
150 convert_skpath_filltype(path.getFillType())); 150 convert_skpath_filltype(path.getFillType()));
151 } 151 }
152 152
153 pipelineBuilder->stencil()->setDisabled(); 153 pipelineBuilder->stencil()->setDisabled();
154 return true; 154 return true;
155 } 155 }
OLDNEW
« no previous file with comments | « src/gpu/GrPipelineBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698