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

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

Issue 2064753003: Remove style application from GrPathRenderer subclasses (Closed) Base URL: https://chromium.googlesource.com/skia.git@pathshape
Patch Set: Remove random style from DF batch test create, since it now only allows simple fill Created 4 years, 5 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/batches/GrMSAAPathRenderer.cpp ('k') | src/gpu/batches/GrTessellatingPathRenderer.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 * 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 } else { 26 } else {
27 return nullptr; 27 return nullptr;
28 } 28 }
29 } 29 }
30 30
31 GrStencilAndCoverPathRenderer::GrStencilAndCoverPathRenderer(GrResourceProvider* resourceProvider) 31 GrStencilAndCoverPathRenderer::GrStencilAndCoverPathRenderer(GrResourceProvider* resourceProvider)
32 : fResourceProvider(resourceProvider) { 32 : fResourceProvider(resourceProvider) {
33 } 33 }
34 34
35 bool GrStencilAndCoverPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) c onst { 35 bool GrStencilAndCoverPathRenderer::onCanDrawPath(const CanDrawPathArgs& args) c onst {
36 // GrPath doesn't support hairline paths. 36 // GrPath doesn't support hairline paths. An arbitrary path effect could pro duce a hairline
37 if (args.fShape->style().couldBeHairline()) { 37 // path.
38 if (args.fShape->style().strokeRec().isHairlineStyle() ||
39 args.fShape->style().hasNonDashPathEffect()) {
38 return false; 40 return false;
39 } 41 }
40 if (args.fHasUserStencilSettings) { 42 if (args.fHasUserStencilSettings) {
41 return false; 43 return false;
42 } 44 }
43 if (args.fAntiAlias) { 45 if (args.fAntiAlias) {
44 return args.fIsStencilBufferMSAA; 46 return args.fIsStencilBufferMSAA;
45 } else { 47 } else {
46 return true; // doesn't do per-path AA, relies on the target having MSAA 48 return true; // doesn't do per-path AA, relies on the target having MSAA
47 } 49 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 if (args.fAntiAlias) { 172 if (args.fAntiAlias) {
171 SkASSERT(args.fDrawContext->isStencilBufferMultisampled()); 173 SkASSERT(args.fDrawContext->isStencilBufferMultisampled());
172 pipelineBuilder.enableState(GrPipelineBuilder::kHWAntialias_Flag); 174 pipelineBuilder.enableState(GrPipelineBuilder::kHWAntialias_Flag);
173 } 175 }
174 176
175 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); 177 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
176 } 178 }
177 179
178 return true; 180 return true;
179 } 181 }
OLDNEW
« no previous file with comments | « src/gpu/batches/GrMSAAPathRenderer.cpp ('k') | src/gpu/batches/GrTessellatingPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698