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

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

Issue 1291803006: Simplify parameters passed to path renderers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add more validate methods Created 5 years, 4 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/GrDefaultPathRenderer.h ('k') | src/gpu/GrPathRenderer.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 #include "GrDefaultPathRenderer.h" 8 #include "GrDefaultPathRenderer.h"
9 9
10 #include "GrBatchTarget.h" 10 #include "GrBatchTarget.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 return true; 162 return true;
163 #else 163 #else
164 if (!stroke.isHairlineStyle() && !path.isInverseFillType()) { 164 if (!stroke.isHairlineStyle() && !path.isInverseFillType()) {
165 return path.isConvex(); 165 return path.isConvex();
166 } 166 }
167 return false; 167 return false;
168 #endif 168 #endif
169 } 169 }
170 170
171 GrPathRenderer::StencilSupport 171 GrPathRenderer::StencilSupport
172 GrDefaultPathRenderer::onGetStencilSupport(const GrDrawTarget*, 172 GrDefaultPathRenderer::onGetStencilSupport(const SkPath& path, const GrStrokeInf o& stroke) const {
173 const GrPipelineBuilder*,
174 const SkPath& path,
175 const GrStrokeInfo& stroke) const {
176 if (single_pass_path(path, stroke)) { 173 if (single_pass_path(path, stroke)) {
177 return GrPathRenderer::kNoRestriction_StencilSupport; 174 return GrPathRenderer::kNoRestriction_StencilSupport;
178 } else { 175 } else {
179 return GrPathRenderer::kStencilOnly_StencilSupport; 176 return GrPathRenderer::kStencilOnly_StencilSupport;
180 } 177 }
181 } 178 }
182 179
183 static inline void append_countour_edge_indices(bool hairLine, 180 static inline void append_countour_edge_indices(bool hairLine,
184 uint16_t fanCenterIdx, 181 uint16_t fanCenterIdx,
185 uint16_t edgeV0Idx, 182 uint16_t edgeV0Idx,
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 geometry.fColor = color; 751 geometry.fColor = color;
755 geometry.fPath = path; 752 geometry.fPath = path;
756 geometry.fTolerance = srcSpaceTol; 753 geometry.fTolerance = srcSpaceTol;
757 754
758 viewMatrix.mapRect(&bounds); 755 viewMatrix.mapRect(&bounds);
759 uint8_t coverage = GrRandomCoverage(random); 756 uint8_t coverage = GrRandomCoverage(random);
760 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds ); 757 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds );
761 } 758 }
762 759
763 #endif 760 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDefaultPathRenderer.h ('k') | src/gpu/GrPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698