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

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

Issue 9380037: Use shared memory to update the renderer's view of the command buffer state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor unit test change Created 8 years, 10 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 77046363d634ba24ea48f99e8c12f73f1d0237af..2c59678e60406834c9b17671487389ae96d9a1ba 100644
--- a/gpu/command_buffer/service/command_buffer_service.h
+++ b/gpu/command_buffer/service/command_buffer_service.h
@@ -13,6 +13,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/shared_memory.h"
#include "gpu/command_buffer/common/command_buffer.h"
+#include "gpu/command_buffer/common/command_buffer_shared.h"
namespace gpu {
@@ -56,9 +57,16 @@ class CommandBufferService : public CommandBuffer {
const GetBufferChangedCallback& callback);
virtual void SetParseErrorCallback(const base::Closure& callback);
+ // Setup the transfer buffer that shared state should be copied into.
+ void SetSharedStateBuffer(int32 transfer_buffer_id);
+
+ // Copy the current state into the shared state transfer buffer.
+ void UpdateState();
+
private:
int32 ring_buffer_id_;
Buffer ring_buffer_;
+ CommandBufferSharedState* shared_state_;
int32 num_entries_;
int32 get_offset_;
int32 put_offset_;

Powered by Google App Engine
This is Rietveld 408576698