summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/command_buffer_proxy.cc
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-24 22:27:04 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-24 22:27:04 +0000
commit8ceb44c74fc375df749b60acc6fc01b5327c6d18 (patch)
tree0512ef018e445f45d142e8a79ed4a19b9390b6d3 /chrome/renderer/command_buffer_proxy.cc
parentc16b5958cc9a47992e6c24473258582773036af5 (diff)
downloadchromium_src-8ceb44c74fc375df749b60acc6fc01b5327c6d18.zip
chromium_src-8ceb44c74fc375df749b60acc6fc01b5327c6d18.tar.gz
chromium_src-8ceb44c74fc375df749b60acc6fc01b5327c6d18.tar.bz2
I just put the code that does not compile on ARM. Trybots will fail because I had to remove these from the CL to make gcl upload properly accept it.
A + base\scoped_open_process.h A + chrome\plugin\command_buffer_stub_win.cc TEST=try BUG=none Review URL: http://codereview.chromium.org/661022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39937 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/command_buffer_proxy.cc')
-rw-r--r--chrome/renderer/command_buffer_proxy.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/chrome/renderer/command_buffer_proxy.cc b/chrome/renderer/command_buffer_proxy.cc
index 2b71fa8..b2eaa86 100644
--- a/chrome/renderer/command_buffer_proxy.cc
+++ b/chrome/renderer/command_buffer_proxy.cc
@@ -37,6 +37,8 @@ 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()
}
@@ -142,16 +144,7 @@ Buffer CommandBufferProxy::GetTransferBuffer(int32 id) {
}
// Cache the transfer buffer shared memory object client side.
-#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
+ base::SharedMemory* shared_memory = new base::SharedMemory(handle, false);
// Map the shared memory on demand.
if (!shared_memory->memory()) {
@@ -175,6 +168,12 @@ 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.