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

Unified Diff: src/gpu/GrTessellatingPathRenderer.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTessellatingPathRenderer.cpp
diff --git a/src/gpu/GrTessellatingPathRenderer.cpp b/src/gpu/GrTessellatingPathRenderer.cpp
index 5fd1bcd47902563268329e798fbf3b2eea9de43e..262cce3e3dbe7fc8209a9c2304a6bc783eaf758c 100644
--- a/src/gpu/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/GrTessellatingPathRenderer.cpp
@@ -11,7 +11,7 @@
#include "GrBatchTarget.h"
#include "GrDefaultGeoProcFactory.h"
#include "GrPathUtils.h"
-#include "GrVertexBuffer.h"
+#include "GrVertices.h"
#include "SkChunkAlloc.h"
#include "SkGeometry.h"
@@ -1439,28 +1439,28 @@ public:
size_t stride = gp->getVertexStride();
const GrVertexBuffer* vertexBuffer;
int firstVertex;
- void* vertices = batchTarget->vertexPool()->makeSpace(stride,
- count,
- &vertexBuffer,
- &firstVertex);
+ void* verts = batchTarget->vertexPool()->makeSpace(stride,
+ count,
+ &vertexBuffer,
+ &firstVertex);
- if (!vertices) {
+ if (!verts) {
SkDebugf("Could not allocate vertices\n");
return;
}
LOG("emitting %d verts\n", count);
- void* end = polys_to_triangles(polys, fillType, vertices);
+ void* end = polys_to_triangles(polys, fillType, verts);
int actualCount = static_cast<int>(
- (static_cast<char*>(end) - static_cast<char*>(vertices)) / stride);
+ (static_cast<char*>(end) - static_cast<char*>(verts)) / stride);
LOG("actual count: %d\n", actualCount);
SkASSERT(actualCount <= count);
GrPrimitiveType primitiveType = WIREFRAME ? kLines_GrPrimitiveType
: kTriangles_GrPrimitiveType;
- GrDrawTarget::DrawInfo drawInfo;
- drawInfo.init(primitiveType, vertexBuffer, firstVertex, actualCount);
- batchTarget->draw(drawInfo);
+ GrVertices vertices;
+ vertices.init(primitiveType, vertexBuffer, firstVertex, actualCount);
+ batchTarget->draw(vertices);
batchTarget->putBackVertices((size_t)(count - actualCount), stride);
return;
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698