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

Unified Diff: gpu/config/gpu_info_collector_x11.cc

Issue 15745014: Move GPU device/driver info related code from content to gpu. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/config/gpu_info_collector_win.cc ('k') | gpu/config/gpu_info_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/config/gpu_info_collector_x11.cc
===================================================================
--- gpu/config/gpu_info_collector_x11.cc (revision 0)
+++ gpu/config/gpu_info_collector_x11.cc (working copy)
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/gpu/gpu_info_collector.h"
+#include "gpu/config/gpu_info_collector.h"
#include <X11/Xlib.h>
#include <vector>
@@ -26,6 +26,8 @@
#include "ui/gl/gl_surface.h"
#include "ui/gl/gl_switches.h"
+namespace gpu {
+
namespace {
// This checks if a system supports PCI bus.
@@ -97,7 +99,7 @@
const uint32 kVendorIDNVidia = 0x10de;
const uint32 kVendorIDAMD = 0x1002;
-bool CollectPCIVideoCardInfo(content::GPUInfo* gpu_info) {
+bool CollectPCIVideoCardInfo(GPUInfo* gpu_info) {
DCHECK(gpu_info);
if (IsPciSupported() == false) {
@@ -126,7 +128,7 @@
if (device->device_class != 0x0300) // Device class is DISPLAY_VGA.
continue;
- content::GPUInfo::GPUDevice gpu;
+ GPUInfo::GPUDevice gpu;
gpu.vendor_id = device->vendor_id;
gpu.device_id = device->device_id;
@@ -162,9 +164,7 @@
} // namespace anonymous
-namespace gpu_info_collector {
-
-bool CollectContextGraphicsInfo(content::GPUInfo* gpu_info) {
+bool CollectContextGraphicsInfo(GPUInfo* gpu_info) {
DCHECK(gpu_info);
TRACE_EVENT0("gpu", "gpu_info_collector::CollectGraphicsInfo");
@@ -194,7 +194,7 @@
*vendor_id = 0;
*device_id = 0;
- content::GPUInfo gpu_info;
+ GPUInfo gpu_info;
if (CollectPCIVideoCardInfo(&gpu_info)) {
*vendor_id = gpu_info.gpu.vendor_id;
*device_id = gpu_info.gpu.device_id;
@@ -203,7 +203,7 @@
return kGpuIDFailure;
}
-bool CollectBasicGraphicsInfo(content::GPUInfo* gpu_info) {
+bool CollectBasicGraphicsInfo(GPUInfo* gpu_info) {
DCHECK(gpu_info);
bool rt = CollectPCIVideoCardInfo(gpu_info);
@@ -241,7 +241,7 @@
return rt;
}
-bool CollectDriverInfoGL(content::GPUInfo* gpu_info) {
+bool CollectDriverInfoGL(GPUInfo* gpu_info) {
DCHECK(gpu_info);
std::string gl_version_string = gpu_info->gl_version_string;
@@ -266,9 +266,9 @@
return true;
}
-void MergeGPUInfo(content::GPUInfo* basic_gpu_info,
- const content::GPUInfo& context_gpu_info) {
+void MergeGPUInfo(GPUInfo* basic_gpu_info,
+ const GPUInfo& context_gpu_info) {
MergeGPUInfoGL(basic_gpu_info, context_gpu_info);
}
-} // namespace gpu_info_collector
+} // namespace gpu
« no previous file with comments | « gpu/config/gpu_info_collector_win.cc ('k') | gpu/config/gpu_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698