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

Unified Diff: Source/WebCore/html/canvas/WebGLRenderingContext.h

Issue 14217005: Limit the number of WebGL contexts that are active at any given time (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 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/WebCore/html/canvas/WebGLRenderingContext.h
diff --git a/Source/WebCore/html/canvas/WebGLRenderingContext.h b/Source/WebCore/html/canvas/WebGLRenderingContext.h
index b7160f7d9157db3afb24c3222bf22e3b4cd7a155..6e565cff317ae6d492d2b49e01286ef842c94d65 100644
--- a/Source/WebCore/html/canvas/WebGLRenderingContext.h
+++ b/Source/WebCore/html/canvas/WebGLRenderingContext.h
@@ -324,6 +324,8 @@ public:
virtual bool hasPendingActivity() const;
virtual void stop();
+ static void forceLostOldestContext();
Ken Russell (switch to Gerrit) 2013/04/16 02:57:52 The naming convention is getting confusing; I sugg
+
private:
friend class EXTDrawBuffers;
friend class WebGLFramebuffer;
@@ -782,6 +784,13 @@ public:
bool supportsDrawBuffers();
friend class WebGLStateRestorer;
+
+ static Vector<WebGLRenderingContext*>& activeContexts();
+ static Vector<WebGLRenderingContext*>& inactiveContexts();
+
+ static void activateContext(WebGLRenderingContext*);
+ static void deactivateContext(WebGLRenderingContext*, bool addToInactiveList);
+ static void removeContext(WebGLRenderingContext*);
Ken Russell (switch to Gerrit) 2013/04/16 02:57:52 "removeContext" is too generic a name. "willDestro
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698