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

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

Issue 1965903002: Fix nvpr path renderer to reject styles with nonDashPathEffects. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 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 | « no previous file | 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 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "GrStencilAndCoverPathRenderer.h" 9 #include "GrStencilAndCoverPathRenderer.h"
10 #include "GrCaps.h" 10 #include "GrCaps.h"
(...skipping 15 matching lines...) Expand all
26 } 26 }
27 } 27 }
28 28
29 GrStencilAndCoverPathRenderer::GrStencilAndCoverPathRenderer(GrResourceProvider* resourceProvider) 29 GrStencilAndCoverPathRenderer::GrStencilAndCoverPathRenderer(GrResourceProvider* resourceProvider)
30 : fResourceProvider(resourceProvider) { 30 : fResourceProvider(resourceProvider) {
31 } 31 }
32 32
33 bool GrStencilAndCoverPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) c onst { 33 bool GrStencilAndCoverPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) c onst {
34 // GrPath doesn't support hairline paths. Also, an arbitrary path effect cou ld change 34 // GrPath doesn't support hairline paths. Also, an arbitrary path effect cou ld change
35 // the style type to hairline. 35 // the style type to hairline.
36 if (!args.fStyle->hasNonDashPathEffect() || args.fStyle->strokeRec().isHairl ineStyle()) { 36 if (args.fStyle->hasNonDashPathEffect() || args.fStyle->strokeRec().isHairli neStyle()) {
37 return false; 37 return false;
38 } 38 }
39 if (!args.fIsStencilDisabled) { 39 if (!args.fIsStencilDisabled) {
40 return false; 40 return false;
41 } 41 }
42 if (args.fAntiAlias) { 42 if (args.fAntiAlias) {
43 return args.fIsStencilBufferMSAA; 43 return args.fIsStencilBufferMSAA;
44 } else { 44 } else {
45 return true; // doesn't do per-path AA, relies on the target having MSAA 45 return true; // doesn't do per-path AA, relies on the target having MSAA
46 } 46 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 pipelineBuilder->setStencil(kStencilPass); 144 pipelineBuilder->setStencil(kStencilPass);
145 SkAutoTUnref<GrDrawPathBatchBase> batch( 145 SkAutoTUnref<GrDrawPathBatchBase> batch(
146 GrDrawPathBatch::Create(viewMatrix, args.fColor, p->getFillType( ), p)); 146 GrDrawPathBatch::Create(viewMatrix, args.fColor, p->getFillType( ), p));
147 args.fTarget->drawPathBatch(*pipelineBuilder, batch); 147 args.fTarget->drawPathBatch(*pipelineBuilder, batch);
148 } 148 }
149 149
150 pipelineBuilder->stencil()->setDisabled(); 150 pipelineBuilder->stencil()->setDisabled();
151 return true; 151 return true;
152 } 152 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698