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

Unified Diff: chrome/renderer/command_buffer_proxy.cc

Issue 500132: linux: implement gpu plugin (Closed)
Patch Set: . Created 10 years, 12 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
« no previous file with comments | « chrome/plugin/command_buffer_stub.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/command_buffer_proxy.cc
diff --git a/chrome/renderer/command_buffer_proxy.cc b/chrome/renderer/command_buffer_proxy.cc
index b78fa84e83bfaff3ff276e9f03d87367ce7f23b5..3b68cc216dd7ffcc16aa6c30f2ed7ae41ac996ef 100644
--- a/chrome/renderer/command_buffer_proxy.cc
+++ b/chrome/renderer/command_buffer_proxy.cc
@@ -153,12 +153,20 @@ 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
// Map the shared memory on demand.
if (!shared_memory->memory()) {
- if (!shared_memory->Map(shared_memory->max_size())) {
+ if (!shared_memory->Map(size)) {
delete shared_memory;
return Buffer();
}
« no previous file with comments | « chrome/plugin/command_buffer_stub.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698