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

Unified Diff: Source/core/html/canvas/WebGLContextGroup.h

Issue 17230006: Implement WEBGL_shared_resources Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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: Source/core/html/canvas/WebGLContextGroup.h
diff --git a/Source/core/html/canvas/WebGLContextGroup.h b/Source/core/html/canvas/WebGLContextGroup.h
index e888083f38fd8bcf2064758872fc00d3cf686e0f..7c46e91ad65dba6b420f5b37bc90e8896bd684ce 100644
--- a/Source/core/html/canvas/WebGLContextGroup.h
+++ b/Source/core/html/canvas/WebGLContextGroup.h
@@ -45,7 +45,8 @@ public:
static PassRefPtr<WebGLContextGroup> create();
virtual ~WebGLContextGroup();
- void addContext(WebGLRenderingContext*);
+ // Adds the context to this group and returns a context index of the context.
Ken Russell (switch to Gerrit) 2013/06/19 03:51:24 Is the context index used anywhere? It looks like
greggman 2013/06/21 19:54:21 Done.
+ unsigned addContext(WebGLRenderingContext*);
void removeContext(WebGLRenderingContext*);
void addObject(WebGLSharedObject*);
@@ -55,6 +56,13 @@ public:
void loseContextGroup(WebGLRenderingContext::LostContextMode);
+ // Problem with this is it won't work in workers. You need
+ // one object per worker per context group.
+ void flushOnContextSwitch(WebGLRenderingContext*);
+
+ long generateAcquireRequestId();
+ void cancelAcquireSharedResource(const WebGLRenderingContext*, long);
+
private:
friend class WebGLObject;
@@ -62,6 +70,9 @@ public:
void detachAndRemoveAllObjects();
+ unsigned m_contextCreationCount;
+ long m_acquireRequestCount;
+
HashSet<WebGLRenderingContext*> m_contexts;
HashSet<WebGLSharedObject*> m_groupObjects;
};

Powered by Google App Engine
This is Rietveld 408576698