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

Unified Diff: src/gpu/GrAAConvexPathRenderer.cpp

Issue 1131553002: Isolate GrBufferAllocPools inside GrBatchTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT 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 | « include/gpu/GrContext.h ('k') | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAAConvexPathRenderer.cpp
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp
index 7e989946ac53320128f5d80e75a48f3c94844300..046ef80dc929125c61915c0770fad223a1a52513 100644
--- a/src/gpu/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/GrAAConvexPathRenderer.cpp
@@ -10,7 +10,6 @@
#include "GrBatch.h"
#include "GrBatchTarget.h"
-#include "GrBufferAllocPool.h"
#include "GrContext.h"
#include "GrDrawTargetCaps.h"
#include "GrGeometryProcessor.h"
@@ -795,11 +794,8 @@ public:
int firstVertex;
size_t vertexStride = quadProcessor->getVertexStride();
- void *vertices = batchTarget->vertexPool()->makeSpace(vertexStride,
- vertexCount,
- &vertexBuffer,
- &firstVertex);
-
+ void *vertices = batchTarget->makeVertSpace(vertexStride, vertexCount,
+ &vertexBuffer, &firstVertex);
if (!vertices) {
SkDebugf("Could not allocate vertices\n");
return;
@@ -808,17 +804,13 @@ public:
const GrIndexBuffer* indexBuffer;
int firstIndex;
- void *indices = batchTarget->indexPool()->makeSpace(indexCount,
- &indexBuffer,
- &firstIndex);
-
- if (!indices) {
+ uint16_t *idxs = batchTarget->makeIndexSpace(indexCount, &indexBuffer, &firstIndex);
+ if (!idxs) {
SkDebugf("Could not allocate indices\n");
return;
}
QuadVertex* verts = reinterpret_cast<QuadVertex*>(vertices);
- uint16_t* idxs = reinterpret_cast<uint16_t*>(indices);
SkSTArray<kPreallocDrawCnt, Draw, true> draws;
create_vertices(segments, fanPt, &draws, verts, idxs);
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698