OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "GrAAConvexPathRenderer.h" | 8 #include "GrAAConvexPathRenderer.h" |
9 | 9 |
10 #include "GrAAConvexTessellator.h" | 10 #include "GrAAConvexTessellator.h" |
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
999 if (args.fPath->isEmpty()) { | 999 if (args.fPath->isEmpty()) { |
1000 return true; | 1000 return true; |
1001 } | 1001 } |
1002 | 1002 |
1003 AAConvexPathBatch::Geometry geometry; | 1003 AAConvexPathBatch::Geometry geometry; |
1004 geometry.fColor = args.fColor; | 1004 geometry.fColor = args.fColor; |
1005 geometry.fViewMatrix = *args.fViewMatrix; | 1005 geometry.fViewMatrix = *args.fViewMatrix; |
1006 geometry.fPath = *args.fPath; | 1006 geometry.fPath = *args.fPath; |
1007 | 1007 |
1008 SkAutoTUnref<GrDrawBatch> batch(AAConvexPathBatch::Create(geometry)); | 1008 SkAutoTUnref<GrDrawBatch> batch(AAConvexPathBatch::Create(geometry)); |
1009 args.fTarget->drawBatch(*args.fPipelineBuilder, batch); | 1009 args.fTarget->drawBatch(*args.fPipelineBuilder, *args.fClip, batch); |
1010 | 1010 |
1011 return true; | 1011 return true; |
1012 | 1012 |
1013 } | 1013 } |
1014 | 1014 |
1015 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 1015 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
1016 | 1016 |
1017 #ifdef GR_TEST_UTILS | 1017 #ifdef GR_TEST_UTILS |
1018 | 1018 |
1019 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) { | 1019 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) { |
1020 AAConvexPathBatch::Geometry geometry; | 1020 AAConvexPathBatch::Geometry geometry; |
1021 geometry.fColor = GrRandomColor(random); | 1021 geometry.fColor = GrRandomColor(random); |
1022 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); | 1022 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); |
1023 geometry.fPath = GrTest::TestPathConvex(random); | 1023 geometry.fPath = GrTest::TestPathConvex(random); |
1024 | 1024 |
1025 return AAConvexPathBatch::Create(geometry); | 1025 return AAConvexPathBatch::Create(geometry); |
1026 } | 1026 } |
1027 | 1027 |
1028 #endif | 1028 #endif |
OLD | NEW |