| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/gpu/gpu_info_collector.h" | 5 #include "content/gpu/gpu_info_collector.h" |
| 6 | 6 |
| 7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 } | 206 } |
| 207 | 207 |
| 208 gpu_info->finalized = true; | 208 gpu_info->finalized = true; |
| 209 return CollectGraphicsInfoGL(gpu_info); | 209 return CollectGraphicsInfoGL(gpu_info); |
| 210 } | 210 } |
| 211 | 211 |
| 212 bool CollectPreliminaryGraphicsInfo(GPUInfo* gpu_info) { | 212 bool CollectPreliminaryGraphicsInfo(GPUInfo* gpu_info) { |
| 213 DCHECK(gpu_info); | 213 DCHECK(gpu_info); |
| 214 | 214 |
| 215 if (!gfx::GLSurface::InitializeOneOff()) { | 215 if (!gfx::GLSurface::InitializeOneOff()) { |
| 216 LOG(ERROR) << "gfx::GLContext::InitializeOneOff() failed"; | 216 LOG(ERROR) << "gfx::GLSurface::InitializeOneOff() failed"; |
| 217 return false; | 217 return false; |
| 218 } | 218 } |
| 219 | 219 |
| 220 bool rt = true; | 220 bool rt = true; |
| 221 if (!CollectVideoCardInfo(gpu_info)) | 221 if (!CollectVideoCardInfo(gpu_info)) |
| 222 rt = false; | 222 rt = false; |
| 223 | 223 |
| 224 if (gpu_info->vendor_id == 0x1002) { // ATI | 224 if (gpu_info->vendor_id == 0x1002) { // ATI |
| 225 std::string ati_driver_version = CollectDriverVersionATI(); | 225 std::string ati_driver_version = CollectDriverVersionATI(); |
| 226 if (ati_driver_version != "") { | 226 if (ati_driver_version != "") { |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 return false; | 351 return false; |
| 352 if (pos != std::string::npos) | 352 if (pos != std::string::npos) |
| 353 driver_version = driver_version.substr(0, pos); | 353 driver_version = driver_version.substr(0, pos); |
| 354 | 354 |
| 355 gpu_info->driver_vendor = pieces[1]; | 355 gpu_info->driver_vendor = pieces[1]; |
| 356 gpu_info->driver_version = driver_version; | 356 gpu_info->driver_version = driver_version; |
| 357 return true; | 357 return true; |
| 358 } | 358 } |
| 359 | 359 |
| 360 } // namespace gpu_info_collector | 360 } // namespace gpu_info_collector |
| OLD | NEW |