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

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: 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 439e14f4fc1e49a9f57be80f56e5da5e9cec1cbd..7da186f9b324e277e31b6f841637db9ee9d929b4 100644
--- a/content/common/gpu/client/context_provider_command_buffer.cc
+++ b/content/common/gpu/client/context_provider_command_buffer.cc
@@ -11,7 +11,6 @@
#include "base/strings/stringprintf.h"
#include "cc/output/managed_memory_policy.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
-#include "third_party/skia/include/gpu/GrContext.h"
#include "webkit/common/gpu/grcontext_for_webgraphicscontext3d.h"
namespace content {
@@ -142,6 +141,14 @@ class GrContext* ContextProviderCommandBuffer::GrContext() {
return gr_context_->get();
}
+void ContextProviderCommandBuffer::DoInvalidateGrContext(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