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 "GrBatch.h" | 10 #include "GrBatch.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 return SkNEW_ARGS(DefaultPathBatch, (geometry, coverage, viewMatrix, isH
airline)); | 224 return SkNEW_ARGS(DefaultPathBatch, (geometry, coverage, viewMatrix, isH
airline)); |
225 } | 225 } |
226 | 226 |
227 const char* name() const SK_OVERRIDE { return "DefaultPathBatch"; } | 227 const char* name() const SK_OVERRIDE { return "DefaultPathBatch"; } |
228 | 228 |
229 void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { | 229 void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE { |
230 // When this is called on a batch, there is only one geometry bundle | 230 // When this is called on a batch, there is only one geometry bundle |
231 out->setKnownFourComponents(fGeoData[0].fColor); | 231 out->setKnownFourComponents(fGeoData[0].fColor); |
232 } | 232 } |
233 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRID
E { | 233 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRID
E { |
234 out->setUnknownSingleComponent(); | 234 out->setKnownSingleComponent(this->coverage()); |
235 } | 235 } |
236 | 236 |
237 void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { | 237 void initBatchTracker(const GrPipelineInfo& init) SK_OVERRIDE { |
238 // Handle any color overrides | 238 // Handle any color overrides |
239 if (init.fColorIgnored) { | 239 if (init.fColorIgnored) { |
240 fGeoData[0].fColor = GrColor_ILLEGAL; | 240 fGeoData[0].fColor = GrColor_ILLEGAL; |
241 } else if (GrColor_ILLEGAL != init.fOverrideColor) { | 241 } else if (GrColor_ILLEGAL != init.fOverrideColor) { |
242 fGeoData[0].fColor = init.fOverrideColor; | 242 fGeoData[0].fColor = init.fOverrideColor; |
243 } | 243 } |
244 | 244 |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 | 726 |
727 void GrDefaultPathRenderer::onStencilPath(GrDrawTarget* target, | 727 void GrDefaultPathRenderer::onStencilPath(GrDrawTarget* target, |
728 GrPipelineBuilder* pipelineBuilder, | 728 GrPipelineBuilder* pipelineBuilder, |
729 const SkMatrix& viewMatrix, | 729 const SkMatrix& viewMatrix, |
730 const SkPath& path, | 730 const SkPath& path, |
731 const SkStrokeRec& stroke) { | 731 const SkStrokeRec& stroke) { |
732 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); | 732 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); |
733 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); | 733 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); |
734 this->internalDrawPath(target, pipelineBuilder, GrColor_WHITE, viewMatrix, p
ath, stroke, true); | 734 this->internalDrawPath(target, pipelineBuilder, GrColor_WHITE, viewMatrix, p
ath, stroke, true); |
735 } | 735 } |
OLD | NEW |