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

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: Restart with GrContext owned in cc 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 ead62a375e82b647bd79ba792e5150463bfeed3a..74593fb5b0237bd978a85481aff4989e3f3790bb 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"
@@ -34,7 +35,6 @@ class Vector2d;
}
namespace cc {
-
class TextureUploader;
// This class is not thread-safe and can only be called from the thread it was
@@ -261,6 +261,9 @@ public:
// Indicates if we can currently lock this resource for write.
bool canLockForWrite(ResourceId);
+ GrContextProvider* grContextProvider() { return &m_grContextProvider; }
+ void setContext3dForGrContext(WebKit::WebGraphicsContext3D* context3d);
+
private:
struct Resource {
Resource();
@@ -332,6 +335,8 @@ private:
int m_maxTextureSize;
GLenum m_bestTextureFormat;
+ GrContextProvider m_grContextProvider;
+
base::ThreadChecker m_threadChecker;
scoped_refptr<Fence> m_currentReadLockFence;

Powered by Google App Engine
This is Rietveld 408576698