| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/gpu/gpu_process_host.h" | 5 #include "content/browser/gpu/gpu_process_host.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 IPC::ChannelHandle(), | 523 IPC::ChannelHandle(), |
| 524 base::kNullProcessHandle, | 524 base::kNullProcessHandle, |
| 525 content::GPUInfo()); | 525 content::GPUInfo()); |
| 526 RouteOnUIThread(GpuHostMsg_OnLogMessage( | 526 RouteOnUIThread(GpuHostMsg_OnLogMessage( |
| 527 logging::LOG_WARNING, | 527 logging::LOG_WARNING, |
| 528 "WARNING", | 528 "WARNING", |
| 529 "Hardware acceleration is unavailable.")); | 529 "Hardware acceleration is unavailable.")); |
| 530 return; | 530 return; |
| 531 } | 531 } |
| 532 | 532 |
| 533 callback.Run(channel_handle, gpu_process_, | 533 callback.Run(channel_handle, |
| 534 GpuDataManagerImpl::GetInstance()->GetGPUInfo()); | 534 GpuDataManagerImpl::GetInstance()->GetGPUInfo()); |
| 535 } | 535 } |
| 536 | 536 |
| 537 void GpuProcessHost::OnCommandBufferCreated(const int32 route_id) { | 537 void GpuProcessHost::OnCommandBufferCreated(const int32 route_id) { |
| 538 if (!create_command_buffer_requests_.empty()) { | 538 if (!create_command_buffer_requests_.empty()) { |
| 539 CreateCommandBufferCallback callback = | 539 CreateCommandBufferCallback callback = |
| 540 create_command_buffer_requests_.front(); | 540 create_command_buffer_requests_.front(); |
| 541 create_command_buffer_requests_.pop(); | 541 create_command_buffer_requests_.pop(); |
| 542 if (route_id == MSG_ROUTING_NONE) | 542 if (route_id == MSG_ROUTING_NONE) |
| 543 CreateCommandBufferError(callback, route_id); | 543 CreateCommandBufferError(callback, route_id); |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 base::kNullProcessHandle, | 772 base::kNullProcessHandle, |
| 773 content::GPUInfo()); | 773 content::GPUInfo()); |
| 774 } | 774 } |
| 775 } | 775 } |
| 776 | 776 |
| 777 void GpuProcessHost::EstablishChannelError( | 777 void GpuProcessHost::EstablishChannelError( |
| 778 const EstablishChannelCallback& callback, | 778 const EstablishChannelCallback& callback, |
| 779 const IPC::ChannelHandle& channel_handle, | 779 const IPC::ChannelHandle& channel_handle, |
| 780 base::ProcessHandle renderer_process_for_gpu, | 780 base::ProcessHandle renderer_process_for_gpu, |
| 781 const content::GPUInfo& gpu_info) { | 781 const content::GPUInfo& gpu_info) { |
| 782 callback.Run(channel_handle, renderer_process_for_gpu, gpu_info); | 782 callback.Run(channel_handle, gpu_info); |
| 783 } | 783 } |
| 784 | 784 |
| 785 void GpuProcessHost::CreateCommandBufferError( | 785 void GpuProcessHost::CreateCommandBufferError( |
| 786 const CreateCommandBufferCallback& callback, int32 route_id) { | 786 const CreateCommandBufferCallback& callback, int32 route_id) { |
| 787 callback.Run(route_id); | 787 callback.Run(route_id); |
| 788 } | 788 } |
| OLD | NEW |