OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #if defined(ENABLE_GPU) | 5 #if defined(ENABLE_GPU) |
6 | 6 |
7 #include "base/process_util.h" | 7 #include "base/process_util.h" |
8 #include "base/shared_memory.h" | 8 #include "base/shared_memory.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/common/child_thread.h" | 10 #include "chrome/common/child_thread.h" |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 Send(new GpuCommandBufferMsg_UpdateState(route_id_, state)); | 282 Send(new GpuCommandBufferMsg_UpdateState(route_id_, state)); |
283 } | 283 } |
284 | 284 |
285 void GpuCommandBufferStub::OnFlush(int32 put_offset, | 285 void GpuCommandBufferStub::OnFlush(int32 put_offset, |
286 gpu::CommandBuffer::State* state) { | 286 gpu::CommandBuffer::State* state) { |
287 #if defined(OS_MACOSX) | 287 #if defined(OS_MACOSX) |
288 // See comment in |DidDestroySurface()| in gpu_processor_mac.cc. | 288 // See comment in |DidDestroySurface()| in gpu_processor_mac.cc. |
289 if (channel_->IsRenderViewGone(render_view_id_)) | 289 if (channel_->IsRenderViewGone(render_view_id_)) |
290 processor_->DidDestroySurface(); | 290 processor_->DidDestroySurface(); |
291 #endif | 291 #endif |
292 *state = command_buffer_->Flush(put_offset); | 292 *state = command_buffer_->FlushSync(put_offset); |
293 } | 293 } |
294 | 294 |
295 void GpuCommandBufferStub::OnAsyncFlush(int32 put_offset) { | 295 void GpuCommandBufferStub::OnAsyncFlush(int32 put_offset) { |
296 gpu::CommandBuffer::State state = command_buffer_->Flush(put_offset); | 296 gpu::CommandBuffer::State state = command_buffer_->FlushSync(put_offset); |
297 Send(new GpuCommandBufferMsg_UpdateState(route_id_, state)); | 297 Send(new GpuCommandBufferMsg_UpdateState(route_id_, state)); |
298 } | 298 } |
299 | 299 |
300 void GpuCommandBufferStub::OnCreateTransferBuffer(int32 size, int32* id) { | 300 void GpuCommandBufferStub::OnCreateTransferBuffer(int32 size, int32* id) { |
301 *id = command_buffer_->CreateTransferBuffer(size); | 301 *id = command_buffer_->CreateTransferBuffer(size); |
302 } | 302 } |
303 | 303 |
304 void GpuCommandBufferStub::OnDestroyTransferBuffer(int32 id) { | 304 void GpuCommandBufferStub::OnDestroyTransferBuffer(int32 id) { |
305 command_buffer_->DestroyTransferBuffer(id); | 305 command_buffer_->DestroyTransferBuffer(id); |
306 } | 306 } |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 new GpuHostMsg_ResizeXID(handle_, size, &result)); | 384 new GpuHostMsg_ResizeXID(handle_, size, &result)); |
385 #elif defined(OS_WIN) | 385 #elif defined(OS_WIN) |
386 HWND hwnd = static_cast<HWND>(compositor_window_); | 386 HWND hwnd = static_cast<HWND>(compositor_window_); |
387 UINT swp_flags = SWP_NOSENDCHANGING | SWP_NOOWNERZORDER | SWP_NOCOPYBITS | | 387 UINT swp_flags = SWP_NOSENDCHANGING | SWP_NOOWNERZORDER | SWP_NOCOPYBITS | |
388 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE; | 388 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE; |
389 SetWindowPos(hwnd, NULL, 0, 0, size.width(), size.height(), swp_flags); | 389 SetWindowPos(hwnd, NULL, 0, 0, size.width(), size.height(), swp_flags); |
390 #endif // defined(OS_LINUX) | 390 #endif // defined(OS_LINUX) |
391 } | 391 } |
392 | 392 |
393 #endif // defined(ENABLE_GPU) | 393 #endif // defined(ENABLE_GPU) |
OLD | NEW |