| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 "GrAAHairLinePathRenderer.h" | 9 #include "GrAAHairLinePathRenderer.h" |
| 10 | 10 |
| 11 #include "GrContext.h" | 11 #include "GrContext.h" |
| 12 #include "GrDrawState.h" | 12 #include "GrDrawState.h" |
| 13 #include "GrDrawTargetCaps.h" |
| 13 #include "GrGpu.h" | 14 #include "GrGpu.h" |
| 14 #include "GrIndexBuffer.h" | 15 #include "GrIndexBuffer.h" |
| 15 #include "GrPathUtils.h" | 16 #include "GrPathUtils.h" |
| 16 #include "SkGeometry.h" | 17 #include "SkGeometry.h" |
| 17 #include "SkStroke.h" | 18 #include "SkStroke.h" |
| 18 #include "SkTemplates.h" | 19 #include "SkTemplates.h" |
| 19 | 20 |
| 20 namespace { | 21 namespace { |
| 21 // quadratics are rendered as 5-sided polys in order to bound the | 22 // quadratics are rendered as 5-sided polys in order to bound the |
| 22 // AA stroke around the center-curve. See comments in push_quad_index_buffer and | 23 // AA stroke around the center-curve. See comments in push_quad_index_buffer and |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 target->drawIndexed(kTriangles_GrPrimitiveType, | 627 target->drawIndexed(kTriangles_GrPrimitiveType, |
| 627 4 * lineCnt + kVertsPerQuad*quads, // startV | 628 4 * lineCnt + kVertsPerQuad*quads, // startV |
| 628 0, // startI | 629 0, // startI |
| 629 kVertsPerQuad*n, // vCount | 630 kVertsPerQuad*n, // vCount |
| 630 kIdxsPerQuad*n); // iCount | 631 kIdxsPerQuad*n); // iCount |
| 631 quads += n; | 632 quads += n; |
| 632 } | 633 } |
| 633 drawState->setVertexEdgeType(oldEdgeType); | 634 drawState->setVertexEdgeType(oldEdgeType); |
| 634 return true; | 635 return true; |
| 635 } | 636 } |
| OLD | NEW |