| 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 90288d9fb8fb5e79ae68d72e13de20b790d5d7b9..71e6178e8322d53cd75a6c0bdea147c2708d068c 100644
|
| --- a/gpu/command_buffer/client/fenced_allocator.h
|
| +++ b/gpu/command_buffer/client/fenced_allocator.h
|
| @@ -83,6 +83,9 @@ class GPU_EXPORT FencedAllocator {
|
| // True if any memory is allocated.
|
| bool InUse();
|
|
|
| + // Return bytes of memory that is IN_USE
|
| + size_t bytes_in_use() const { return bytes_in_use_; }
|
| +
|
| private:
|
| // Status of a block of memory, for book-keeping.
|
| enum State {
|
| @@ -134,6 +137,7 @@ class GPU_EXPORT FencedAllocator {
|
|
|
| CommandBufferHelper *helper_;
|
| Container blocks_;
|
| + size_t bytes_in_use_;
|
|
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(FencedAllocator);
|
| };
|
| @@ -243,6 +247,8 @@ class FencedAllocatorWrapper {
|
|
|
| FencedAllocator &allocator() { return allocator_; }
|
|
|
| + size_t bytes_in_use() const { return allocator_.bytes_in_use(); }
|
| +
|
| private:
|
| FencedAllocator allocator_;
|
| void* base_;
|
|
|