Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: chrome/gpu/gpu_main.cc

Issue 2741003: Rename Chrome threads to use a "Cr" prefix. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "build/build_config.h" 6 #include "build/build_config.h"
7 #include "chrome/common/chrome_constants.h" 7 #include "chrome/common/chrome_constants.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 #include "chrome/common/main_function_params.h" 9 #include "chrome/common/main_function_params.h"
10 #include "chrome/gpu/gpu_config.h" 10 #include "chrome/gpu/gpu_config.h"
(...skipping 17 matching lines...) Expand all
28 // Needs to be called after we have chrome::DIR_USER_DATA. 28 // Needs to be called after we have chrome::DIR_USER_DATA.
29 InitCrashReporter(); 29 InitCrashReporter();
30 #endif 30 #endif
31 31
32 const CommandLine& command_line = parameters.command_line_; 32 const CommandLine& command_line = parameters.command_line_;
33 if (command_line.HasSwitch(switches::kGpuStartupDialog)) { 33 if (command_line.HasSwitch(switches::kGpuStartupDialog)) {
34 ChildProcess::WaitForDebugger(L"Gpu"); 34 ChildProcess::WaitForDebugger(L"Gpu");
35 } 35 }
36 36
37 MessageLoop main_message_loop(MessageLoop::TYPE_UI); 37 MessageLoop main_message_loop(MessageLoop::TYPE_UI);
38 std::wstring app_name = chrome::kBrowserAppName; 38 PlatformThread::SetName("CrGpuMain");
39 PlatformThread::SetName(WideToASCII(app_name + L"_GpuMain").c_str());
40 39
41 #if defined(OS_WIN) 40 #if defined(OS_WIN)
42 win_util::ScopedCOMInitializer com_initializer; 41 win_util::ScopedCOMInitializer com_initializer;
43 #elif defined(GPU_USE_GLX) 42 #elif defined(GPU_USE_GLX)
44 dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL); 43 dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL);
45 glxewInit(); 44 glxewInit();
46 #endif 45 #endif
47 46
48 GpuProcess gpu_process; 47 GpuProcess gpu_process;
49 gpu_process.set_main_thread(new GpuThread()); 48 gpu_process.set_main_thread(new GpuThread());
50 49
51 main_message_loop.Run(); 50 main_message_loop.Run();
52 51
53 return 0; 52 return 0;
54 } 53 }
55 54
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698