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

Unified Diff: content/browser/android/in_process/context_provider_in_process.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/browser/android/in_process/context_provider_in_process.cc
diff --git a/content/browser/android/in_process/context_provider_in_process.cc b/content/browser/android/in_process/context_provider_in_process.cc
index ed26bd5e330943f297f8689c15073243a5424cfa..3f0f341f299e0ba0d267ae8c91846ed127255045 100644
--- a/content/browser/android/in_process/context_provider_in_process.cc
+++ b/content/browser/android/in_process/context_provider_in_process.cc
@@ -11,6 +11,7 @@
#include "content/common/gpu/client/grcontext_for_webgraphicscontext3d.h"
#include "gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
+#include "third_party/skia/include/gpu/GrContext.h"
using gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl;
@@ -159,6 +160,14 @@ class GrContext* ContextProviderInProcess::GrContext() {
return gr_context_->get();
}
+void ContextProviderInProcess::InvalidateGrContext(uint32_t state) {
+ DCHECK(lost_context_callback_proxy_); // Is bound to thread.
+ DCHECK(context_thread_checker_.CalledOnValidThread());
+
+ if (gr_context_)
+ return gr_context_->get()->resetContext(state);
+}
+
void ContextProviderInProcess::SetupLock() {
context3d_->SetLock(&context_lock_);
}

Powered by Google App Engine
This is Rietveld 408576698