OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "GrAAFillRectBatch.h" | 8 #include "GrAAFillRectBatch.h" |
9 | 9 |
10 #include "GrColor.h" | 10 #include "GrColor.h" |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 gp->getVertexStride() == sizeof(GrDefaultGeoProcFactory::Positi
onColorAttr) : | 230 gp->getVertexStride() == sizeof(GrDefaultGeoProcFactory::Positi
onColorAttr) : |
231 gp->getVertexStride() == | 231 gp->getVertexStride() == |
232 sizeof(GrDefaultGeoProcFactory::PositionColorCoverageAt
tr)); | 232 sizeof(GrDefaultGeoProcFactory::PositionColorCoverageAt
tr)); |
233 return gp; | 233 return gp; |
234 } | 234 } |
235 | 235 |
236 static void Tesselate(intptr_t vertices, size_t vertexStride, const Geometry
& geo, | 236 static void Tesselate(intptr_t vertices, size_t vertexStride, const Geometry
& geo, |
237 const GrPipelineOptimizations& opts) { | 237 const GrPipelineOptimizations& opts) { |
238 generate_aa_fill_rect_geometry(vertices, vertexStride, | 238 generate_aa_fill_rect_geometry(vertices, vertexStride, |
239 geo.fColor, geo.fViewMatrix, geo.fRect, g
eo.fDevRect, opts, | 239 geo.fColor, geo.fViewMatrix, geo.fRect, g
eo.fDevRect, opts, |
240 NULL); | 240 nullptr); |
241 } | 241 } |
242 }; | 242 }; |
243 | 243 |
244 class AAFillRectBatchLocalMatrixImp : public AAFillRectBatchBase { | 244 class AAFillRectBatchLocalMatrixImp : public AAFillRectBatchBase { |
245 public: | 245 public: |
246 struct Geometry { | 246 struct Geometry { |
247 SkMatrix fViewMatrix; | 247 SkMatrix fViewMatrix; |
248 SkMatrix fLocalMatrix; | 248 SkMatrix fLocalMatrix; |
249 SkRect fRect; | 249 SkRect fRect; |
250 SkRect fDevRect; | 250 SkRect fDevRect; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 DRAW_BATCH_TEST_DEFINE(AAFillRectBatchLocalMatrix) { | 334 DRAW_BATCH_TEST_DEFINE(AAFillRectBatchLocalMatrix) { |
335 GrColor color = GrRandomColor(random); | 335 GrColor color = GrRandomColor(random); |
336 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random); | 336 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random); |
337 SkMatrix localMatrix = GrTest::TestMatrix(random); | 337 SkMatrix localMatrix = GrTest::TestMatrix(random); |
338 SkRect rect = GrTest::TestRect(random); | 338 SkRect rect = GrTest::TestRect(random); |
339 SkRect devRect = GrTest::TestRect(random); | 339 SkRect devRect = GrTest::TestRect(random); |
340 return GrAAFillRectBatch::Create(color, viewMatrix, localMatrix, rect, devRe
ct); | 340 return GrAAFillRectBatch::Create(color, viewMatrix, localMatrix, rect, devRe
ct); |
341 } | 341 } |
342 | 342 |
343 #endif | 343 #endif |
OLD | NEW |