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

Unified Diff: cc/output/context_provider.h

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
« no previous file with comments | « no previous file | cc/output/context_provider.cc » ('j') | cc/output/context_provider.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/context_provider.h
diff --git a/cc/output/context_provider.h b/cc/output/context_provider.h
index 71d06bd7591d22f180f7a395b5be412d733b03bb..7acadb84913b4fa99af187c1150f97f795e5f4ed 100644
--- a/cc/output/context_provider.h
+++ b/cc/output/context_provider.h
@@ -9,8 +9,7 @@
#include "base/memory/ref_counted.h"
#include "cc/base/cc_export.h"
#include "gpu/command_buffer/common/capabilities.h"
-
-class GrContext;
+#include "third_party/skia/include/gpu/GrContext.h"
namespace base {
class Lock;
@@ -44,6 +43,9 @@ class ContextProvider : public base::RefCountedThreadSafe<ContextProvider> {
CC_EXPORT Capabilities();
};
+ // invalidate the cached OGL state in GrContext
piman 2015/05/06 22:03:40 nit: "Invalidates" (uppercase, descriptive rather
CodeByThePound 2015/05/06 22:27:55 Acknowledged.
+ void InvalidateGrContext(uint32_t state = kAll_GrBackendState);
piman 2015/05/06 22:03:40 nit: no default arguments, per style guide
CodeByThePound 2015/05/06 22:27:55 Acknowledged.
+
// Sets up a lock so this context can be used from multiple threads.
virtual void SetupLock() = 0;
@@ -87,6 +89,9 @@ class ContextProvider : public base::RefCountedThreadSafe<ContextProvider> {
protected:
friend class base::RefCountedThreadSafe<ContextProvider>;
virtual ~ContextProvider() {}
+
+ private:
+ virtual void DoInvalidateGrContext(uint32_t) = 0;
};
} // namespace cc
« no previous file with comments | « no previous file | cc/output/context_provider.cc » ('j') | cc/output/context_provider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698