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

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

Issue 9996003: Permit testing of the Nouveau driver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 // Load and initialize the GL implementation and locate the GL entry points. 81 // Load and initialize the GL implementation and locate the GL entry points.
82 content::GPUInfo gpu_info; 82 content::GPUInfo gpu_info;
83 if (gfx::GLSurface::InitializeOneOff()) { 83 if (gfx::GLSurface::InitializeOneOff()) {
84 // Collect information about the GPU. 84 // Collect information about the GPU.
85 if (!gpu_info_collector::CollectGraphicsInfo(&gpu_info)) { 85 if (!gpu_info_collector::CollectGraphicsInfo(&gpu_info)) {
86 LOG(INFO) << "gpu_info_collector::CollectGraphicsInfo failed"; 86 LOG(INFO) << "gpu_info_collector::CollectGraphicsInfo failed";
87 } 87 }
88 88
89 #if defined(OS_LINUX) 89 #if defined(OS_LINUX)
90 if (gpu_info.vendor_id == 0x10de) { // NVIDIA 90 if (gpu_info.vendor_id == 0x10de && // NVIDIA
91 gpu_info.driver_vendor == "NVIDIA") {
91 base::ThreadRestrictions::AssertIOAllowed(); 92 base::ThreadRestrictions::AssertIOAllowed();
92 if (access("/dev/nvidiactl", R_OK) != 0) { 93 if (access("/dev/nvidiactl", R_OK) != 0) {
93 LOG(INFO) << "NVIDIA device file /dev/nvidiactl access denied"; 94 LOG(INFO) << "NVIDIA device file /dev/nvidiactl access denied";
94 gpu_info.gpu_accessible = false; 95 gpu_info.gpu_accessible = false;
95 dead_on_arrival = true; 96 dead_on_arrival = true;
96 } 97 }
97 } 98 }
98 #endif 99 #endif
99 100
100 // Set the GPU info even if it failed. 101 // Set the GPU info even if it failed.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 child_thread->Init(start_time); 154 child_thread->Init(start_time);
154 155
155 gpu_process.set_main_thread(child_thread); 156 gpu_process.set_main_thread(child_thread);
156 157
157 main_message_loop.Run(); 158 main_message_loop.Run();
158 159
159 child_thread->StopWatchdog(); 160 child_thread->StopWatchdog();
160 161
161 return 0; 162 return 0;
162 } 163 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698