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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 317
318 void removeSharedObject(WebGLSharedObject*); 318 void removeSharedObject(WebGLSharedObject*);
319 void removeContextObject(WebGLContextObject*); 319 void removeContextObject(WebGLContextObject*);
320 320
321 unsigned getMaxVertexAttribs() const { return m_maxVertexAttribs; } 321 unsigned getMaxVertexAttribs() const { return m_maxVertexAttribs; }
322 322
323 // ActiveDOMObject notifications 323 // ActiveDOMObject notifications
324 virtual bool hasPendingActivity() const; 324 virtual bool hasPendingActivity() const;
325 virtual void stop(); 325 virtual void stop();
326 326
327 static void forceLostOldestContext();
Ken Russell (switch to Gerrit) 2013/04/16 02:57:52 The naming convention is getting confusing; I sugg
328
327 private: 329 private:
328 friend class EXTDrawBuffers; 330 friend class EXTDrawBuffers;
329 friend class WebGLFramebuffer; 331 friend class WebGLFramebuffer;
330 friend class WebGLObject; 332 friend class WebGLObject;
331 friend class OESVertexArrayObject; 333 friend class OESVertexArrayObject;
332 friend class WebGLDebugShaders; 334 friend class WebGLDebugShaders;
333 friend class WebGLCompressedTextureATC; 335 friend class WebGLCompressedTextureATC;
334 friend class WebGLCompressedTexturePVRTC; 336 friend class WebGLCompressedTexturePVRTC;
335 friend class WebGLCompressedTextureS3TC; 337 friend class WebGLCompressedTextureS3TC;
336 friend class WebGLRenderingContextErrorMessageCallback; 338 friend class WebGLRenderingContextErrorMessageCallback;
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 777
776 void setBackDrawBuffer(GC3Denum); 778 void setBackDrawBuffer(GC3Denum);
777 779
778 void restoreCurrentFramebuffer(); 780 void restoreCurrentFramebuffer();
779 void restoreCurrentTexture2D(); 781 void restoreCurrentTexture2D();
780 782
781 // Check if EXT_draw_buffers extension is supported and if it satisfies the WebGL requirements. 783 // Check if EXT_draw_buffers extension is supported and if it satisfies the WebGL requirements.
782 bool supportsDrawBuffers(); 784 bool supportsDrawBuffers();
783 785
784 friend class WebGLStateRestorer; 786 friend class WebGLStateRestorer;
787
788 static Vector<WebGLRenderingContext*>& activeContexts();
789 static Vector<WebGLRenderingContext*>& inactiveContexts();
790
791 static void activateContext(WebGLRenderingContext*);
792 static void deactivateContext(WebGLRenderingContext*, bool addToInactiveList );
793 static void removeContext(WebGLRenderingContext*);
Ken Russell (switch to Gerrit) 2013/04/16 02:57:52 "removeContext" is too generic a name. "willDestro
785 }; 794 };
786 795
787 } // namespace WebCore 796 } // namespace WebCore
788 797
789 #endif 798 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698