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

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

Issue 1124733004: Move DrawInfo out from GrDrawTarget and rename to GrVertices. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comment changes Created 5 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
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »
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 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 SkDebugf("Could not allocate indices\n"); 816 SkDebugf("Could not allocate indices\n");
817 return; 817 return;
818 } 818 }
819 819
820 QuadVertex* verts = reinterpret_cast<QuadVertex*>(vertices); 820 QuadVertex* verts = reinterpret_cast<QuadVertex*>(vertices);
821 uint16_t* idxs = reinterpret_cast<uint16_t*>(indices); 821 uint16_t* idxs = reinterpret_cast<uint16_t*>(indices);
822 822
823 SkSTArray<kPreallocDrawCnt, Draw, true> draws; 823 SkSTArray<kPreallocDrawCnt, Draw, true> draws;
824 create_vertices(segments, fanPt, &draws, verts, idxs); 824 create_vertices(segments, fanPt, &draws, verts, idxs);
825 825
826 GrDrawTarget::DrawInfo info; 826 GrVertices info;
827 827
828 for (int i = 0; i < draws.count(); ++i) { 828 for (int i = 0; i < draws.count(); ++i) {
829 const Draw& draw = draws[i]; 829 const Draw& draw = draws[i];
830 info.initIndexed(kTriangles_GrPrimitiveType, vertexBuffer, index Buffer, firstVertex, 830 info.initIndexed(kTriangles_GrPrimitiveType, vertexBuffer, index Buffer, firstVertex,
831 firstIndex, draw.fVertexCnt, draw.fIndexCnt); 831 firstIndex, draw.fVertexCnt, draw.fIndexCnt);
832 batchTarget->draw(info); 832 batchTarget->draw(info);
833 firstVertex += draw.fVertexCnt; 833 firstVertex += draw.fVertexCnt;
834 firstIndex += draw.fIndexCnt; 834 firstIndex += draw.fIndexCnt;
835 } 835 }
836 } 836 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 geometry.fColor = color; 895 geometry.fColor = color;
896 geometry.fViewMatrix = vm; 896 geometry.fViewMatrix = vm;
897 geometry.fPath = path; 897 geometry.fPath = path;
898 898
899 SkAutoTUnref<GrBatch> batch(AAConvexPathBatch::Create(geometry)); 899 SkAutoTUnref<GrBatch> batch(AAConvexPathBatch::Create(geometry));
900 target->drawBatch(pipelineBuilder, batch); 900 target->drawBatch(pipelineBuilder, batch);
901 901
902 return true; 902 return true;
903 903
904 } 904 }
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698