| 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 "GrAAHairLinePathRenderer.h" | 8 #include "GrAAHairLinePathRenderer.h" |
| 9 | 9 |
| 10 #include "GrBatchFlushState.h" | 10 #include "GrBatchFlushState.h" |
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 685 static GrDrawBatch* Create(const Geometry& geometry) { return new AAHairline
Batch(geometry); } | 685 static GrDrawBatch* Create(const Geometry& geometry) { return new AAHairline
Batch(geometry); } |
| 686 | 686 |
| 687 const char* name() const override { return "AAHairlineBatch"; } | 687 const char* name() const override { return "AAHairlineBatch"; } |
| 688 | 688 |
| 689 void computePipelineOptimizations(GrInitInvariantOutput* color, | 689 void computePipelineOptimizations(GrInitInvariantOutput* color, |
| 690 GrInitInvariantOutput* coverage, | 690 GrInitInvariantOutput* coverage, |
| 691 GrBatchToXPOverrides* overrides) const ove
rride { | 691 GrBatchToXPOverrides* overrides) const ove
rride { |
| 692 // When this is called on a batch, there is only one geometry bundle | 692 // When this is called on a batch, there is only one geometry bundle |
| 693 color->setKnownFourComponents(fGeoData[0].fColor); | 693 color->setKnownFourComponents(fGeoData[0].fColor); |
| 694 coverage->setUnknownSingleComponent(); | 694 coverage->setUnknownSingleComponent(); |
| 695 overrides->fUsePLSDstRead = true; | |
| 696 } | 695 } |
| 697 | 696 |
| 698 private: | 697 private: |
| 699 void initBatchTracker(const GrXPOverridesForBatch& overrides) override { | 698 void initBatchTracker(const GrXPOverridesForBatch& overrides) override { |
| 700 // Handle any color overrides | 699 // Handle any color overrides |
| 701 if (!overrides.readsColor()) { | 700 if (!overrides.readsColor()) { |
| 702 fGeoData[0].fColor = GrColor_ILLEGAL; | 701 fGeoData[0].fColor = GrColor_ILLEGAL; |
| 703 } | 702 } |
| 704 overrides.getOverrideColorIfSet(&fGeoData[0].fColor); | 703 overrides.getOverrideColorIfSet(&fGeoData[0].fColor); |
| 705 | 704 |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 994 GrColor color = GrRandomColor(random); | 993 GrColor color = GrRandomColor(random); |
| 995 SkMatrix viewMatrix = GrTest::TestMatrix(random); | 994 SkMatrix viewMatrix = GrTest::TestMatrix(random); |
| 996 GrStrokeInfo stroke(SkStrokeRec::kHairline_InitStyle); | 995 GrStrokeInfo stroke(SkStrokeRec::kHairline_InitStyle); |
| 997 SkPath path = GrTest::TestPath(random); | 996 SkPath path = GrTest::TestPath(random); |
| 998 SkIRect devClipBounds; | 997 SkIRect devClipBounds; |
| 999 devClipBounds.setEmpty(); | 998 devClipBounds.setEmpty(); |
| 1000 return create_hairline_batch(color, viewMatrix, path, stroke, devClipBounds)
; | 999 return create_hairline_batch(color, viewMatrix, path, stroke, devClipBounds)
; |
| 1001 } | 1000 } |
| 1002 | 1001 |
| 1003 #endif | 1002 #endif |
| OLD | NEW |