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

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

Issue 2805623002: gpu: Notify callbacks the reason for channel creation failure (Closed)
Patch Set: . Created 3 years, 8 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 04d1e2e6d6c2509ded7e39314799ef0ae82f708a..16b1f0db35a5dbd3295720daeddaf209207af1e0 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -677,7 +677,8 @@ void GpuProcessHost::EstablishGpuChannel(
// If GPU features are already blacklisted, no need to establish the channel.
if (!GpuDataManagerImpl::GetInstance()->GpuAccessAllowed(NULL)) {
DVLOG(1) << "GPU blacklisted, refusing to open a GPU channel.";
- callback.Run(IPC::ChannelHandle(), gpu::GPUInfo());
+ callback.Run(IPC::ChannelHandle(), gpu::GPUInfo(),
+ EstablishChannelStatus::GPU_ACCESS_DENIED);
return;
}
@@ -749,13 +750,15 @@ void GpuProcessHost::OnChannelEstablished(
if (channel_handle.is_valid() &&
!GpuDataManagerImpl::GetInstance()->GpuAccessAllowed(nullptr)) {
gpu_service_ptr_->CloseChannel(client_id);
- callback.Run(IPC::ChannelHandle(), gpu::GPUInfo());
+ callback.Run(IPC::ChannelHandle(), gpu::GPUInfo(),
+ EstablishChannelStatus::GPU_ACCESS_DENIED);
RecordLogMessage(logging::LOG_WARNING, "WARNING",
"Hardware acceleration is unavailable.");
return;
}
- callback.Run(IPC::ChannelHandle(channel_handle.release()), gpu_info_);
+ callback.Run(IPC::ChannelHandle(channel_handle.release()), gpu_info_,
+ EstablishChannelStatus::SUCCESS);
}
void GpuProcessHost::OnGpuMemoryBufferCreated(
@@ -1043,7 +1046,8 @@ void GpuProcessHost::SendOutstandingReplies() {
while (!channel_requests_.empty()) {
auto callback = channel_requests_.front();
channel_requests_.pop();
- callback.Run(IPC::ChannelHandle(), gpu::GPUInfo());
+ callback.Run(IPC::ChannelHandle(), gpu::GPUInfo(),
+ EstablishChannelStatus::GPU_HOST_INVALID);
}
while (!create_gpu_memory_buffer_requests_.empty()) {
« 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