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

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

Issue 1967513002: Revert of Replace GrStrokeInfo with GrStyle. (Closed) Base URL: https://chromium.googlesource.com/skia.git@resscale
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 | « src/gpu/GrPathRenderer.h ('k') | src/gpu/GrPathRendering.h » ('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 2011 Google Inc. 2 * Copyright 2011 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 "GrPathRendererChain.h" 9 #include "GrPathRendererChain.h"
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 if (kStencilOnly_DrawType == drawType) { 72 if (kStencilOnly_DrawType == drawType) {
73 minStencilSupport = GrPathRenderer::kStencilOnly_StencilSupport; 73 minStencilSupport = GrPathRenderer::kStencilOnly_StencilSupport;
74 } else if (kStencilAndColor_DrawType == drawType || 74 } else if (kStencilAndColor_DrawType == drawType ||
75 kStencilAndColorAntiAlias_DrawType == drawType) { 75 kStencilAndColorAntiAlias_DrawType == drawType) {
76 minStencilSupport = GrPathRenderer::kNoRestriction_StencilSupport; 76 minStencilSupport = GrPathRenderer::kNoRestriction_StencilSupport;
77 } else { 77 } else {
78 minStencilSupport = GrPathRenderer::kNoSupport_StencilSupport; 78 minStencilSupport = GrPathRenderer::kNoSupport_StencilSupport;
79 } 79 }
80 if (minStencilSupport != GrPathRenderer::kNoSupport_StencilSupport) { 80 if (minStencilSupport != GrPathRenderer::kNoSupport_StencilSupport) {
81 // We don't support (and shouldn't need) stenciling of non-fill paths. 81 // We don't support (and shouldn't need) stenciling of non-fill paths.
82 if (!args.fStyle->isSimpleFill()) { 82 if (!args.fStroke->isFillStyle() || args.fStroke->isDashed()) {
83 return nullptr; 83 return nullptr;
84 } 84 }
85 } 85 }
86 86
87 for (int i = 0; i < fChain.count(); ++i) { 87 for (int i = 0; i < fChain.count(); ++i) {
88 if (fChain[i]->canDrawPath(args)) { 88 if (fChain[i]->canDrawPath(args)) {
89 if (GrPathRenderer::kNoSupport_StencilSupport != minStencilSupport) { 89 if (GrPathRenderer::kNoSupport_StencilSupport != minStencilSupport) {
90 GrPathRenderer::StencilSupport support = 90 GrPathRenderer::StencilSupport support =
91 fChain[i]->getStencilSupport(*args.fPath ); 91 fChain[i]->getStencilSupport(*args.fPath );
92 if (support < minStencilSupport) { 92 if (support < minStencilSupport) {
93 continue; 93 continue;
94 } else if (stencilSupport) { 94 } else if (stencilSupport) {
95 *stencilSupport = support; 95 *stencilSupport = support;
96 } 96 }
97 } 97 }
98 return fChain[i]; 98 return fChain[i];
99 } 99 }
100 } 100 }
101 return nullptr; 101 return nullptr;
102 } 102 }
OLDNEW
« no previous file with comments | « src/gpu/GrPathRenderer.h ('k') | src/gpu/GrPathRendering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698