OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "GrTessellatingPathRenderer.h" | 8 #include "GrTessellatingPathRenderer.h" |
9 | 9 |
10 #include "GrBatch.h" | |
11 #include "GrBatchTarget.h" | 10 #include "GrBatchTarget.h" |
12 #include "GrBatchTest.h" | 11 #include "GrBatchTest.h" |
13 #include "GrDefaultGeoProcFactory.h" | 12 #include "GrDefaultGeoProcFactory.h" |
14 #include "GrPathUtils.h" | 13 #include "GrPathUtils.h" |
15 #include "GrVertices.h" | 14 #include "GrVertices.h" |
16 #include "GrResourceCache.h" | 15 #include "GrResourceCache.h" |
17 #include "GrResourceProvider.h" | 16 #include "GrResourceProvider.h" |
18 #include "SkChunkAlloc.h" | 17 #include "SkChunkAlloc.h" |
19 #include "SkGeometry.h" | 18 #include "SkGeometry.h" |
20 | 19 |
| 20 #include "batches/GrBatch.h" |
| 21 |
21 #include <stdio.h> | 22 #include <stdio.h> |
22 | 23 |
23 /* | 24 /* |
24 * This path renderer tessellates the path into triangles, uploads the triangles
to a | 25 * This path renderer tessellates the path into triangles, uploads the triangles
to a |
25 * vertex buffer, and renders them with a single draw call. It does not currentl
y do | 26 * vertex buffer, and renders them with a single draw call. It does not currentl
y do |
26 * antialiasing, so it must be used in conjunction with multisampling. | 27 * antialiasing, so it must be used in conjunction with multisampling. |
27 * | 28 * |
28 * There are six stages to the algorithm: | 29 * There are six stages to the algorithm: |
29 * | 30 * |
30 * 1) Linearize the path contours into piecewise linear segments (path_to_contou
rs()). | 31 * 1) Linearize the path contours into piecewise linear segments (path_to_contou
rs()). |
(...skipping 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1650 bool result = viewMatrix.invert(&vmi); | 1651 bool result = viewMatrix.invert(&vmi); |
1651 if (!result) { | 1652 if (!result) { |
1652 SkFAIL("Cannot invert matrix\n"); | 1653 SkFAIL("Cannot invert matrix\n"); |
1653 } | 1654 } |
1654 vmi.mapRect(&clipBounds); | 1655 vmi.mapRect(&clipBounds); |
1655 GrStrokeInfo strokeInfo = GrTest::TestStrokeInfo(random); | 1656 GrStrokeInfo strokeInfo = GrTest::TestStrokeInfo(random); |
1656 return TessellatingPathBatch::Create(color, path, strokeInfo, viewMatrix, cl
ipBounds); | 1657 return TessellatingPathBatch::Create(color, path, strokeInfo, viewMatrix, cl
ipBounds); |
1657 } | 1658 } |
1658 | 1659 |
1659 #endif | 1660 #endif |
OLD | NEW |