OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |