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

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

Issue 1131723002: Add ContextProvider::InvalidateGrContext to reset GL state in GrContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix int/uint typo Created 5 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
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 eb7096499b2d23d29552e8c61b652968f97e7267..2f00de1fe296877762620733ff3c02dcad436d66 100644
--- a/content/common/gpu/client/context_provider_command_buffer.cc
+++ b/content/common/gpu/client/context_provider_command_buffer.cc
@@ -143,6 +143,14 @@ class GrContext* ContextProviderCommandBuffer::GrContext() {
return gr_context_->get();
}
+void ContextProviderCommandBuffer::InvalidateGrContext(uint32_t state) {
+ if (gr_context_) {
+ DCHECK(lost_context_callback_proxy_); // Is bound to thread.
+ DCHECK(context_thread_checker_.CalledOnValidThread());
+ gr_context_->get()->resetContext(state);
+ }
+}
+
void ContextProviderCommandBuffer::SetupLock() {
DCHECK(context3d_);
context3d_->GetCommandBufferProxy()->SetLock(&context_lock_);

Powered by Google App Engine
This is Rietveld 408576698