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

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

Issue 2781993002: Get the proper GPU Info in GpuProcessHost (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 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 643b6418edf464f6be312817f337762799bd05e7..0560c424d70a96a50f97feabaa8de0cc4b80e882 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -890,9 +890,15 @@ 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 {
+ // Once SwiftShader is set, GpuInfo can no longer be modified
+ gpu_info_ = gpu_data_manager->GetGPUInfo();
+ }
}
void GpuProcessHost::DidFailInitialize() {

Powered by Google App Engine
This is Rietveld 408576698