| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 "GrAAConvexPathRenderer.h" | 9 #include "GrAAConvexPathRenderer.h" |
| 10 | 10 |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 if (!arg.succeeded()) { | 653 if (!arg.succeeded()) { |
| 654 return false; | 654 return false; |
| 655 } | 655 } |
| 656 GrAssert(sizeof(QuadVertex) == drawState->getVertexSize()); | 656 GrAssert(sizeof(QuadVertex) == drawState->getVertexSize()); |
| 657 verts = reinterpret_cast<QuadVertex*>(arg.vertices()); | 657 verts = reinterpret_cast<QuadVertex*>(arg.vertices()); |
| 658 idxs = reinterpret_cast<uint16_t*>(arg.indices()); | 658 idxs = reinterpret_cast<uint16_t*>(arg.indices()); |
| 659 | 659 |
| 660 SkSTArray<kPreallocDrawCnt, Draw, true> draws; | 660 SkSTArray<kPreallocDrawCnt, Draw, true> draws; |
| 661 create_vertices(segments, fanPt, &draws, verts, idxs); | 661 create_vertices(segments, fanPt, &draws, verts, idxs); |
| 662 | 662 |
| 663 SkRect devBounds; |
| 664 GetPathDevBounds(origPath, drawState->getRenderTarget(), adcd.getOriginalMat
rix(), &devBounds); |
| 665 |
| 663 int vOffset = 0; | 666 int vOffset = 0; |
| 664 for (int i = 0; i < draws.count(); ++i) { | 667 for (int i = 0; i < draws.count(); ++i) { |
| 665 const Draw& draw = draws[i]; | 668 const Draw& draw = draws[i]; |
| 666 target->drawIndexed(kTriangles_GrPrimitiveType, | 669 target->drawIndexed(kTriangles_GrPrimitiveType, |
| 667 vOffset, // start vertex | 670 vOffset, // start vertex |
| 668 0, // start index | 671 0, // start index |
| 669 draw.fVertexCnt, | 672 draw.fVertexCnt, |
| 670 draw.fIndexCnt); | 673 draw.fIndexCnt, |
| 674 &devBounds); |
| 671 vOffset += draw.fVertexCnt; | 675 vOffset += draw.fVertexCnt; |
| 672 } | 676 } |
| 673 | 677 |
| 674 return true; | 678 return true; |
| 675 } | 679 } |
| OLD | NEW |