| 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" | 10 #include "GrBatch.h" |
| 11 #include "GrBatchTarget.h" | 11 #include "GrBatchTarget.h" |
| 12 #include "GrDefaultGeoProcFactory.h" | 12 #include "GrDefaultGeoProcFactory.h" |
| 13 #include "GrPathUtils.h" | 13 #include "GrPathUtils.h" |
| 14 #include "GrVertexBuffer.h" |
| 14 #include "SkChunkAlloc.h" | 15 #include "SkChunkAlloc.h" |
| 15 #include "SkGeometry.h" | 16 #include "SkGeometry.h" |
| 16 | 17 |
| 17 #include <stdio.h> | 18 #include <stdio.h> |
| 18 | 19 |
| 19 /* | 20 /* |
| 20 * This path renderer tessellates the path into triangles, uploads the triangles
to a | 21 * This path renderer tessellates the path into triangles, uploads the triangles
to a |
| 21 * vertex buffer, and renders them with a single draw call. It does not currentl
y do | 22 * vertex buffer, and renders them with a single draw call. It does not currentl
y do |
| 22 * antialiasing, so it must be used in conjunction with multisampling. | 23 * antialiasing, so it must be used in conjunction with multisampling. |
| 23 * | 24 * |
| (...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1512 SkMatrix vmi; | 1513 SkMatrix vmi; |
| 1513 if (!viewM.invert(&vmi)) { | 1514 if (!viewM.invert(&vmi)) { |
| 1514 return false; | 1515 return false; |
| 1515 } | 1516 } |
| 1516 vmi.mapRect(&clipBounds); | 1517 vmi.mapRect(&clipBounds); |
| 1517 SkAutoTUnref<GrBatch> batch(TessellatingPathBatch::Create(color, path, viewM
, clipBounds)); | 1518 SkAutoTUnref<GrBatch> batch(TessellatingPathBatch::Create(color, path, viewM
, clipBounds)); |
| 1518 target->drawBatch(pipelineBuilder, batch); | 1519 target->drawBatch(pipelineBuilder, batch); |
| 1519 | 1520 |
| 1520 return true; | 1521 return true; |
| 1521 } | 1522 } |
| OLD | NEW |