| OLD | NEW |
| 1 | |
| 2 /* | 1 /* |
| 3 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 4 * | 3 * |
| 5 * 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 |
| 6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 7 */ | 6 */ |
| 8 | 7 |
| 9 #include "GrAALinearizingConvexPathRenderer.h" | 8 #include "GrAALinearizingConvexPathRenderer.h" |
| 10 | 9 |
| 11 #include "GrAAConvexTessellator.h" | 10 #include "GrAAConvexTessellator.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 SkPaint::Join fJoin; | 126 SkPaint::Join fJoin; |
| 128 SkScalar fMiterLimit; | 127 SkScalar fMiterLimit; |
| 129 }; | 128 }; |
| 130 | 129 |
| 131 static GrDrawBatch* Create(const Geometry& geometry) { | 130 static GrDrawBatch* Create(const Geometry& geometry) { |
| 132 return new AAFlatteningConvexPathBatch(geometry); | 131 return new AAFlatteningConvexPathBatch(geometry); |
| 133 } | 132 } |
| 134 | 133 |
| 135 const char* name() const override { return "AAConvexBatch"; } | 134 const char* name() const override { return "AAConvexBatch"; } |
| 136 | 135 |
| 137 void computePipelineOptimizations(GrInitInvariantOutput* color, | 136 void computePipelineOptimizations(GrInitInvariantOutput* color, |
| 138 GrInitInvariantOutput* coverage, | 137 GrInitInvariantOutput* coverage, |
| 139 GrBatchToXPOverrides* overrides) const ove
rride { | 138 GrBatchToXPOverrides* overrides) const ove
rride { |
| 140 // When this is called on a batch, there is only one geometry bundle | 139 // When this is called on a batch, there is only one geometry bundle |
| 141 color->setKnownFourComponents(fGeoData[0].fColor); | 140 color->setKnownFourComponents(fGeoData[0].fColor); |
| 142 coverage->setUnknownSingleComponent(); | 141 coverage->setUnknownSingleComponent(); |
| 143 } | 142 } |
| 144 | 143 |
| 145 private: | 144 private: |
| 146 void initBatchTracker(const GrXPOverridesForBatch& overrides) override { | 145 void initBatchTracker(const GrXPOverridesForBatch& overrides) override { |
| 147 // Handle any color overrides | 146 // Handle any color overrides |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 DRAW_BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) { | 347 DRAW_BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) { |
| 349 AAFlatteningConvexPathBatch::Geometry geometry; | 348 AAFlatteningConvexPathBatch::Geometry geometry; |
| 350 geometry.fColor = GrRandomColor(random); | 349 geometry.fColor = GrRandomColor(random); |
| 351 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); | 350 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); |
| 352 geometry.fPath = GrTest::TestPathConvex(random); | 351 geometry.fPath = GrTest::TestPathConvex(random); |
| 353 | 352 |
| 354 return AAFlatteningConvexPathBatch::Create(geometry); | 353 return AAFlatteningConvexPathBatch::Create(geometry); |
| 355 } | 354 } |
| 356 | 355 |
| 357 #endif | 356 #endif |
| OLD | NEW |