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

Unified Diff: src/gpu/GrBatchTarget.cpp

Issue 1139753002: Refactor GrBufferAllocPools to use resource cache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clean up 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
Index: src/gpu/GrBatchTarget.cpp
diff --git a/src/gpu/GrBatchTarget.cpp b/src/gpu/GrBatchTarget.cpp
index 31b4cc9f47f15ab287e5be8e65d29b8816ea0ff6..5ca796fdf520e4d1dbdfac8c4923c390bdafa225 100644
--- a/src/gpu/GrBatchTarget.cpp
+++ b/src/gpu/GrBatchTarget.cpp
@@ -10,12 +10,6 @@
#include "GrBatchAtlas.h"
#include "GrPipeline.h"
-static const size_t DRAW_BUFFER_VBPOOL_BUFFER_SIZE = 1 << 15;
-static const int DRAW_BUFFER_VBPOOL_PREALLOC_BUFFERS = 4;
-
-static const size_t DRAW_BUFFER_IBPOOL_BUFFER_SIZE = 1 << 11;
-static const int DRAW_BUFFER_IBPOOL_PREALLOC_BUFFERS = 4;
-
GrBatchTarget::GrBatchTarget(GrGpu* gpu)
: fGpu(gpu)
, fFlushBuffer(kFlushBufferInitialSizeInBytes)
@@ -25,12 +19,8 @@ GrBatchTarget::GrBatchTarget(GrGpu* gpu)
, fLastFlushedToken(0)
, fInlineUpdatesIndex(0) {
- fVertexPool.reset(SkNEW_ARGS(GrVertexBufferAllocPool, (fGpu,
- DRAW_BUFFER_VBPOOL_BUFFER_SIZE,
- DRAW_BUFFER_VBPOOL_PREALLOC_BUFFERS)));
- fIndexPool.reset(SkNEW_ARGS(GrIndexBufferAllocPool, (fGpu,
- DRAW_BUFFER_IBPOOL_BUFFER_SIZE,
- DRAW_BUFFER_IBPOOL_PREALLOC_BUFFERS)));
+ fVertexPool.reset(SkNEW_ARGS(GrVertexBufferAllocPool, (fGpu)));
bsalomon 2015/05/13 16:24:07 need to be dynamic?
robertphillips 2015/05/13 16:56:14 Done.
+ fIndexPool.reset(SkNEW_ARGS(GrIndexBufferAllocPool, (fGpu)));
}
void GrBatchTarget::flushNext(int n) {

Powered by Google App Engine
This is Rietveld 408576698