| 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 ec7cd536b8fc5b9a72eb08ffab5ddc508649e0ee..cf40c67f7dea4b1be6cb86c09e2897e81cd8da67 100644
|
| --- a/content/browser/gpu/gpu_process_host.cc
|
| +++ b/content/browser/gpu/gpu_process_host.cc
|
| @@ -635,9 +635,9 @@ bool GpuProcessHost::Init() {
|
| ->GetAssociatedInterfaceSupport()
|
| ->GetRemoteAssociatedInterface(&gpu_main_ptr_);
|
| ui::mojom::GpuServiceRequest request(&gpu_service_ptr_);
|
| - gpu_main_ptr_->CreateGpuService(std::move(request),
|
| - gpu_host_binding_.CreateInterfacePtrAndBind(),
|
| - gpu_preferences);
|
| + gpu_main_ptr_->CreateGpuService(
|
| + std::move(request), gpu_host_binding_.CreateInterfacePtrAndBind(),
|
| + gpu_preferences, activity_flags_.CloneHandle());
|
|
|
| #if defined(USE_OZONE)
|
| // Ozone needs to send the primary DRM device to GPU process as early as
|
| @@ -864,6 +864,16 @@ void GpuProcessHost::OnProcessLaunchFailed(int error_code) {
|
| }
|
|
|
| void GpuProcessHost::OnProcessCrashed(int exit_code) {
|
| + // If the GPU process crashed while compiling a shader, we may have invalid
|
| + // cached binaries. Completely clear the shader cache to force shader binaries
|
| + // to be re-created.
|
| + if (activity_flags_.IsFlagSet(
|
| + gpu::ActivityFlagsBase::FLAG_LOADING_PROGRAM_BINARY)) {
|
| + for (auto cache_key : client_id_to_shader_cache_) {
|
| + cache_key.second->Clear(base::Time(), base::Time::Max(),
|
| + net::CompletionCallback());
|
| + }
|
| + }
|
| SendOutstandingReplies();
|
| RecordProcessCrash();
|
| GpuDataManagerImpl::GetInstance()->ProcessCrashed(
|
|
|