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 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
995 bool fCanTweakAlphaForCoverage; | 995 bool fCanTweakAlphaForCoverage; |
996 }; | 996 }; |
997 | 997 |
998 BatchTracker fBatch; | 998 BatchTracker fBatch; |
999 SkSTArray<1, Geometry, true> fGeoData; | 999 SkSTArray<1, Geometry, true> fGeoData; |
1000 | 1000 |
1001 typedef GrVertexBatch INHERITED; | 1001 typedef GrVertexBatch INHERITED; |
1002 }; | 1002 }; |
1003 | 1003 |
1004 bool GrAAConvexPathRenderer::onDrawPath(const DrawPathArgs& args) { | 1004 bool GrAAConvexPathRenderer::onDrawPath(const DrawPathArgs& args) { |
| 1005 GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(), "GrAAConvexPathRend
erer::onDrawPath"); |
1005 if (args.fPath->isEmpty()) { | 1006 if (args.fPath->isEmpty()) { |
1006 return true; | 1007 return true; |
1007 } | 1008 } |
1008 | 1009 |
1009 AAConvexPathBatch::Geometry geometry; | 1010 AAConvexPathBatch::Geometry geometry; |
1010 geometry.fColor = args.fColor; | 1011 geometry.fColor = args.fColor; |
1011 geometry.fViewMatrix = *args.fViewMatrix; | 1012 geometry.fViewMatrix = *args.fViewMatrix; |
1012 geometry.fPath = *args.fPath; | 1013 geometry.fPath = *args.fPath; |
1013 | 1014 |
1014 SkAutoTUnref<GrDrawBatch> batch(AAConvexPathBatch::Create(geometry)); | 1015 SkAutoTUnref<GrDrawBatch> batch(AAConvexPathBatch::Create(geometry)); |
(...skipping 10 matching lines...) Expand all Loading... |
1025 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) { | 1026 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) { |
1026 AAConvexPathBatch::Geometry geometry; | 1027 AAConvexPathBatch::Geometry geometry; |
1027 geometry.fColor = GrRandomColor(random); | 1028 geometry.fColor = GrRandomColor(random); |
1028 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); | 1029 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); |
1029 geometry.fPath = GrTest::TestPathConvex(random); | 1030 geometry.fPath = GrTest::TestPathConvex(random); |
1030 | 1031 |
1031 return AAConvexPathBatch::Create(geometry); | 1032 return AAConvexPathBatch::Create(geometry); |
1032 } | 1033 } |
1033 | 1034 |
1034 #endif | 1035 #endif |
OLD | NEW |