summaryrefslogtreecommitdiffstats
path: root/content/common/gpu/client/context_provider_command_buffer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/common/gpu/client/context_provider_command_buffer.cc')
-rw-r--r--content/common/gpu/client/context_provider_command_buffer.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/content/common/gpu/client/context_provider_command_buffer.cc b/content/common/gpu/client/context_provider_command_buffer.cc
index eb70964..2f00de1 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_);