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

Unified Diff: Source/core/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: Discovered I was doing RefPtr's wrong while debugging 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/core/html/canvas/WebGLRenderingContext.h
diff --git a/Source/core/html/canvas/WebGLRenderingContext.h b/Source/core/html/canvas/WebGLRenderingContext.h
index 6e6fe0a668ef4ad305fb0af99469e7576373ccc2..94179327d6af746a3d1351a92b9dd79309667045 100644
--- a/Source/core/html/canvas/WebGLRenderingContext.h
+++ b/Source/core/html/canvas/WebGLRenderingContext.h
@@ -324,6 +324,9 @@ public:
virtual bool hasPendingActivity() const;
virtual void stop();
+ static void forciblyLoseOldestContext();
+ static IntSize oldestContextSize();
+
private:
friend class EXTDrawBuffers;
friend class WebGLFramebuffer;
@@ -782,6 +785,13 @@ public:
bool supportsDrawBuffers();
friend class WebGLStateRestorer;
+
+ static Vector<WebGLRenderingContext*>& activeContexts();
+ static Vector<WebGLRenderingContext*>& forciblyEvictedContexts();
+
+ static void activateContext(WebGLRenderingContext*);
+ static void deactivateContext(WebGLRenderingContext*, bool addToInactiveList);
+ static void willDestroyContext(WebGLRenderingContext*);
};
} // namespace WebCore
« no previous file with comments | « no previous file | Source/core/html/canvas/WebGLRenderingContext.cpp » ('j') | Source/core/html/canvas/WebGLRenderingContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698