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

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

Issue 2770953002: Revert of gpu: Add a util method to set crash-keys from a GPUInfo. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « components/nacl/broker/BUILD.gn ('k') | gpu/config/gpu_util.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_UTIL_H_ 5 #ifndef GPU_CONFIG_GPU_UTIL_H_
6 #define GPU_CONFIG_GPU_UTIL_H_ 6 #define GPU_CONFIG_GPU_UTIL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "gpu/config/gpu_feature_info.h" 13 #include "gpu/config/gpu_feature_info.h"
14 #include "gpu/gpu_export.h" 14 #include "gpu/gpu_export.h"
15 15
16 namespace base { 16 namespace base {
17 class CommandLine; 17 class CommandLine;
18 } 18 }
19 19
20 namespace gpu { 20 namespace gpu {
21 21
22 namespace crash_keys {
23
24 // Keys that can be used for crash reporting.
25 #if !defined(OS_ANDROID)
26 GPU_EXPORT extern const char kGPUVendorID[];
27 GPU_EXPORT extern const char kGPUDeviceID[];
28 #endif
29 GPU_EXPORT extern const char kGPUDriverVersion[];
30 GPU_EXPORT extern const char kGPUPixelShaderVersion[];
31 GPU_EXPORT extern const char kGPUVertexShaderVersion[];
32 #if defined(OS_MACOSX)
33 GPU_EXPORT extern const char kGPUGLVersion[];
34 #elif defined(OS_POSIX)
35 GPU_EXPORT extern const char kGPUVendor[];
36 GPU_EXPORT extern const char kGPURenderer[];
37 #endif
38
39 } // namespace crash_keys
40
41 struct GPUInfo; 22 struct GPUInfo;
42 23
43 // With provided GPUInfo, compute the driver bug workarounds and disabled 24 // With provided GPUInfo, compute the driver bug workarounds and disabled
44 // extensions for the current system, and append the |command_line|. 25 // extensions for the current system, and append the |command_line|.
45 GPU_EXPORT void ApplyGpuDriverBugWorkarounds( 26 GPU_EXPORT void ApplyGpuDriverBugWorkarounds(
46 const GPUInfo& gpu_info, 27 const GPUInfo& gpu_info,
47 base::CommandLine* command_line); 28 base::CommandLine* command_line);
48 29
49 // |str| is in the format of "feature1,feature2,...,featureN". 30 // |str| is in the format of "feature1,feature2,...,featureN".
50 GPU_EXPORT void StringToFeatureSet( 31 GPU_EXPORT void StringToFeatureSet(
51 const std::string& str, std::set<int>* feature_set); 32 const std::string& str, std::set<int>* feature_set);
52 33
53 // With provided command line, fill gpu_info->secondary_gpus with parsed 34 // With provided command line, fill gpu_info->secondary_gpus with parsed
54 // secondary vendor and device ids. 35 // secondary vendor and device ids.
55 GPU_EXPORT void ParseSecondaryGpuDevicesFromCommandLine( 36 GPU_EXPORT void ParseSecondaryGpuDevicesFromCommandLine(
56 const base::CommandLine& command_line, 37 const base::CommandLine& command_line,
57 GPUInfo* gpu_info); 38 GPUInfo* gpu_info);
58 39
59 GPU_EXPORT void InitializeDualGpusIfSupported( 40 GPU_EXPORT void InitializeDualGpusIfSupported(
60 const std::set<int>& driver_bug_workarounds); 41 const std::set<int>& driver_bug_workarounds);
61 42
62 // This function should only be called from the GPU process, or the Browser 43 // This function should only be called from the GPU process, or the Browser
63 // process while using in-process GPU. This function is safe to call at any 44 // process while using in-process GPU. This function is safe to call at any
64 // point, and is not dependent on sandbox initialization. 45 // point, and is not dependent on sandbox initialization.
65 GPU_EXPORT GpuFeatureInfo 46 GPU_EXPORT GpuFeatureInfo
66 GetGpuFeatureInfo(const GPUInfo& gpu_info, 47 GetGpuFeatureInfo(const GPUInfo& gpu_info,
67 const base::CommandLine& command_line); 48 const base::CommandLine& command_line);
68 49
69 GPU_EXPORT void SetKeysForCrashLogging(const GPUInfo& gpu_info);
70
71 } // namespace gpu 50 } // namespace gpu
72 51
73 #endif // GPU_CONFIG_GPU_UTIL_H_ 52 #endif // GPU_CONFIG_GPU_UTIL_H_
74 53
OLDNEW
« no previous file with comments | « components/nacl/broker/BUILD.gn ('k') | gpu/config/gpu_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698