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 11 matching lines...) Expand all Loading... |
22 #include "content/browser/renderer_host/render_widget_host_impl.h" | 22 #include "content/browser/renderer_host/render_widget_host_impl.h" |
23 #include "content/common/child_process_host_impl.h" | 23 #include "content/common/child_process_host_impl.h" |
24 #include "content/common/gpu/gpu_messages.h" | 24 #include "content/common/gpu/gpu_messages.h" |
25 #include "content/gpu/gpu_child_thread.h" | 25 #include "content/gpu/gpu_child_thread.h" |
26 #include "content/gpu/gpu_process.h" | 26 #include "content/gpu/gpu_process.h" |
27 #include "content/public/browser/browser_thread.h" | 27 #include "content/public/browser/browser_thread.h" |
28 #include "content/public/browser/content_browser_client.h" | 28 #include "content/public/browser/content_browser_client.h" |
29 #include "content/public/browser/render_widget_host_view.h" | 29 #include "content/public/browser/render_widget_host_view.h" |
30 #include "content/public/common/content_switches.h" | 30 #include "content/public/common/content_switches.h" |
31 #include "content/public/common/result_codes.h" | 31 #include "content/public/common/result_codes.h" |
| 32 #include "gpu/command_buffer/service/gpu_switches.h" |
32 #include "ipc/ipc_channel_handle.h" | 33 #include "ipc/ipc_channel_handle.h" |
33 #include "ipc/ipc_switches.h" | 34 #include "ipc/ipc_switches.h" |
34 #include "ui/gfx/gl/gl_context.h" | 35 #include "ui/gfx/gl/gl_context.h" |
35 #include "ui/gfx/gl/gl_implementation.h" | 36 #include "ui/gfx/gl/gl_implementation.h" |
36 #include "ui/gfx/gl/gl_switches.h" | 37 #include "ui/gfx/gl/gl_switches.h" |
37 | 38 |
38 #if defined(TOOLKIT_USES_GTK) | 39 #if defined(TOOLKIT_USES_GTK) |
39 #include "ui/gfx/gtk_native_view_id_manager.h" | 40 #include "ui/gfx/gtk_native_view_id_manager.h" |
40 #endif | 41 #endif |
41 | 42 |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 | 646 |
646 CommandLine* cmd_line = new CommandLine(exe_path); | 647 CommandLine* cmd_line = new CommandLine(exe_path); |
647 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess); | 648 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess); |
648 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); | 649 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); |
649 | 650 |
650 if (kind_ == GPU_PROCESS_KIND_UNSANDBOXED) | 651 if (kind_ == GPU_PROCESS_KIND_UNSANDBOXED) |
651 cmd_line->AppendSwitch(switches::kDisableGpuSandbox); | 652 cmd_line->AppendSwitch(switches::kDisableGpuSandbox); |
652 | 653 |
653 // Propagate relevant command line switches. | 654 // Propagate relevant command line switches. |
654 static const char* const kSwitchNames[] = { | 655 static const char* const kSwitchNames[] = { |
| 656 switches::kCompileShaderAlwaysSucceeds, |
655 switches::kDisableBreakpad, | 657 switches::kDisableBreakpad, |
656 switches::kDisableGLMultisampling, | 658 switches::kDisableGLMultisampling, |
657 switches::kDisableGpuDriverBugWorkarounds, | 659 switches::kDisableGpuDriverBugWorkarounds, |
658 switches::kDisableGpuSandbox, | 660 switches::kDisableGpuSandbox, |
659 switches::kReduceGpuSandbox, | 661 switches::kReduceGpuSandbox, |
| 662 switches::kDisableGLSLTranslator, |
660 switches::kDisableGpuVsync, | 663 switches::kDisableGpuVsync, |
661 switches::kDisableGpuWatchdog, | 664 switches::kDisableGpuWatchdog, |
662 switches::kDisableImageTransportSurface, | 665 switches::kDisableImageTransportSurface, |
663 switches::kDisableLogging, | 666 switches::kDisableLogging, |
| 667 switches::kEnableGPUCommandLogging, |
| 668 switches::kEnableGPUDebugging, |
664 switches::kEnableGPUServiceLogging, | 669 switches::kEnableGPUServiceLogging, |
665 switches::kEnableLogging, | 670 switches::kEnableLogging, |
666 #if defined(OS_MACOSX) | 671 #if defined(OS_MACOSX) |
667 switches::kEnableSandboxLogging, | 672 switches::kEnableSandboxLogging, |
668 #endif | 673 #endif |
669 switches::kGpuNoContextLost, | 674 switches::kGpuNoContextLost, |
670 switches::kGpuStartupDialog, | 675 switches::kGpuStartupDialog, |
671 switches::kLoggingLevel, | 676 switches::kLoggingLevel, |
672 switches::kNoSandbox, | 677 switches::kNoSandbox, |
673 switches::kTestGLLib, | 678 switches::kTestGLLib, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 const IPC::ChannelHandle& channel_handle, | 728 const IPC::ChannelHandle& channel_handle, |
724 base::ProcessHandle renderer_process_for_gpu, | 729 base::ProcessHandle renderer_process_for_gpu, |
725 const content::GPUInfo& gpu_info) { | 730 const content::GPUInfo& gpu_info) { |
726 callback.Run(channel_handle, renderer_process_for_gpu, gpu_info); | 731 callback.Run(channel_handle, renderer_process_for_gpu, gpu_info); |
727 } | 732 } |
728 | 733 |
729 void GpuProcessHost::CreateCommandBufferError( | 734 void GpuProcessHost::CreateCommandBufferError( |
730 const CreateCommandBufferCallback& callback, int32 route_id) { | 735 const CreateCommandBufferCallback& callback, int32 route_id) { |
731 callback.Run(route_id); | 736 callback.Run(route_id); |
732 } | 737 } |
OLD | NEW |