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

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

Issue 2029293002: Handle all context lost reasons when determining guilt of domain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initialize variable. Created 4 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 | « no previous file | gpu/command_buffer/common/constants.h » ('j') | 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 8764010907cea33a8f5ed6bed108fd07ab166d0a..8727e61632ee8cffd2e5c80ec803cc53dd3f61e2 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -879,19 +879,25 @@ void GpuProcessHost::OnDidLoseContext(bool offscreen,
return;
}
- GpuDataManagerImpl::DomainGuilt guilt;
+ GpuDataManagerImpl::DomainGuilt guilt =
+ GpuDataManagerImpl::DOMAIN_GUILT_UNKNOWN;
switch (reason) {
case gpu::error::kGuilty:
guilt = GpuDataManagerImpl::DOMAIN_GUILT_KNOWN;
break;
+ // Treat most other error codes as though they had unknown provenance.
+ // In practice this doesn't affect the user experience. A lost context
+ // of either known or unknown guilt still causes user-level 3D APIs
+ // (e.g. WebGL) to be blocked on that domain until the user manually
+ // reenables them.
case gpu::error::kUnknown:
- guilt = GpuDataManagerImpl::DOMAIN_GUILT_UNKNOWN;
+ case gpu::error::kOutOfMemory:
+ case gpu::error::kMakeCurrentFailed:
+ case gpu::error::kGpuChannelLost:
+ case gpu::error::kInvalidGpuMessage:
break;
case gpu::error::kInnocent:
return;
- default:
- NOTREACHED();
- return;
}
GpuDataManagerImpl::GetInstance()->BlockDomainFrom3DAPIs(url, guilt);
« no previous file with comments | « no previous file | gpu/command_buffer/common/constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698