summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/command_buffer_proxy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer/command_buffer_proxy.cc')
-rw-r--r--chrome/renderer/command_buffer_proxy.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/chrome/renderer/command_buffer_proxy.cc b/chrome/renderer/command_buffer_proxy.cc
index b2eaa86..2b71fa8 100644
--- a/chrome/renderer/command_buffer_proxy.cc
+++ b/chrome/renderer/command_buffer_proxy.cc
@@ -37,8 +37,6 @@ CommandBufferProxy::~CommandBufferProxy() {
void CommandBufferProxy::OnMessageReceived(const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(CommandBufferProxy, message)
IPC_MESSAGE_HANDLER(CommandBufferMsg_UpdateState, OnUpdateState);
- IPC_MESSAGE_HANDLER(CommandBufferMsg_NotifyRepaint,
- OnNotifyRepaint);
IPC_MESSAGE_UNHANDLED_ERROR()
IPC_END_MESSAGE_MAP()
}
@@ -144,7 +142,16 @@ Buffer CommandBufferProxy::GetTransferBuffer(int32 id) {
}
// Cache the transfer buffer shared memory object client side.
- base::SharedMemory* shared_memory = new base::SharedMemory(handle, false);
+#if defined(OS_WIN)
+ // TODO(piman): Does Windows needs this version of the constructor ? It
+ // duplicates the handle, but I'm not sure why it is necessary - it was
+ // already duped by the CommandBufferStub.
+ base::SharedMemory* shared_memory =
+ new base::SharedMemory(handle, false, base::GetCurrentProcessHandle());
+#else
+ base::SharedMemory* shared_memory =
+ new base::SharedMemory(handle, false);
+#endif
// Map the shared memory on demand.
if (!shared_memory->memory()) {
@@ -168,12 +175,6 @@ void CommandBufferProxy::SetToken(int32 token) {
NOTREACHED();
}
-void CommandBufferProxy::OnNotifyRepaint() {
- if (notify_repaint_task_.get())
- MessageLoop::current()->PostNonNestableTask(
- FROM_HERE, notify_repaint_task_.release());
-}
-
void CommandBufferProxy::SetParseError(
gpu::error::Error error) {
// Not implemented in proxy.