Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: gpu/command_buffer/service/command_buffer_service.h

Issue 116863003: gpu: Reuse transfer buffers more aggresively (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: [WIP] Introduced internal SetAsyncToken command buffer command Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/command_buffer_service.h
diff --git a/gpu/command_buffer/service/command_buffer_service.h b/gpu/command_buffer/service/command_buffer_service.h
index b1f8fa15fea6a2d3da4a9681f8dad587a01d6c35..5a3591f5421c8e39377dbdbb6f08bb94d8e6cd3f 100644
--- a/gpu/command_buffer/service/command_buffer_service.h
+++ b/gpu/command_buffer/service/command_buffer_service.h
@@ -7,6 +7,7 @@
#include "base/callback.h"
#include "base/memory/shared_memory.h"
+#include "base/synchronization/lock.h"
#include "gpu/command_buffer/common/command_buffer.h"
#include "gpu/command_buffer/common/command_buffer_shared.h"
@@ -36,6 +37,7 @@ class GPU_EXPORT CommandBufferService : public CommandBuffer {
virtual void DestroyTransferBuffer(int32 id) OVERRIDE;
virtual Buffer GetTransferBuffer(int32 id) OVERRIDE;
virtual void SetToken(int32 token) OVERRIDE;
+ virtual void SetAsyncToken(uint32 token) OVERRIDE;
virtual void SetParseError(error::Error error) OVERRIDE;
virtual void SetContextLostReason(error::ContextLostReason) OVERRIDE;
@@ -67,6 +69,8 @@ class GPU_EXPORT CommandBufferService : public CommandBuffer {
size_t size);
private:
+ State GetStateImpl();
reveman 2014/01/22 17:30:04 Can you adjust the name of this so it's clear |loc
+
int32 ring_buffer_id_;
Buffer ring_buffer_;
scoped_ptr<base::SharedMemory> shared_state_shm_;
@@ -79,9 +83,11 @@ class GPU_EXPORT CommandBufferService : public CommandBuffer {
base::Closure parse_error_callback_;
TransferBufferManagerInterface* transfer_buffer_manager_;
int32 token_;
+ uint32 async_token_;
uint32 generation_;
error::Error error_;
error::ContextLostReason context_lost_reason_;
+ base::Lock lock_;
reveman 2014/01/22 17:30:04 Would be nice with a comment here describing what
epenner 2014/01/23 02:52:44 I'm agreeing with Piman that a lock_ doesn't seem
DISALLOW_COPY_AND_ASSIGN(CommandBufferService);
};

Powered by Google App Engine
This is Rietveld 408576698