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

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: 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 c4776c21f9f6a89b0023abcaf1fd582786f87cb2..3793374124a3a4f79378412b11a8c7ff45648370 100644
--- a/cc/resource_provider.h
+++ b/cc/resource_provider.h
@@ -24,6 +24,8 @@
#include "third_party/skia/include/core/SkCanvas.h"
#include "ui/gfx/size.h"
+class GrContext;
+
namespace WebKit {
class WebGraphicsContext3D;
}
@@ -63,6 +65,17 @@ public:
GLenum bestTextureFormat() const { return m_bestTextureFormat; }
unsigned numResources() const { return m_resources.size(); }
+ WebKit::WebGraphicsContext3D* offscreenGraphicsContext3d() { return m_offscreenContext3d; }
piman 2013/02/05 22:42:48 I don't think it belongs here, since it has nothin
danakj 2013/02/05 22:56:00 Oh, ya ok I'll give that a shot. The one problem I
+ GrContext* offscreenGrContext() { return m_offscreenGrContext; }
+
+ void setOffscreenContexts(WebKit::WebGraphicsContext3D* context,
+ GrContext* grContext)
+ {
+ m_offscreenContext3d = context;
+ m_offscreenGrContext = grContext;
+ }
+
+
// Checks whether a resource is in use by a consumer.
bool inUseByConsumer(ResourceId);
@@ -293,6 +306,8 @@ private:
void lazyAllocate(Resource*);
OutputSurface* m_outputSurface;
+ WebKit::WebGraphicsContext3D* m_offscreenContext3d;
+ GrContext* m_offscreenGrContext;
ResourceId m_nextId;
ResourceMap m_resources;
int m_nextChild;

Powered by Google App Engine
This is Rietveld 408576698