| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "GrAAHairLinePathRenderer.h" | 8 #include "GrAAHairLinePathRenderer.h" |
| 9 | 9 |
| 10 #include "GrContext.h" | 10 #include "GrContext.h" |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 | 643 |
| 644 // position + edge | 644 // position + edge |
| 645 extern const GrVertexAttrib gHairlineBezierAttribs[] = { | 645 extern const GrVertexAttrib gHairlineBezierAttribs[] = { |
| 646 {kVec2f_GrVertexAttribType, 0, kPosition_GrVertexAttribBind
ing}, | 646 {kVec2f_GrVertexAttribType, 0, kPosition_GrVertexAttribBind
ing}, |
| 647 {kVec4f_GrVertexAttribType, sizeof(SkPoint), kGeometryProcessor_GrVertexA
ttribBinding} | 647 {kVec4f_GrVertexAttribType, sizeof(SkPoint), kGeometryProcessor_GrVertexA
ttribBinding} |
| 648 }; | 648 }; |
| 649 | 649 |
| 650 // position + coverage | 650 // position + coverage |
| 651 extern const GrVertexAttrib gHairlineLineAttribs[] = { | 651 extern const GrVertexAttrib gHairlineLineAttribs[] = { |
| 652 {kVec2f_GrVertexAttribType, 0, kPosition_GrVertexAttribBindin
g}, | 652 {kVec2f_GrVertexAttribType, 0, kPosition_GrVertexAttribBindin
g}, |
| 653 {kVec4ub_GrVertexAttribType, sizeof(SkPoint), kCoverage_GrVertexAttribBindin
g}, | 653 {kUByte_GrVertexAttribType, sizeof(SkPoint), kCoverage_GrVertexAttribBinding
}, |
| 654 }; | 654 }; |
| 655 | 655 |
| 656 }; | 656 }; |
| 657 | 657 |
| 658 bool GrAAHairLinePathRenderer::createLineGeom(const SkPath& path, | 658 bool GrAAHairLinePathRenderer::createLineGeom(const SkPath& path, |
| 659 GrDrawTarget* target, | 659 GrDrawTarget* target, |
| 660 const PtArray& lines, | 660 const PtArray& lines, |
| 661 int lineCnt, | 661 int lineCnt, |
| 662 GrDrawTarget::AutoReleaseGeometry*
arg, | 662 GrDrawTarget::AutoReleaseGeometry*
arg, |
| 663 SkRect* devBounds) { | 663 SkRect* devBounds) { |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 &devBounds); | 967 &devBounds); |
| 968 conics += n; | 968 conics += n; |
| 969 } | 969 } |
| 970 } | 970 } |
| 971 } | 971 } |
| 972 | 972 |
| 973 target->resetIndexSource(); | 973 target->resetIndexSource(); |
| 974 | 974 |
| 975 return true; | 975 return true; |
| 976 } | 976 } |
| OLD | NEW |