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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h

Issue 2547813002: Remove WebGLObject maps from WebGLRenderingContextBase and WebGLContextGroup. (Closed)
Patch Set: Fixed WebGLContextObject::validate. Made WebGLExtension non-finalized. Created 4 years 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: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
index a7b105741259c5e6c2394d39e2cb4c2884ff18e0..93627100016610e2516e385376508038d21597f4 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
@@ -101,7 +101,6 @@ class WebGLProgram;
class WebGLRenderbuffer;
class WebGLShader;
class WebGLShaderPrecisionFormat;
-class WebGLSharedObject;
class WebGLUniformLocation;
class WebGLVertexArrayObjectBase;
@@ -529,6 +528,7 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext,
void forceLostContext(LostContextMode, AutoRecoveryMethod);
void forceRestoreContext();
void loseContextImpl(LostContextMode, AutoRecoveryMethod);
+ uint32_t numberOfContextLosses() const;
// Utilities to restore GL state to match the rendering context's
// saved state. Use these after contextGL()-based state changes that
@@ -552,16 +552,8 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext,
void markLayerComposited() override;
ImageData* paintRenderingResultsToImageData(SourceDrawingBuffer) override;
- void removeSharedObject(WebGLSharedObject*);
- void removeContextObject(WebGLContextObject*);
-
unsigned maxVertexAttribs() const { return m_maxVertexAttribs; }
- // Eagerly finalize WebGLRenderingContextBase in order for it
- // to (first) be able to detach its WebGLContextObjects, before
- // they're later swept and finalized.
- EAGERLY_FINALIZE();
- DECLARE_EAGER_FINALIZATION_OPERATOR_NEW();
DECLARE_VIRTUAL_TRACE();
DECLARE_VIRTUAL_TRACE_WRAPPERS();
@@ -647,10 +639,6 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext,
void DrawingBufferClientRestoreFramebufferBinding() override;
void DrawingBufferClientRestorePixelUnpackBufferBinding() override;
- void addSharedObject(WebGLSharedObject*);
- void addContextObject(WebGLContextObject*);
- void detachAndRemoveAllObjects();
-
virtual void destroyContext();
void markContextChanged(ContentChangeType);
@@ -694,7 +682,7 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext,
RefPtr<DrawingBuffer> m_drawingBuffer;
DrawingBuffer* drawingBuffer() const;
- RefPtr<WebGLContextGroup> m_contextGroup;
+ TraceWrapperMember<WebGLContextGroup> m_contextGroup;
bool m_isHidden;
LostContextMode m_contextLostMode;
@@ -709,7 +697,6 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext,
Timer<WebGLRenderingContextBase> m_restoreTimer;
bool m_markedCanvasDirty;
- HeapHashSet<WeakMember<WebGLContextObject>> m_contextObjects;
// List of bound VBO's. Used to maintain info about sizes for ARRAY_BUFFER and
// stored values for ELEMENT_ARRAY_BUFFER
@@ -1525,7 +1512,7 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext,
static void deactivateContext(WebGLRenderingContextBase*);
static void addToEvictedList(WebGLRenderingContextBase*);
static void removeFromEvictedList(WebGLRenderingContextBase*);
- static void willDestroyContext(WebGLRenderingContextBase*);
+ static void restoreEvictedContext(WebGLRenderingContextBase*);
static void forciblyLoseOldestContext(const String& reason);
// Return the least recently used context's position in the active context
// vector. If the vector is empty, return the maximum allowed active context

Powered by Google App Engine
This is Rietveld 408576698