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

Side by Side Diff: content/public/common/gpu_info.h

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
« no previous file with comments | « content/gpu/gpu_main.cc ('k') | content/public/common/gpu_info.cc » ('j') | 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 #ifndef CONTENT_PUBLIC_COMMON_GPU_INFO_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_GPU_INFO_H_
6 #define CONTENT_PUBLIC_COMMON_GPU_INFO_H_ 6 #define CONTENT_PUBLIC_COMMON_GPU_INFO_H_
7 #pragma once 7 #pragma once
8 8
9 // Provides access to the GPU information for the system 9 // Provides access to the GPU information for the system
10 // on which chrome is currently running. 10 // on which chrome is currently running.
11 11
12 #include <string> 12 #include <string>
13 #include <vector>
13 14
14 #include "base/basictypes.h" 15 #include "base/basictypes.h"
15 #include "base/time.h" 16 #include "base/time.h"
16 #include "build/build_config.h" 17 #include "build/build_config.h"
17 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
18 #include "content/public/common/dx_diag_node.h" 19 #include "content/public/common/dx_diag_node.h"
19 #include "content/public/common/gpu_performance_stats.h" 20 #include "content/public/common/gpu_performance_stats.h"
20 21
21 namespace content { 22 namespace content {
22 23
23 struct CONTENT_EXPORT GPUInfo { 24 struct CONTENT_EXPORT GPUInfo {
25 struct CONTENT_EXPORT GPUDevice {
26 GPUDevice();
27 ~GPUDevice();
28
29 // The DWORD (uint32) representing the graphics card vendor id.
30 uint32 vendor_id;
31
32 // The DWORD (uint32) representing the graphics card device id.
33 // Device ids are unique to vendor, not to one another.
34 uint32 device_id;
35
36 // The strings that describe the GPU.
37 // In Linux these strings are obtained through libpci.
38 // In Win/MacOSX, these two strings are not filled at the moment.
39 std::string vendor_string;
40 std::string device_string;
41 };
42
24 GPUInfo(); 43 GPUInfo();
25 ~GPUInfo(); 44 ~GPUInfo();
26 45
27 // Whether more GPUInfo fields might be collected in the future. 46 // Whether more GPUInfo fields might be collected in the future.
28 bool finalized; 47 bool finalized;
29 48
30 // The amount of time taken to get from the process starting to the message 49 // The amount of time taken to get from the process starting to the message
31 // loop being pumped. 50 // loop being pumped.
32 base::TimeDelta initialization_time; 51 base::TimeDelta initialization_time;
33 52
34 // Computer has NVIDIA Optimus 53 // Computer has NVIDIA Optimus
35 bool optimus; 54 bool optimus;
36 55
37 // Computer has AMD Dynamic Switchable Graphics 56 // Computer has AMD Dynamic Switchable Graphics
38 bool amd_switchable; 57 bool amd_switchable;
39 58
40 // The DWORD (uint32) representing the graphics card vendor id. 59 // Primary GPU, for exmaple, the discrete GPU in a dual GPU machine.
41 uint32 vendor_id; 60 GPUDevice gpu;
42 61
43 // The DWORD (uint32) representing the graphics card device id. Device ids 62 // Secondary GPUs, for example, the integrated GPU in a dual GPU machine.
44 // are unique to vendor, not to one another. 63 std::vector<GPUDevice> secondary_gpus;
45 uint32 device_id;
46 64
47 // The vendor of the graphics driver currently installed. 65 // The vendor of the graphics driver currently installed.
48 std::string driver_vendor; 66 std::string driver_vendor;
49 67
50 // The version of the graphics driver currently installed. 68 // The version of the graphics driver currently installed.
51 std::string driver_version; 69 std::string driver_version;
52 70
53 // The date of the graphics driver currently installed. 71 // The date of the graphics driver currently installed.
54 std::string driver_date; 72 std::string driver_date;
55 73
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 107
90 #if defined(OS_WIN) 108 #if defined(OS_WIN)
91 // The information returned by the DirectX Diagnostics Tool. 109 // The information returned by the DirectX Diagnostics Tool.
92 DxDiagNode dx_diagnostics; 110 DxDiagNode dx_diagnostics;
93 #endif 111 #endif
94 }; 112 };
95 113
96 } // namespace content 114 } // namespace content
97 115
98 #endif // CONTENT_PUBLIC_COMMON_GPU_INFO_H_ 116 #endif // CONTENT_PUBLIC_COMMON_GPU_INFO_H_
OLDNEW
« no previous file with comments | « content/gpu/gpu_main.cc ('k') | content/public/common/gpu_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698