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

Unified Diff: src/gpu/batches/GrVertexBatch.cpp

Issue 2078483002: Start using GrGpuCommandBuffer in GrDrawTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@memoryWAR
Patch Set: clean up Created 4 years, 6 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
Index: src/gpu/batches/GrVertexBatch.cpp
diff --git a/src/gpu/batches/GrVertexBatch.cpp b/src/gpu/batches/GrVertexBatch.cpp
index 8a5dd6289bb30ad7427ea4b8ff5671ed3cfbb981..3ec62a43e14e244b85a16eb45bab1315ea3c1cd2 100644
--- a/src/gpu/batches/GrVertexBatch.cpp
+++ b/src/gpu/batches/GrVertexBatch.cpp
@@ -62,7 +62,7 @@ void* GrVertexBatch::QuadHelper::init(Target* target, size_t vertexStride,
quadIndexBuffer, kVerticesPerQuad, kIndicesPerQuad, quadsToDraw);
}
-void GrVertexBatch::onDraw(GrBatchFlushState* state) {
+void GrVertexBatch::onDraw(GrBatchFlushState* state, GrGpuCommandBuffer* buffer) {
int currUploadIdx = 0;
int currMeshIdx = 0;
@@ -75,8 +75,8 @@ void GrVertexBatch::onDraw(GrBatchFlushState* state) {
state->doUpload(fInlineUploads[currUploadIdx++].fUpload);
}
const QueuedDraw &draw = fQueuedDraws[currDrawIdx];
- state->gpu()->draw(*this->pipeline(), *draw.fGeometryProcessor.get(),
- fMeshes.begin() + currMeshIdx, draw.fMeshCnt);
+ buffer->draw(*this->pipeline(), *draw.fGeometryProcessor.get(),
+ fMeshes.begin() + currMeshIdx, draw.fMeshCnt);
currMeshIdx += draw.fMeshCnt;
state->flushToken();
}

Powered by Google App Engine
This is Rietveld 408576698