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

Side by Side Diff: chrome/plugin/command_buffer_stub.cc

Issue 6316002: Make CommandBuffer::Flush asynchronous, and add CommandBuffer::FlushSync with former semantics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 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/gpu/gpu_command_buffer_stub.cc ('k') | chrome/renderer/command_buffer_proxy.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/callback.h" 5 #include "base/callback.h"
6 #include "base/scoped_open_process.h" 6 #include "base/scoped_open_process.h"
7 #include "base/shared_memory.h" 7 #include "base/shared_memory.h"
8 #include "chrome/common/gpu_messages.h" 8 #include "chrome/common/gpu_messages.h"
9 #include "chrome/common/plugin_messages.h" 9 #include "chrome/common/plugin_messages.h"
10 #include "chrome/plugin/command_buffer_stub.h" 10 #include "chrome/plugin/command_buffer_stub.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 *state = command_buffer_->GetState(); 133 *state = command_buffer_->GetState();
134 } 134 }
135 135
136 void CommandBufferStub::OnAsyncGetState() { 136 void CommandBufferStub::OnAsyncGetState() {
137 gpu::CommandBuffer::State state = command_buffer_->GetState(); 137 gpu::CommandBuffer::State state = command_buffer_->GetState();
138 Send(new GpuCommandBufferMsg_UpdateState(route_id_, state)); 138 Send(new GpuCommandBufferMsg_UpdateState(route_id_, state));
139 } 139 }
140 140
141 void CommandBufferStub::OnFlush(int32 put_offset, 141 void CommandBufferStub::OnFlush(int32 put_offset,
142 gpu::CommandBuffer::State* state) { 142 gpu::CommandBuffer::State* state) {
143 *state = command_buffer_->Flush(put_offset); 143 *state = command_buffer_->FlushSync(put_offset);
144 } 144 }
145 145
146 void CommandBufferStub::OnAsyncFlush(int32 put_offset) { 146 void CommandBufferStub::OnAsyncFlush(int32 put_offset) {
147 gpu::CommandBuffer::State state = command_buffer_->Flush(put_offset); 147 gpu::CommandBuffer::State state = command_buffer_->FlushSync(put_offset);
148 Send(new GpuCommandBufferMsg_UpdateState(route_id_, state)); 148 Send(new GpuCommandBufferMsg_UpdateState(route_id_, state));
149 } 149 }
150 150
151 void CommandBufferStub::OnCreateTransferBuffer(int32 size, int32* id) { 151 void CommandBufferStub::OnCreateTransferBuffer(int32 size, int32* id) {
152 *id = command_buffer_->CreateTransferBuffer(size); 152 *id = command_buffer_->CreateTransferBuffer(size);
153 } 153 }
154 154
155 void CommandBufferStub::OnDestroyTransferBuffer(int32 id) { 155 void CommandBufferStub::OnDestroyTransferBuffer(int32 id) {
156 command_buffer_->DestroyTransferBuffer(id); 156 command_buffer_->DestroyTransferBuffer(id);
157 } 157 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 Send(new PluginHostMsg_AllocTransportDIB(plugin_host_route_id_, 238 Send(new PluginHostMsg_AllocTransportDIB(plugin_host_route_id_,
239 size, 239 size,
240 dib_handle)); 240 dib_handle));
241 } 241 }
242 242
243 void CommandBufferStub::FreeTransportDIB(TransportDIB::Id dib_id) { 243 void CommandBufferStub::FreeTransportDIB(TransportDIB::Id dib_id) {
244 Send(new PluginHostMsg_FreeTransportDIB(plugin_host_route_id_, 244 Send(new PluginHostMsg_FreeTransportDIB(plugin_host_route_id_,
245 dib_id)); 245 dib_id));
246 } 246 }
247 #endif 247 #endif
OLDNEW
« no previous file with comments | « chrome/gpu/gpu_command_buffer_stub.cc ('k') | chrome/renderer/command_buffer_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698