| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "GrAALinearizingConvexPathRenderer.h" | 9 #include "GrAALinearizingConvexPathRenderer.h" |
| 10 | 10 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 struct Geometry { | 122 struct Geometry { |
| 123 GrColor fColor; | 123 GrColor fColor; |
| 124 SkMatrix fViewMatrix; | 124 SkMatrix fViewMatrix; |
| 125 SkPath fPath; | 125 SkPath fPath; |
| 126 SkScalar fStrokeWidth; | 126 SkScalar fStrokeWidth; |
| 127 SkPaint::Join fJoin; | 127 SkPaint::Join fJoin; |
| 128 SkScalar fMiterLimit; | 128 SkScalar fMiterLimit; |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 static GrDrawBatch* Create(const Geometry& geometry) { | 131 static GrDrawBatch* Create(const Geometry& geometry) { |
| 132 return SkNEW_ARGS(AAFlatteningConvexPathBatch, (geometry)); | 132 return new AAFlatteningConvexPathBatch(geometry); |
| 133 } | 133 } |
| 134 | 134 |
| 135 const char* name() const override { return "AAConvexBatch"; } | 135 const char* name() const override { return "AAConvexBatch"; } |
| 136 | 136 |
| 137 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { | 137 void getInvariantOutputColor(GrInitInvariantOutput* out) const override { |
| 138 // When this is called on a batch, there is only one geometry bundle | 138 // When this is called on a batch, there is only one geometry bundle |
| 139 out->setKnownFourComponents(fGeoData[0].fColor); | 139 out->setKnownFourComponents(fGeoData[0].fColor); |
| 140 } | 140 } |
| 141 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { | 141 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { |
| 142 out->setUnknownSingleComponent(); | 142 out->setUnknownSingleComponent(); |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 DRAW_BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) { | 336 DRAW_BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) { |
| 337 AAFlatteningConvexPathBatch::Geometry geometry; | 337 AAFlatteningConvexPathBatch::Geometry geometry; |
| 338 geometry.fColor = GrRandomColor(random); | 338 geometry.fColor = GrRandomColor(random); |
| 339 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); | 339 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); |
| 340 geometry.fPath = GrTest::TestPathConvex(random); | 340 geometry.fPath = GrTest::TestPathConvex(random); |
| 341 | 341 |
| 342 return AAFlatteningConvexPathBatch::Create(geometry); | 342 return AAFlatteningConvexPathBatch::Create(geometry); |
| 343 } | 343 } |
| 344 | 344 |
| 345 #endif | 345 #endif |
| OLD | NEW |