OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 "GrAAConvexPathRenderer.h" | 9 #include "GrAAConvexPathRenderer.h" |
10 | 10 |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 | 662 |
663 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; | 663 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
664 | 664 |
665 typedef GrGeometryProcessor INHERITED; | 665 typedef GrGeometryProcessor INHERITED; |
666 }; | 666 }; |
667 | 667 |
668 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(QuadEdgeEffect); | 668 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(QuadEdgeEffect); |
669 | 669 |
670 GrGeometryProcessor* QuadEdgeEffect::TestCreate(SkRandom* random, | 670 GrGeometryProcessor* QuadEdgeEffect::TestCreate(SkRandom* random, |
671 GrContext*, | 671 GrContext*, |
672 const GrDrawTargetCaps& caps, | 672 const GrCaps& caps, |
673 GrTexture*[]) { | 673 GrTexture*[]) { |
674 // Doesn't work without derivative instructions. | 674 // Doesn't work without derivative instructions. |
675 return caps.shaderCaps()->shaderDerivativeSupport() ? | 675 return caps.shaderCaps()->shaderDerivativeSupport() ? |
676 QuadEdgeEffect::Create(GrRandomColor(random), | 676 QuadEdgeEffect::Create(GrRandomColor(random), |
677 GrTest::TestMatrix(random), | 677 GrTest::TestMatrix(random), |
678 random->nextBool()) : NULL; | 678 random->nextBool()) : NULL; |
679 } | 679 } |
680 | 680 |
681 /////////////////////////////////////////////////////////////////////////////// | 681 /////////////////////////////////////////////////////////////////////////////// |
682 | 682 |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1018 BATCH_TEST_DEFINE(AAConvexPathBatch) { | 1018 BATCH_TEST_DEFINE(AAConvexPathBatch) { |
1019 AAConvexPathBatch::Geometry geometry; | 1019 AAConvexPathBatch::Geometry geometry; |
1020 geometry.fColor = GrRandomColor(random); | 1020 geometry.fColor = GrRandomColor(random); |
1021 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); | 1021 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); |
1022 geometry.fPath = GrTest::TestPathConvex(random); | 1022 geometry.fPath = GrTest::TestPathConvex(random); |
1023 | 1023 |
1024 return AAConvexPathBatch::Create(geometry); | 1024 return AAConvexPathBatch::Create(geometry); |
1025 } | 1025 } |
1026 | 1026 |
1027 #endif | 1027 #endif |
OLD | NEW |