Index: gpu/command_buffer/client/fenced_allocator.h |
diff --git a/gpu/command_buffer/client/fenced_allocator.h b/gpu/command_buffer/client/fenced_allocator.h |
index bb5c55170ab25e2766a4804c762a51ee00e8c2f3..f2d39879dab5b165ee02c397720a84287e52c6c1 100644 |
--- a/gpu/command_buffer/client/fenced_allocator.h |
+++ b/gpu/command_buffer/client/fenced_allocator.h |
@@ -35,6 +35,7 @@ class GPU_EXPORT FencedAllocator { |
// Creates a FencedAllocator. Note that the size of the buffer is passed, but |
// not its base address: everything is handled as offsets into the buffer. |
FencedAllocator(unsigned int size, |
+ bool aggressive_reuse, |
epennerAtGoogle
2013/12/18 19:21:15
Rather than a separate allocator, do you think it
|
CommandBufferHelper *helper); |
~FencedAllocator(); |
@@ -87,6 +88,8 @@ class GPU_EXPORT FencedAllocator { |
size_t bytes_in_use() const { return bytes_in_use_; } |
private: |
+ Offset AggressiveAlloc(unsigned int size); |
+ |
// Status of a block of memory, for book-keeping. |
enum State { |
IN_USE, |
@@ -137,6 +140,7 @@ class GPU_EXPORT FencedAllocator { |
CommandBufferHelper *helper_; |
Container blocks_; |
+ bool aggressive_reuse_; |
size_t bytes_in_use_; |
DISALLOW_IMPLICIT_CONSTRUCTORS(FencedAllocator); |
@@ -147,9 +151,10 @@ class GPU_EXPORT FencedAllocator { |
class FencedAllocatorWrapper { |
public: |
FencedAllocatorWrapper(unsigned int size, |
+ bool aggressive_reuse, |
CommandBufferHelper* helper, |
void* base) |
- : allocator_(size, helper), |
+ : allocator_(size, aggressive_reuse, helper), |
base_(base) { } |
// Allocates a block of memory. If the buffer is out of directly available |