Index: gpu/command_buffer/client/buffer_tracker.h |
diff --git a/gpu/command_buffer/client/buffer_tracker.h b/gpu/command_buffer/client/buffer_tracker.h |
index 3e50364317d234bc9d7ed336c81de4fdbc26d5a4..8eb3fea8d6c6d49cc8efea87daea6387e73d2154 100644 |
--- a/gpu/command_buffer/client/buffer_tracker.h |
+++ b/gpu/command_buffer/client/buffer_tracker.h |
@@ -35,7 +35,8 @@ class GLES2_IMPL_EXPORT BufferTracker { |
shm_offset_(shm_offset), |
address_(address), |
mapped_(false), |
- transfer_ready_token_(0) { |
+ last_usage_token_(0), |
+ async_token_(0) { |
epennerAtGoogle
2014/02/07 20:43:58
Naming nit: 'last_async_token'? I recall there wa
jadahl
2014/02/08 09:18:25
Before I called it "serial" and changed it to asyn
epennerAtGoogle
2014/02/10 23:12:06
Ahh I see. +1 to last_async_upload_token. No stron
|
} |
GLenum id() const { |
@@ -66,12 +67,20 @@ class GLES2_IMPL_EXPORT BufferTracker { |
return mapped_; |
} |
- void set_transfer_ready_token(int token) { |
- transfer_ready_token_ = token; |
+ void set_last_usage_token(int token) { |
+ last_usage_token_ = token; |
} |
- uint32 transfer_ready_token() const { |
- return transfer_ready_token_; |
+ int last_usage_token() const { |
+ return last_usage_token_; |
+ } |
+ |
+ void set_async_token(uint32 async_token) { |
+ async_token_ = async_token; |
+ } |
+ |
+ GLuint async_token() const { |
+ return async_token_; |
} |
private: |
@@ -84,7 +93,8 @@ class GLES2_IMPL_EXPORT BufferTracker { |
uint32 shm_offset_; |
void* address_; |
bool mapped_; |
- int32 transfer_ready_token_; |
+ int32 last_usage_token_; |
+ GLuint async_token_; |
}; |
BufferTracker(MappedMemoryManager* manager); |
@@ -96,7 +106,9 @@ class GLES2_IMPL_EXPORT BufferTracker { |
// Frees the block of memory associated with buffer, pending the passage |
// of a token. |
- void FreePendingToken(Buffer*, int32 token); |
+ void FreePendingToken(Buffer* buffer, int32 token); |
+ void Unmanage(Buffer* buffer); |
+ void Free(Buffer* buffer); |
private: |
typedef base::hash_map<GLuint, Buffer*> BufferMap; |