gpu: Add a util method to set crash-keys from a GPUInfo.
Use the newly introduced util method to set crash-keys from a GPUInfo
in both chrome and android_webview. This will also be used in mus.
BUG=643746
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Earlier landed in r458276, reverted in r458968 because of size regression.
Review-Url: https://codereview.chromium.org/2751103008
Cr-Commit-Position: refs/heads/master@{#459202}
diff --git a/android_webview/common/aw_content_client.cc b/android_webview/common/aw_content_client.cc
index 99258489..f686cf4 100644
--- a/android_webview/common/aw_content_client.cc
+++ b/android_webview/common/aw_content_client.cc
@@ -14,6 +14,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/user_agent.h"
#include "gpu/config/gpu_info.h"
+#include "gpu/config/gpu_util.h"
#include "ipc/ipc_message.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
@@ -83,14 +84,7 @@
std::replace_if(gpu_fingerprint_.begin(), gpu_fingerprint_.end(),
[](char c) { return !::isprint(c); }, '_');
- base::debug::SetCrashKeyValue(crash_keys::kGPUDriverVersion,
- gpu_info.driver_version);
- base::debug::SetCrashKeyValue(crash_keys::kGPUPixelShaderVersion,
- gpu_info.pixel_shader_version);
- base::debug::SetCrashKeyValue(crash_keys::kGPUVertexShaderVersion,
- gpu_info.vertex_shader_version);
- base::debug::SetCrashKeyValue(crash_keys::kGPUVendor, gpu_info.gl_vendor);
- base::debug::SetCrashKeyValue(crash_keys::kGPURenderer, gpu_info.gl_renderer);
+ gpu::SetKeysForCrashLogging(gpu_info);
}
bool AwContentClient::UsingSynchronousCompositing() {