| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |