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

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

Issue 2081383006: Use GrShape in GrPathRenderer. (Closed) Base URL: https://chromium.googlesource.com/skia.git@shapemembers
Patch Set: Address comments 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/GrPathRenderer.h ('k') | src/gpu/GrSWMaskHelper.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.fShape->style().isSimpleFill()) {
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 = fChain[i]->getStencilSu pport(*args.fShape);
91 fChain[i]->getStencilSupport(*args.fPath );
92 if (support < minStencilSupport) { 91 if (support < minStencilSupport) {
93 continue; 92 continue;
94 } else if (stencilSupport) { 93 } else if (stencilSupport) {
95 *stencilSupport = support; 94 *stencilSupport = support;
96 } 95 }
97 } 96 }
98 return fChain[i]; 97 return fChain[i];
99 } 98 }
100 } 99 }
101 return nullptr; 100 return nullptr;
102 } 101 }
OLDNEW
« no previous file with comments | « src/gpu/GrPathRenderer.h ('k') | src/gpu/GrSWMaskHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698