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

Unified Diff: content/common/gpu/client/context_provider_command_buffer.cc

Issue 1168943002: Remove ContextProvider::IsContextLost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: contextprovider: . Created 5 years, 6 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
Index: content/common/gpu/client/context_provider_command_buffer.cc
diff --git a/content/common/gpu/client/context_provider_command_buffer.cc b/content/common/gpu/client/context_provider_command_buffer.cc
index 58e34b6431795a18818a84cafde51f9889987eba..cb827258a5fdf8c271bc0d3eb73874d9a5bc7fe4 100644
--- a/content/common/gpu/client/context_provider_command_buffer.cc
+++ b/content/common/gpu/client/context_provider_command_buffer.cc
@@ -137,7 +137,8 @@ class GrContext* ContextProviderCommandBuffer::GrContext() {
gr_context_.reset(new GrContextForWebGraphicsContext3D(context3d_.get()));
// If GlContext is already lost, also abandon the new GrContext.
- if (gr_context_->get() && IsContextLost())
+ if (gr_context_->get() &&
+ ContextGL()->GetGraphicsResetStatusKHR() != GL_NO_ERROR)
gr_context_->get()->abandonContext();
return gr_context_->get();
@@ -168,18 +169,11 @@ ContextProviderCommandBuffer::ContextCapabilities() {
return capabilities_;
}
-bool ContextProviderCommandBuffer::IsContextLost() {
- DCHECK(lost_context_callback_proxy_); // Is bound to thread.
- DCHECK(context_thread_checker_.CalledOnValidThread());
-
- return context3d_->isContextLost();
-}
-
void ContextProviderCommandBuffer::VerifyContexts() {
DCHECK(lost_context_callback_proxy_); // Is bound to thread.
DCHECK(context_thread_checker_.CalledOnValidThread());
- if (context3d_->isContextLost())
+ if (ContextGL()->GetGraphicsResetStatusKHR() != GL_NO_ERROR)
OnLostContext();
}
« no previous file with comments | « content/common/gpu/client/context_provider_command_buffer.h ('k') | content/renderer/gpu/mailbox_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698