summaryrefslogtreecommitdiffstats
path: root/content/browser/gpu/gpu_process_host.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/gpu/gpu_process_host.cc')
-rw-r--r--content/browser/gpu/gpu_process_host.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 51be97f..7a13cbf 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -240,8 +240,9 @@ bool GpuProcessHost::HostIsValid(GpuProcessHost* host) {
// blacklisted, and we can kill it and start over.
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess) ||
CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessGPU) ||
- host->software_rendering() ||
- !GpuDataManagerImpl::GetInstance()->ShouldUseSoftwareRendering()) {
+ (host->valid_ &&
+ (host->software_rendering() ||
+ !GpuDataManagerImpl::GetInstance()->ShouldUseSoftwareRendering()))) {
return true;
}
@@ -307,6 +308,7 @@ GpuProcessHost* GpuProcessHost::FromID(int host_id) {
GpuProcessHost::GpuProcessHost(int host_id, GpuProcessKind kind)
: host_id_(host_id),
+ valid_(true),
in_process_(false),
software_rendering_(false),
kind_(kind),
@@ -443,7 +445,10 @@ bool GpuProcessHost::Send(IPC::Message* msg) {
return true;
}
- return process_->Send(msg);
+ bool result = process_->Send(msg);
+ if (!result)
+ valid_ = false;
+ return result;
}
bool GpuProcessHost::OnMessageReceived(const IPC::Message& message) {