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 "GrBatchTarget.h" | 10 #include "GrBatchTarget.h" |
11 #include "GrBatchTest.h" | 11 #include "GrBatchTest.h" |
12 #include "GrDefaultGeoProcFactory.h" | 12 #include "GrDefaultGeoProcFactory.h" |
13 #include "GrPathUtils.h" | 13 #include "GrPathUtils.h" |
14 #include "GrVertices.h" | 14 #include "GrVertices.h" |
15 #include "GrResourceCache.h" | 15 #include "GrResourceCache.h" |
16 #include "GrResourceProvider.h" | 16 #include "GrResourceProvider.h" |
17 #include "SkChunkAlloc.h" | 17 #include "SkChunkAlloc.h" |
18 #include "SkGeometry.h" | 18 #include "SkGeometry.h" |
19 | 19 |
20 #include "batches/GrBatch.h" | 20 #include "batches/GrVertexBatch.h" |
21 | 21 |
22 #include <stdio.h> | 22 #include <stdio.h> |
23 | 23 |
24 /* | 24 /* |
25 * 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 |
26 * 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 |
27 * antialiasing, so it must be used in conjunction with multisampling. | 27 * antialiasing, so it must be used in conjunction with multisampling. |
28 * | 28 * |
29 * There are six stages to the algorithm: | 29 * There are six stages to the algorithm: |
30 * | 30 * |
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1641 bool result = viewMatrix.invert(&vmi); | 1641 bool result = viewMatrix.invert(&vmi); |
1642 if (!result) { | 1642 if (!result) { |
1643 SkFAIL("Cannot invert matrix\n"); | 1643 SkFAIL("Cannot invert matrix\n"); |
1644 } | 1644 } |
1645 vmi.mapRect(&clipBounds); | 1645 vmi.mapRect(&clipBounds); |
1646 GrStrokeInfo strokeInfo = GrTest::TestStrokeInfo(random); | 1646 GrStrokeInfo strokeInfo = GrTest::TestStrokeInfo(random); |
1647 return TessellatingPathBatch::Create(color, path, strokeInfo, viewMatrix, cl
ipBounds); | 1647 return TessellatingPathBatch::Create(color, path, strokeInfo, viewMatrix, cl
ipBounds); |
1648 } | 1648 } |
1649 | 1649 |
1650 #endif | 1650 #endif |
OLD | NEW |