| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "GrOvalRenderer.h" | 8 #include "GrOvalRenderer.h" |
| 9 | 9 |
| 10 #include "GrBatch.h" | 10 #include "GrBatch.h" |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 198 |
| 199 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; | 199 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
| 200 | 200 |
| 201 typedef GrGeometryProcessor INHERITED; | 201 typedef GrGeometryProcessor INHERITED; |
| 202 }; | 202 }; |
| 203 | 203 |
| 204 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(CircleEdgeEffect); | 204 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(CircleEdgeEffect); |
| 205 | 205 |
| 206 GrGeometryProcessor* CircleEdgeEffect::TestCreate(SkRandom* random, | 206 GrGeometryProcessor* CircleEdgeEffect::TestCreate(SkRandom* random, |
| 207 GrContext* context, | 207 GrContext* context, |
| 208 const GrDrawTargetCaps&, | 208 const GrCaps&, |
| 209 GrTexture* textures[]) { | 209 GrTexture* textures[]) { |
| 210 return CircleEdgeEffect::Create(GrRandomColor(random), | 210 return CircleEdgeEffect::Create(GrRandomColor(random), |
| 211 random->nextBool(), | 211 random->nextBool(), |
| 212 GrTest::TestMatrix(random), | 212 GrTest::TestMatrix(random), |
| 213 random->nextBool()); | 213 random->nextBool()); |
| 214 } | 214 } |
| 215 | 215 |
| 216 /////////////////////////////////////////////////////////////////////////////// | 216 /////////////////////////////////////////////////////////////////////////////// |
| 217 | 217 |
| 218 /** | 218 /** |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 | 380 |
| 381 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; | 381 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
| 382 | 382 |
| 383 typedef GrGeometryProcessor INHERITED; | 383 typedef GrGeometryProcessor INHERITED; |
| 384 }; | 384 }; |
| 385 | 385 |
| 386 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(EllipseEdgeEffect); | 386 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(EllipseEdgeEffect); |
| 387 | 387 |
| 388 GrGeometryProcessor* EllipseEdgeEffect::TestCreate(SkRandom* random, | 388 GrGeometryProcessor* EllipseEdgeEffect::TestCreate(SkRandom* random, |
| 389 GrContext* context, | 389 GrContext* context, |
| 390 const GrDrawTargetCaps&, | 390 const GrCaps&, |
| 391 GrTexture* textures[]) { | 391 GrTexture* textures[]) { |
| 392 return EllipseEdgeEffect::Create(GrRandomColor(random), | 392 return EllipseEdgeEffect::Create(GrRandomColor(random), |
| 393 random->nextBool(), | 393 random->nextBool(), |
| 394 GrTest::TestMatrix(random), | 394 GrTest::TestMatrix(random), |
| 395 random->nextBool()); | 395 random->nextBool()); |
| 396 } | 396 } |
| 397 | 397 |
| 398 /////////////////////////////////////////////////////////////////////////////// | 398 /////////////////////////////////////////////////////////////////////////////// |
| 399 | 399 |
| 400 /** | 400 /** |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 | 574 |
| 575 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; | 575 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
| 576 | 576 |
| 577 typedef GrGeometryProcessor INHERITED; | 577 typedef GrGeometryProcessor INHERITED; |
| 578 }; | 578 }; |
| 579 | 579 |
| 580 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(DIEllipseEdgeEffect); | 580 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(DIEllipseEdgeEffect); |
| 581 | 581 |
| 582 GrGeometryProcessor* DIEllipseEdgeEffect::TestCreate(SkRandom* random, | 582 GrGeometryProcessor* DIEllipseEdgeEffect::TestCreate(SkRandom* random, |
| 583 GrContext* context, | 583 GrContext* context, |
| 584 const GrDrawTargetCaps&, | 584 const GrCaps&, |
| 585 GrTexture* textures[]) { | 585 GrTexture* textures[]) { |
| 586 return DIEllipseEdgeEffect::Create(GrRandomColor(random), | 586 return DIEllipseEdgeEffect::Create(GrRandomColor(random), |
| 587 GrTest::TestMatrix(random), | 587 GrTest::TestMatrix(random), |
| 588 (Mode)(random->nextRangeU(0,2)), | 588 (Mode)(random->nextRangeU(0,2)), |
| 589 random->nextBool()); | 589 random->nextBool()); |
| 590 } | 590 } |
| 591 | 591 |
| 592 /////////////////////////////////////////////////////////////////////////////// | 592 /////////////////////////////////////////////////////////////////////////////// |
| 593 | 593 |
| 594 bool GrOvalRenderer::drawOval(GrDrawTarget* target, | 594 bool GrOvalRenderer::drawOval(GrDrawTarget* target, |
| (...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2018 } | 2018 } |
| 2019 | 2019 |
| 2020 BATCH_TEST_DEFINE(RRectBatch) { | 2020 BATCH_TEST_DEFINE(RRectBatch) { |
| 2021 SkMatrix viewMatrix = GrTest::TestMatrixRectStaysRect(random); | 2021 SkMatrix viewMatrix = GrTest::TestMatrixRectStaysRect(random); |
| 2022 GrColor color = GrRandomColor(random); | 2022 GrColor color = GrRandomColor(random); |
| 2023 const SkRRect& rrect = GrTest::TestRRectSimple(random); | 2023 const SkRRect& rrect = GrTest::TestRRectSimple(random); |
| 2024 return create_rrect_batch(color, viewMatrix, rrect, GrTest::TestStrokeRec(ra
ndom)); | 2024 return create_rrect_batch(color, viewMatrix, rrect, GrTest::TestStrokeRec(ra
ndom)); |
| 2025 } | 2025 } |
| 2026 | 2026 |
| 2027 #endif | 2027 #endif |
| OLD | NEW |