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

Side by Side Diff: content/gpu/gpu_info_collector.h

Issue 12340089: Windows: Only collect D3D11 UMA stats if the GPU process launches and initializes successfully. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 7 years, 9 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/browser/gpu/gpu_process_host.cc ('k') | content/gpu/gpu_info_collector_win.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_GPU_GPU_INFO_COLLECTOR_H_ 5 #ifndef CONTENT_GPU_GPU_INFO_COLLECTOR_H_
6 #define CONTENT_GPU_GPU_INFO_COLLECTOR_H_ 6 #define CONTENT_GPU_GPU_INFO_COLLECTOR_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "content/public/common/gpu_info.h" 11 #include "content/public/common/gpu_info.h"
12 12
13 namespace gpu_info_collector { 13 namespace gpu_info_collector {
14 14
15 // Advanced Micro Devices has interesting configurations on laptops were
16 // there are two videocards that can alternatively a given process output.
17 enum AMDVideoCardType {
18 UNKNOWN,
19 STANDALONE,
20 INTEGRATED,
21 SWITCHABLE
22 };
23
15 // Collect GPU vendor_id and device ID. 24 // Collect GPU vendor_id and device ID.
16 CONTENT_EXPORT bool CollectGpuID(uint32* vendor_id, uint32* device_id); 25 CONTENT_EXPORT bool CollectGpuID(uint32* vendor_id, uint32* device_id);
17 26
18 // Collects basic GPU info without creating a GL/DirectX context (and without 27 // Collects basic GPU info without creating a GL/DirectX context (and without
19 // the danger of crashing), including vendor_id and device_id. 28 // the danger of crashing), including vendor_id and device_id.
20 // This is called at browser process startup time. 29 // This is called at browser process startup time.
21 // The subset each platform collects may be different. 30 // The subset each platform collects may be different.
22 CONTENT_EXPORT bool CollectBasicGraphicsInfo( 31 CONTENT_EXPORT bool CollectBasicGraphicsInfo(
23 content::GPUInfo* gpu_info); 32 content::GPUInfo* gpu_info);
24 33
(...skipping 16 matching lines...) Expand all
41 // Merge GPUInfo from CollectContextGraphicsInfo into basic GPUInfo. 50 // Merge GPUInfo from CollectContextGraphicsInfo into basic GPUInfo.
42 // This is platform specific, depending on which info are collected at which 51 // This is platform specific, depending on which info are collected at which
43 // stage. 52 // stage.
44 void MergeGPUInfo(content::GPUInfo* basic_gpu_info, 53 void MergeGPUInfo(content::GPUInfo* basic_gpu_info,
45 const content::GPUInfo& context_gpu_info); 54 const content::GPUInfo& context_gpu_info);
46 55
47 // MergeGPUInfo() when GL driver is used. 56 // MergeGPUInfo() when GL driver is used.
48 void MergeGPUInfoGL(content::GPUInfo* basic_gpu_info, 57 void MergeGPUInfoGL(content::GPUInfo* basic_gpu_info,
49 const content::GPUInfo& context_gpu_info); 58 const content::GPUInfo& context_gpu_info);
50 59
51 // Advanced Micro Devices has interesting configurations on laptops were 60 #if defined(OS_WIN)
52 // there are two videocards that can alternatively a given process output. 61 // Collects information about the level of D3D11 support and records it in
53 enum AMDVideoCardType { 62 // the UMA stats. Records no stats when D3D11 in not supported at all.
54 UNKNOWN, 63 void CollectD3D11Support();
55 STANDALONE, 64 #endif
56 INTEGRATED,
57 SWITCHABLE
58 };
59 65
60 } // namespace gpu_info_collector 66 } // namespace gpu_info_collector
61 67
62 #endif // CONTENT_GPU_GPU_INFO_COLLECTOR_H_ 68 #endif // CONTENT_GPU_GPU_INFO_COLLECTOR_H_
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/gpu/gpu_info_collector_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698