OLD | NEW |
---|---|
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 | 7 |
8 // Provides access to the GPU information for the system | 8 // Provides access to the GPU information for the system |
9 // on which chrome is currently running. | 9 // on which chrome is currently running. |
10 | 10 |
11 #include <map> | |
11 #include <string> | 12 #include <string> |
12 #include <vector> | 13 #include <vector> |
13 | 14 |
14 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
16 #include "base/process.h" | |
15 #include "base/time.h" | 17 #include "base/time.h" |
16 #include "build/build_config.h" | 18 #include "build/build_config.h" |
17 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
18 #include "content/public/common/dx_diag_node.h" | 20 #include "content/public/common/dx_diag_node.h" |
19 #include "content/public/common/gpu_performance_stats.h" | 21 #include "content/public/common/gpu_performance_stats.h" |
20 | 22 |
21 namespace content { | 23 namespace content { |
22 | 24 |
23 struct CONTENT_EXPORT GPUInfo { | 25 struct CONTENT_EXPORT GPUInfo { |
24 struct CONTENT_EXPORT GPUDevice { | 26 struct CONTENT_EXPORT GPUDevice { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 GpuPerformanceStats performance_stats; | 105 GpuPerformanceStats performance_stats; |
104 | 106 |
105 bool software_rendering; | 107 bool software_rendering; |
106 | 108 |
107 #if defined(OS_WIN) | 109 #if defined(OS_WIN) |
108 // The information returned by the DirectX Diagnostics Tool. | 110 // The information returned by the DirectX Diagnostics Tool. |
109 DxDiagNode dx_diagnostics; | 111 DxDiagNode dx_diagnostics; |
110 #endif | 112 #endif |
111 }; | 113 }; |
112 | 114 |
115 struct CONTENT_EXPORT GPUVidmemUsageStats { | |
jam
2012/08/17 18:31:05
put this in a separate file (the convention in the
jam
2012/08/17 18:31:05
nit: also VideoMemory per the style guide
ccameron
2012/08/17 20:52:55
Moved to gpu_memory_stats.h
ccameron
2012/08/17 20:52:55
Changed this everywhere in the patch.
| |
116 GPUVidmemUsageStats(); | |
117 ~GPUVidmemUsageStats(); | |
brettw
2012/08/17 19:07:24
I'd do a blank line after this.
ccameron
2012/08/17 20:52:55
Done.
| |
118 struct CONTENT_EXPORT GPUProcessVidmemUsageStats { | |
brettw
2012/08/17 19:07:24
I might just call this something simpler like "Pro
ccameron
2012/08/17 20:52:55
Good idea, done.
| |
119 GPUProcessVidmemUsageStats(); | |
120 ~GPUProcessVidmemUsageStats(); | |
121 | |
122 // The bytes of GPU resources accessible by this process | |
123 size_t vidmem; | |
jam
2012/08/17 18:31:05
nit: video_memory, per the style guide
ccameron
2012/08/17 20:52:55
Changed this everywhere in the patch.
| |
124 | |
125 // Set to true if this process' GPU resource count is inflated because | |
126 // it is counting other processes' resources (e.g, the GPU process has | |
127 // duplicate set to true because it is the aggregate of all processes) | |
128 bool has_duplicates; | |
129 }; | |
130 typedef std::map<base::ProcessId,GPUProcessVidmemUsageStats> ProcessMap; | |
jam
2012/08/17 18:31:05
nit: space after comma
ccameron
2012/08/17 20:52:55
Done.
| |
131 | |
132 // A map of processes to their GPU resource consumption | |
133 ProcessMap process_map; | |
134 }; | |
135 | |
113 } // namespace content | 136 } // namespace content |
114 | 137 |
115 #endif // CONTENT_PUBLIC_COMMON_GPU_INFO_H_ | 138 #endif // CONTENT_PUBLIC_COMMON_GPU_INFO_H_ |
OLD | NEW |