| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "ui/gfx/gtk_native_view_id_manager.h" | 42 #include "ui/gfx/gtk_native_view_id_manager.h" |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 #if defined(OS_WIN) && !defined(USE_AURA) | 45 #if defined(OS_WIN) && !defined(USE_AURA) |
| 46 #include "ui/surface/accelerated_surface_win.h" | 46 #include "ui/surface/accelerated_surface_win.h" |
| 47 #endif | 47 #endif |
| 48 | 48 |
| 49 using content::BrowserThread; | 49 using content::BrowserThread; |
| 50 using content::ChildProcessHost; | 50 using content::ChildProcessHost; |
| 51 using content::RenderProcessHost; | 51 using content::RenderProcessHost; |
| 52 using content::RenderWidgetHelper; |
| 52 using content::RenderWidgetHost; | 53 using content::RenderWidgetHost; |
| 53 using content::RenderWidgetHostImpl; | 54 using content::RenderWidgetHostImpl; |
| 54 | 55 |
| 55 bool GpuProcessHost::gpu_enabled_ = true; | 56 bool GpuProcessHost::gpu_enabled_ = true; |
| 56 bool GpuProcessHost::hardware_gpu_enabled_ = true; | 57 bool GpuProcessHost::hardware_gpu_enabled_ = true; |
| 57 | 58 |
| 58 namespace { | 59 namespace { |
| 59 | 60 |
| 60 enum GPUProcessLifetimeEvent { | 61 enum GPUProcessLifetimeEvent { |
| 61 LAUNCHED, | 62 LAUNCHED, |
| (...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 const IPC::ChannelHandle& channel_handle, | 858 const IPC::ChannelHandle& channel_handle, |
| 858 base::ProcessHandle renderer_process_for_gpu, | 859 base::ProcessHandle renderer_process_for_gpu, |
| 859 const content::GPUInfo& gpu_info) { | 860 const content::GPUInfo& gpu_info) { |
| 860 callback.Run(channel_handle, gpu_info); | 861 callback.Run(channel_handle, gpu_info); |
| 861 } | 862 } |
| 862 | 863 |
| 863 void GpuProcessHost::CreateCommandBufferError( | 864 void GpuProcessHost::CreateCommandBufferError( |
| 864 const CreateCommandBufferCallback& callback, int32 route_id) { | 865 const CreateCommandBufferCallback& callback, int32 route_id) { |
| 865 callback.Run(route_id); | 866 callback.Run(route_id); |
| 866 } | 867 } |
| OLD | NEW |