summaryrefslogtreecommitdiff
path: root/chromium/gpu/command_buffer/client/fenced_allocator.h
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2013-12-11 21:33:03 +0100
committerAndras Becsi <andras.becsi@digia.com>2013-12-13 12:34:07 +0100
commitf2a33ff9cbc6d19943f1c7fbddd1f23d23975577 (patch)
tree0586a32aa390ade8557dfd6b4897f43a07449578 /chromium/gpu/command_buffer/client/fenced_allocator.h
parent5362912cdb5eea702b68ebe23702468d17c3017a (diff)
downloadqtwebengine-chromium-f2a33ff9cbc6d19943f1c7fbddd1f23d23975577.tar.gz
Update Chromium to branch 1650 (31.0.1650.63)
Change-Id: I57d8c832eaec1eb2364e0a8e7352a6dd354db99f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'chromium/gpu/command_buffer/client/fenced_allocator.h')
-rw-r--r--chromium/gpu/command_buffer/client/fenced_allocator.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/chromium/gpu/command_buffer/client/fenced_allocator.h b/chromium/gpu/command_buffer/client/fenced_allocator.h
index 90288d9fb8f..71e6178e832 100644
--- a/chromium/gpu/command_buffer/client/fenced_allocator.h
+++ b/chromium/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_;