Index: gpu/command_buffer/client/buffer_tracker.cc |
diff --git a/gpu/command_buffer/client/buffer_tracker.cc b/gpu/command_buffer/client/buffer_tracker.cc |
index 18cedb975d059664d421d5e65f11a982a39a474b..5b0f8bafa7e53b0a669cfabbe2b4e337950af978 100644 |
--- a/gpu/command_buffer/client/buffer_tracker.cc |
+++ b/gpu/command_buffer/client/buffer_tracker.cc |
@@ -60,8 +60,29 @@ void BufferTracker::FreePendingToken(Buffer* buffer, int32 token) { |
buffer->shm_id_ = 0; |
buffer->shm_offset_ = 0; |
buffer->address_ = NULL; |
+ buffer->last_usage_token_ = 0; |
} |
+void BufferTracker::FreePendingSerial(Buffer* buffer, uint32 serial) { |
+ if (buffer->address_) |
+ mapped_memory_->FreePendingSerial(buffer->address_, serial); |
+ buffer->size_ = 0; |
+ buffer->shm_id_ = 0; |
+ buffer->shm_offset_ = 0; |
+ buffer->address_ = NULL; |
+ buffer->last_usage_token_ = 0; |
+} |
+ |
+void BufferTracker::Free(Buffer* buffer) { |
+ if (buffer->address_) |
+ mapped_memory_->Free(buffer->address_); |
+ |
+ buffer->size_ = 0; |
+ buffer->shm_id_ = 0; |
+ buffer->shm_offset_ = 0; |
+ buffer->address_ = NULL; |
+ buffer->last_usage_token_ = 0; |
+} |
} // namespace gles2 |
} // namespace gpu |