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

Unified Diff: content/common/gpu/client/command_buffer_proxy.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: content/common/gpu/client/command_buffer_proxy.h
diff --git a/content/common/gpu/client/command_buffer_proxy.h b/content/common/gpu/client/command_buffer_proxy.h
index 398f7942de564500cbb2c8cf3f24e2c11f01df0f..37cbe7cb1724e1e94de76a8360bccca086946438 100644
--- a/content/common/gpu/client/command_buffer_proxy.h
+++ b/content/common/gpu/client/command_buffer_proxy.h
@@ -18,6 +18,7 @@
#include "base/memory/weak_ptr.h"
#include "content/common/gpu/client/gpu_video_decode_accelerator_host.h"
#include "gpu/command_buffer/common/command_buffer.h"
+#include "gpu/command_buffer/common/command_buffer_shared.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_message.h"
@@ -116,6 +117,9 @@ class CommandBufferProxy : public gpu::CommandBuffer,
void OnEchoAck();
void OnConsoleMessage(const GPUCommandBufferConsoleMessage& message);
+ // Try to read an updated copy of the state from shared memory.
+ void TryUpdateState();
+
// Local cache of id to transfer buffer mapping.
typedef std::map<int32, gpu::Buffer> TransferBufferMap;
TransferBufferMap transfer_buffers_;
@@ -128,6 +132,9 @@ class CommandBufferProxy : public gpu::CommandBuffer,
// The last cached state received from the service.
State last_state_;
apatrick_chromium 2012/02/13 20:50:58 Do we need to have two copied of the shared state?
+ // The shared memory area used to update state.
+ gpu::CommandBufferSharedState* shared_state_;
+
// |*this| is owned by |*channel_| and so is always outlived by it, so using a
// raw pointer is ok.
GpuChannelHost* channel_;
« no previous file with comments | « no previous file | content/common/gpu/client/command_buffer_proxy.cc » ('j') | content/common/gpu/client/command_buffer_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698