| 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 #include "gpu/config/gpu_util.h" | 5 #include "gpu/config/gpu_util.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/debug/crash_logging.h" |
| 11 #include "base/logging.h" | 12 #include "base/logging.h" |
| 12 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
| 13 #include "base/strings/string_split.h" | 14 #include "base/strings/string_split.h" |
| 14 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "base/strings/stringprintf.h" |
| 15 #include "base/sys_info.h" | 17 #include "base/sys_info.h" |
| 16 #include "gpu/config/gpu_blacklist.h" | 18 #include "gpu/config/gpu_blacklist.h" |
| 17 #include "gpu/config/gpu_control_list_jsons.h" | 19 #include "gpu/config/gpu_control_list_jsons.h" |
| 20 #include "gpu/config/gpu_crash_keys.h" |
| 18 #include "gpu/config/gpu_driver_bug_list.h" | 21 #include "gpu/config/gpu_driver_bug_list.h" |
| 19 #include "gpu/config/gpu_feature_type.h" | 22 #include "gpu/config/gpu_feature_type.h" |
| 20 #include "gpu/config/gpu_finch_features.h" | 23 #include "gpu/config/gpu_finch_features.h" |
| 21 #include "gpu/config/gpu_info_collector.h" | 24 #include "gpu/config/gpu_info_collector.h" |
| 22 #include "gpu/config/gpu_switches.h" | 25 #include "gpu/config/gpu_switches.h" |
| 23 #include "ui/gl/gl_switches.h" | 26 #include "ui/gl/gl_switches.h" |
| 24 #include "ui/gl/gpu_switching_manager.h" | 27 #include "ui/gl/gpu_switching_manager.h" |
| 25 | 28 |
| 26 namespace gpu { | 29 namespace gpu { |
| 27 | 30 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 list->MakeDecision(GpuControlList::kOsAny, std::string(), gpu_info); | 195 list->MakeDecision(GpuControlList::kOsAny, std::string(), gpu_info); |
| 193 } | 196 } |
| 194 | 197 |
| 195 // Currently only used for GPU rasterization. | 198 // Currently only used for GPU rasterization. |
| 196 gpu_feature_info.status_values[GPU_FEATURE_TYPE_GPU_RASTERIZATION] = | 199 gpu_feature_info.status_values[GPU_FEATURE_TYPE_GPU_RASTERIZATION] = |
| 197 GetGpuRasterizationFeatureStatus(blacklisted_features, command_line); | 200 GetGpuRasterizationFeatureStatus(blacklisted_features, command_line); |
| 198 | 201 |
| 199 return gpu_feature_info; | 202 return gpu_feature_info; |
| 200 } | 203 } |
| 201 | 204 |
| 205 void SetKeysForCrashLogging(const GPUInfo& gpu_info) { |
| 206 #if !defined(OS_ANDROID) |
| 207 base::debug::SetCrashKeyValue( |
| 208 crash_keys::kGPUVendorID, |
| 209 base::StringPrintf("0x%04x", gpu_info.gpu.vendor_id)); |
| 210 base::debug::SetCrashKeyValue( |
| 211 crash_keys::kGPUDeviceID, |
| 212 base::StringPrintf("0x%04x", gpu_info.gpu.device_id)); |
| 213 #endif |
| 214 base::debug::SetCrashKeyValue(crash_keys::kGPUDriverVersion, |
| 215 gpu_info.driver_version); |
| 216 base::debug::SetCrashKeyValue(crash_keys::kGPUPixelShaderVersion, |
| 217 gpu_info.pixel_shader_version); |
| 218 base::debug::SetCrashKeyValue(crash_keys::kGPUVertexShaderVersion, |
| 219 gpu_info.vertex_shader_version); |
| 220 #if defined(OS_MACOSX) |
| 221 base::debug::SetCrashKeyValue(crash_keys::kGPUGLVersion, gpu_info.gl_version); |
| 222 #elif defined(OS_POSIX) |
| 223 base::debug::SetCrashKeyValue(crash_keys::kGPUVendor, gpu_info.gl_vendor); |
| 224 base::debug::SetCrashKeyValue(crash_keys::kGPURenderer, gpu_info.gl_renderer); |
| 225 #endif |
| 226 } |
| 227 |
| 202 } // namespace gpu | 228 } // namespace gpu |
| OLD | NEW |