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

Unified Diff: cc/resource_provider.h

Issue 12212007: cc: Route offscreen context creation for compositor to the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove the GrContextProvider::ScopedContexts guard classes Created 7 years, 10 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: cc/resource_provider.h
diff --git a/cc/resource_provider.h b/cc/resource_provider.h
index 70d4ad1a251a6d21893dcb9425aa3c64b82efdbc..722b1a8ef99548d9716b9bbc560395040c607d55 100644
--- a/cc/resource_provider.h
+++ b/cc/resource_provider.h
@@ -15,6 +15,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/threading/thread_checker.h"
#include "cc/cc_export.h"
+#include "cc/grcontext_provider.h"
#include "cc/output_surface.h"
#include "cc/texture_copier.h"
#include "cc/texture_mailbox.h"
@@ -262,6 +263,9 @@ public:
// Indicates if we can currently lock this resource for write.
bool canLockForWrite(ResourceId);
+ GrContextProvider* offscreenContextProvider() { return &m_offscreenContextProvider; }
+ void setOffscreenContexts(WebKit::WebGraphicsContext3D* context3d, GrContext* grContext) { m_offscreenContextProvider.set_contexts(context3d, grContext); }
+
private:
struct Resource {
Resource();
@@ -333,6 +337,8 @@ private:
int m_maxTextureSize;
GLenum m_bestTextureFormat;
+ GrContextProvider m_offscreenContextProvider;
+
base::ThreadChecker m_threadChecker;
scoped_refptr<Fence> m_currentReadLockFence;

Powered by Google App Engine
This is Rietveld 408576698