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

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

Issue 10389051: Change GPUInfo to handle multiple GPUs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
OLDNEW
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 <stdlib.h> 5 #include <stdlib.h>
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // Load and initialize the GL implementation and locate the GL entry points. 74 // Load and initialize the GL implementation and locate the GL entry points.
75 content::GPUInfo gpu_info; 75 content::GPUInfo gpu_info;
76 if (gfx::GLSurface::InitializeOneOff()) { 76 if (gfx::GLSurface::InitializeOneOff()) {
77 // Collect information about the GPU. 77 // Collect information about the GPU.
78 if (!gpu_info_collector::CollectGraphicsInfo(&gpu_info)) { 78 if (!gpu_info_collector::CollectGraphicsInfo(&gpu_info)) {
79 LOG(INFO) << "gpu_info_collector::CollectGraphicsInfo failed"; 79 LOG(INFO) << "gpu_info_collector::CollectGraphicsInfo failed";
80 } 80 }
81 81
82 #if defined(OS_LINUX) 82 #if defined(OS_LINUX)
83 if (gpu_info.vendor_id == 0x10de && // NVIDIA 83 if (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA
84 gpu_info.driver_vendor == "NVIDIA") { 84 gpu_info.driver_vendor == "NVIDIA") {
85 base::ThreadRestrictions::AssertIOAllowed(); 85 base::ThreadRestrictions::AssertIOAllowed();
86 if (access("/dev/nvidiactl", R_OK) != 0) { 86 if (access("/dev/nvidiactl", R_OK) != 0) {
87 LOG(INFO) << "NVIDIA device file /dev/nvidiactl access denied"; 87 LOG(INFO) << "NVIDIA device file /dev/nvidiactl access denied";
88 gpu_info.gpu_accessible = false; 88 gpu_info.gpu_accessible = false;
89 dead_on_arrival = true; 89 dead_on_arrival = true;
90 } 90 }
91 } 91 }
92 #endif 92 #endif
93 93
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 child_thread->Init(start_time); 149 child_thread->Init(start_time);
150 150
151 gpu_process.set_main_thread(child_thread); 151 gpu_process.set_main_thread(child_thread);
152 152
153 main_message_loop.Run(); 153 main_message_loop.Run();
154 154
155 child_thread->StopWatchdog(); 155 child_thread->StopWatchdog();
156 156
157 return 0; 157 return 0;
158 } 158 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698