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

Unified Diff: content/browser/gpu/gpu_process_host.cc

Issue 2781993002: Get the proper GPU Info in GpuProcessHost (Closed)
Patch Set: Added tests 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/gpu/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 9701b02c5a55883f2496129839ce0a818becccd9..d0b909d7973d4ec4111d69ebf8f50e6776b453e8 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -850,9 +850,14 @@ void GpuProcessHost::DidInitialize(
const gpu::GpuFeatureInfo& gpu_feature_info) {
UMA_HISTOGRAM_BOOLEAN("GPU.GPUProcessInitialized", true);
initialized_ = true;
- gpu_info_ = gpu_info;
- GpuDataManagerImpl::GetInstance()->UpdateGpuInfo(gpu_info);
- GpuDataManagerImpl::GetInstance()->UpdateGpuFeatureInfo(gpu_feature_info);
+ GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance();
+ if (!gpu_data_manager->ShouldUseSwiftShader()) {
+ gpu_info_ = gpu_info;
+ gpu_data_manager->UpdateGpuInfo(gpu_info);
+ gpu_data_manager->UpdateGpuFeatureInfo(gpu_feature_info);
+ } else {
+ gpu_info_ = gpu_data_manager->GetGPUInfo();
+ }
}
void GpuProcessHost::DidFailInitialize() {

Powered by Google App Engine
This is Rietveld 408576698