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

Unified Diff: src/gpu/GrBatchTarget.h

Issue 958433004: fix for msan (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | src/gpu/GrBatchTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrBatchTarget.h
diff --git a/src/gpu/GrBatchTarget.h b/src/gpu/GrBatchTarget.h
index 51dd8cac8941db6979bab5825f13765366e435ac..ebc2e0c46a88d1907ada902c8e66cb344b6267bd 100644
--- a/src/gpu/GrBatchTarget.h
+++ b/src/gpu/GrBatchTarget.h
@@ -8,6 +8,7 @@
#ifndef GrBatchBuffer_DEFINED
#define GrBatchBuffer_DEFINED
+#include "GrBufferAllocPool.h"
#include "GrPendingProgramElement.h"
#include "GrPipeline.h"
#include "GrGpu.h"
@@ -82,6 +83,15 @@ public:
const GrIndexBuffer* quadIndexBuffer() const { return fGpu->getQuadIndexBuffer(); }
+ // A helper for draws which overallocate and then return data to the pool
+ void putBackIndices(size_t indices) {
bsalomon 2015/02/24 21:05:17 oneliners?
+ fIndexPool->putBack(indices * sizeof(uint16_t));
+ }
+
+ void putBackVertices(size_t vertices, size_t vertexStride) {
+ fVertexPool->putBack(vertices * vertexStride);
+ }
+
private:
GrGpu* fGpu;
GrVertexBufferAllocPool* fVertexPool;
« no previous file with comments | « no previous file | src/gpu/GrBatchTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698