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 |
11 #include "GrAAConvexTessellator.h" | 11 #include "GrAAConvexTessellator.h" |
12 #include "GrBatch.h" | 12 #include "GrBatch.h" |
13 #include "GrBatchTarget.h" | 13 #include "GrBatchTarget.h" |
| 14 #include "GrBatchTest.h" |
14 #include "GrContext.h" | 15 #include "GrContext.h" |
15 #include "GrDefaultGeoProcFactory.h" | 16 #include "GrDefaultGeoProcFactory.h" |
16 #include "GrDrawTargetCaps.h" | 17 #include "GrDrawTargetCaps.h" |
17 #include "GrGeometryProcessor.h" | 18 #include "GrGeometryProcessor.h" |
18 #include "GrInvariantOutput.h" | 19 #include "GrInvariantOutput.h" |
19 #include "GrPathUtils.h" | 20 #include "GrPathUtils.h" |
20 #include "GrProcessor.h" | 21 #include "GrProcessor.h" |
21 #include "GrPipelineBuilder.h" | 22 #include "GrPipelineBuilder.h" |
22 #include "GrStrokeInfo.h" | 23 #include "GrStrokeInfo.h" |
23 #include "SkGeometry.h" | 24 #include "SkGeometry.h" |
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 geometry.fColor = color; | 1030 geometry.fColor = color; |
1030 geometry.fViewMatrix = vm; | 1031 geometry.fViewMatrix = vm; |
1031 geometry.fPath = path; | 1032 geometry.fPath = path; |
1032 | 1033 |
1033 SkAutoTUnref<GrBatch> batch(AAConvexPathBatch::Create(geometry)); | 1034 SkAutoTUnref<GrBatch> batch(AAConvexPathBatch::Create(geometry)); |
1034 target->drawBatch(pipelineBuilder, batch); | 1035 target->drawBatch(pipelineBuilder, batch); |
1035 | 1036 |
1036 return true; | 1037 return true; |
1037 | 1038 |
1038 } | 1039 } |
| 1040 |
| 1041 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 1042 |
| 1043 #ifdef GR_TEST_UTILS |
| 1044 |
| 1045 BATCH_TEST_DEFINE(AAConvexPath) { |
| 1046 AAConvexPathBatch::Geometry geometry; |
| 1047 geometry.fColor = GrRandomColor(random); |
| 1048 geometry.fViewMatrix = GrTest::TestMatrix(random); |
| 1049 geometry.fPath = GrTest::TestPathConvex(random); |
| 1050 |
| 1051 return AAConvexPathBatch::Create(geometry); |
| 1052 } |
| 1053 |
| 1054 #endif |
OLD | NEW |