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

Side by Side Diff: chrome/renderer/command_buffer_proxy.cc

Issue 525022: Revert 35509 - linux: implement gpu plugin... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/logging.h" 5 #include "base/logging.h"
6 #include "base/process_util.h" 6 #include "base/process_util.h"
7 #include "chrome/common/command_buffer_messages.h" 7 #include "chrome/common/command_buffer_messages.h"
8 #include "chrome/common/plugin_messages.h" 8 #include "chrome/common/plugin_messages.h"
9 #include "chrome/renderer/command_buffer_proxy.h" 9 #include "chrome/renderer/command_buffer_proxy.h"
10 #include "chrome/renderer/plugin_channel_host.h" 10 #include "chrome/renderer/plugin_channel_host.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 base::SharedMemoryHandle handle; 146 base::SharedMemoryHandle handle;
147 size_t size; 147 size_t size;
148 if (!Send(new CommandBufferMsg_GetTransferBuffer(route_id_, 148 if (!Send(new CommandBufferMsg_GetTransferBuffer(route_id_,
149 id, 149 id,
150 &handle, 150 &handle,
151 &size))) { 151 &size))) {
152 return Buffer(); 152 return Buffer();
153 } 153 }
154 154
155 // Cache the transfer buffer shared memory object client side. 155 // Cache the transfer buffer shared memory object client side.
156 #if defined(OS_WIN)
157 // TODO(piman): Does Windows needs this version of the constructor ? It
158 // duplicates the handle, but I'm not sure why it is necessary - it was
159 // already duped by the CommandBufferStub.
160 base::SharedMemory* shared_memory = 156 base::SharedMemory* shared_memory =
161 new base::SharedMemory(handle, false, base::GetCurrentProcessHandle()); 157 new base::SharedMemory(handle, false, base::GetCurrentProcessHandle());
162 #else
163 base::SharedMemory* shared_memory =
164 new base::SharedMemory(handle, false);
165 #endif
166 158
167 // Map the shared memory on demand. 159 // Map the shared memory on demand.
168 if (!shared_memory->memory()) { 160 if (!shared_memory->memory()) {
169 if (!shared_memory->Map(size)) { 161 if (!shared_memory->Map(shared_memory->max_size())) {
170 delete shared_memory; 162 delete shared_memory;
171 return Buffer(); 163 return Buffer();
172 } 164 }
173 } 165 }
174 166
175 Buffer buffer; 167 Buffer buffer;
176 buffer.ptr = shared_memory->memory(); 168 buffer.ptr = shared_memory->memory();
177 buffer.size = size; 169 buffer.size = size;
178 buffer.shared_memory = shared_memory; 170 buffer.shared_memory = shared_memory;
179 transfer_buffers_[id] = buffer; 171 transfer_buffers_[id] = buffer;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 if (Send(new CommandBufferMsg_GetErrorStatus(route_id_, &status))) 204 if (Send(new CommandBufferMsg_GetErrorStatus(route_id_, &status)))
213 return status; 205 return status;
214 206
215 return true; 207 return true;
216 } 208 }
217 209
218 void CommandBufferProxy::RaiseErrorStatus() { 210 void CommandBufferProxy::RaiseErrorStatus() {
219 // Not implemented in proxy. 211 // Not implemented in proxy.
220 NOTREACHED(); 212 NOTREACHED();
221 } 213 }
OLDNEW
« 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