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

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

Issue 2909483004: gpu: GpuProcessHost does not need to remember the GPUInfo. (Closed)
Patch Set: . Created 3 years, 7 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
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6b0b7066af7c328658490d0fcf75a63f86ee73ed..172a84bbaa20bc9ef073b90b584ca15d8b3ebd56 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -774,10 +774,11 @@ void GpuProcessHost::OnChannelEstablished(
DCHECK(channel_requests_.front().Equals(callback));
channel_requests_.pop();
+ auto* gpu_data_manager = GpuDataManagerImpl::GetInstance();
// Currently if any of the GPU features are blacklisted, we don't establish a
// GPU channel.
if (channel_handle.is_valid() &&
- !GpuDataManagerImpl::GetInstance()->GpuAccessAllowed(nullptr)) {
+ !gpu_data_manager->GpuAccessAllowed(nullptr)) {
gpu_service_ptr_->CloseChannel(client_id);
callback.Run(IPC::ChannelHandle(), gpu::GPUInfo(),
EstablishChannelStatus::GPU_ACCESS_DENIED);
@@ -786,8 +787,8 @@ void GpuProcessHost::OnChannelEstablished(
return;
}
- callback.Run(IPC::ChannelHandle(channel_handle.release()), gpu_info_,
- EstablishChannelStatus::SUCCESS);
+ callback.Run(IPC::ChannelHandle(channel_handle.release()),
+ gpu_data_manager->GetGPUInfo(), EstablishChannelStatus::SUCCESS);
}
void GpuProcessHost::OnGpuMemoryBufferCreated(
@@ -846,11 +847,8 @@ void GpuProcessHost::DidInitialize(
initialized_ = true;
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();
}
}
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698