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

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

Issue 534043002: Add bits to indicate which parts of GPUInfo are collected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « gpu/config/gpu_info.cc ('k') | gpu/config/gpu_info_collector.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 GPU_CONFIG_GPU_INFO_COLLECTOR_H_ 5 #ifndef GPU_CONFIG_GPU_INFO_COLLECTOR_H_
6 #define GPU_CONFIG_GPU_INFO_COLLECTOR_H_ 6 #define GPU_CONFIG_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 "gpu/config/gpu_info.h" 10 #include "gpu/config/gpu_info.h"
11 #include "gpu/gpu_export.h" 11 #include "gpu/gpu_export.h"
12 12
13 namespace gpu { 13 namespace gpu {
14 14
15 enum GpuIDResult {
16 kGpuIDFailure,
17 kGpuIDSuccess,
18 kGpuIDNotSupported
19 };
20
21 // Result for the various Collect*Info* functions below.
22 // Fatal failures are for cases where we can't create a context at all or
23 // something, making the use of the GPU impossible.
24 // Non-fatal failures are for cases where we could gather most info, but maybe
25 // some is missing (e.g. unable to parse a version string or to detect the exact
26 // model).
27 enum CollectInfoResult {
28 kCollectInfoFatalFailure,
29 kCollectInfoNonFatalFailure,
30 kCollectInfoSuccess
31 };
32
33 // Collect GPU vendor_id and device ID. 15 // Collect GPU vendor_id and device ID.
34 GPU_EXPORT GpuIDResult CollectGpuID(uint32* vendor_id, uint32* device_id); 16 GPU_EXPORT CollectInfoResult CollectGpuID(uint32* vendor_id, uint32* device_id);
35 17
36 // Collects basic GPU info without creating a GL/DirectX context (and without 18 // Collects basic GPU info without creating a GL/DirectX context (and without
37 // the danger of crashing), including vendor_id and device_id. 19 // the danger of crashing), including vendor_id and device_id.
38 // This is called at browser process startup time. 20 // This is called at browser process startup time.
39 // The subset each platform collects may be different. 21 // The subset each platform collects may be different.
40 GPU_EXPORT CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info); 22 GPU_EXPORT CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info);
41 23
42 // Create a GL/DirectX context and collect related info. 24 // Create a GL/DirectX context and collect related info.
43 // This is called at GPU process startup time. 25 // This is called at GPU process startup time.
44 GPU_EXPORT CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info); 26 GPU_EXPORT CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info);
(...skipping 15 matching lines...) Expand all
60 GPU_EXPORT void MergeGPUInfo(GPUInfo* basic_gpu_info, 42 GPU_EXPORT void MergeGPUInfo(GPUInfo* basic_gpu_info,
61 const GPUInfo& context_gpu_info); 43 const GPUInfo& context_gpu_info);
62 44
63 // MergeGPUInfo() when GL driver is used. 45 // MergeGPUInfo() when GL driver is used.
64 GPU_EXPORT void MergeGPUInfoGL(GPUInfo* basic_gpu_info, 46 GPU_EXPORT void MergeGPUInfoGL(GPUInfo* basic_gpu_info,
65 const GPUInfo& context_gpu_info); 47 const GPUInfo& context_gpu_info);
66 48
67 } // namespace gpu 49 } // namespace gpu
68 50
69 #endif // GPU_CONFIG_GPU_INFO_COLLECTOR_H_ 51 #endif // GPU_CONFIG_GPU_INFO_COLLECTOR_H_
OLDNEW
« no previous file with comments | « gpu/config/gpu_info.cc ('k') | gpu/config/gpu_info_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698