| 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 #include "app/app_switches.h" |
| 5 #include "app/gfx/gl/gl_implementation.h" | 6 #include "app/gfx/gl/gl_implementation.h" |
| 6 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 7 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 8 #include "chrome/common/chrome_constants.h" | 9 #include "chrome/common/chrome_constants.h" |
| 9 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| 10 #include "chrome/common/main_function_params.h" | 11 #include "chrome/common/main_function_params.h" |
| 11 #include "chrome/gpu/gpu_config.h" | 12 #include "chrome/gpu/gpu_config.h" |
| 12 #include "chrome/gpu/gpu_process.h" | 13 #include "chrome/gpu/gpu_process.h" |
| 13 #include "chrome/gpu/gpu_thread.h" | 14 #include "chrome/gpu/gpu_thread.h" |
| 14 | 15 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 if (command_line.HasSwitch(switches::kGpuStartupDialog)) { | 60 if (command_line.HasSwitch(switches::kGpuStartupDialog)) { |
| 60 ChildProcess::WaitForDebugger(L"Gpu"); | 61 ChildProcess::WaitForDebugger(L"Gpu"); |
| 61 } | 62 } |
| 62 | 63 |
| 63 MessageLoop main_message_loop(MessageLoop::TYPE_UI); | 64 MessageLoop main_message_loop(MessageLoop::TYPE_UI); |
| 64 PlatformThread::SetName("CrGpuMain"); | 65 PlatformThread::SetName("CrGpuMain"); |
| 65 | 66 |
| 66 #if defined(OS_WIN) | 67 #if defined(OS_WIN) |
| 67 win_util::ScopedCOMInitializer com_initializer; | 68 win_util::ScopedCOMInitializer com_initializer; |
| 68 #elif defined(GPU_USE_GLX) | 69 #elif defined(GPU_USE_GLX) |
| 69 gfx::InitializeGLBindings(gfx::kGLImplementationDesktopGL); | 70 if (!command_line.HasSwitch(switches::kUseGL)) { |
| 71 gfx::InitializeGLBindings(gfx::kGLImplementationDesktopGL); |
| 72 } |
| 70 #endif | 73 #endif |
| 71 | 74 |
| 72 GpuProcess gpu_process; | 75 GpuProcess gpu_process; |
| 73 gpu_process.set_main_thread(new GpuThread()); | 76 gpu_process.set_main_thread(new GpuThread()); |
| 74 | 77 |
| 75 #if defined(USE_X11) | 78 #if defined(USE_X11) |
| 76 SetGpuX11ErrorHandlers(); | 79 SetGpuX11ErrorHandlers(); |
| 77 #endif | 80 #endif |
| 78 | 81 |
| 79 main_message_loop.Run(); | 82 main_message_loop.Run(); |
| 80 | 83 |
| 81 return 0; | 84 return 0; |
| 82 } | 85 } |
| OLD | NEW |