Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: src/gpu/GrAAConvexPathRenderer.cpp

Issue 14882011: Pass bounds into draw calls in path renderers. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | src/gpu/GrDefaultPathRenderer.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | src/gpu/GrDefaultPathRenderer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698