Title: [259764] trunk/Source/WebCore
- Revision
- 259764
- Author
- [email protected]
- Date
- 2020-04-08 15:57:51 -0700 (Wed, 08 Apr 2020)
Log Message
Release WebGLLayer earlier in ~GraphicsContextGLOpenGL
https://bugs.webkit.org/show_bug.cgi?id=210213
Patch by Kenneth Russell <[email protected]> on 2020-04-08
Reviewed by Dean Jackson.
Release WebGLLayer earlier and remove public context property,
which is no longer called.
* platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
(WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):
* platform/graphics/cocoa/WebGLLayer.h:
* platform/graphics/cocoa/WebGLLayer.mm:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (259763 => 259764)
--- trunk/Source/WebCore/ChangeLog 2020-04-08 22:55:41 UTC (rev 259763)
+++ trunk/Source/WebCore/ChangeLog 2020-04-08 22:57:51 UTC (rev 259764)
@@ -1,3 +1,18 @@
+2020-04-08 Kenneth Russell <[email protected]>
+
+ Release WebGLLayer earlier in ~GraphicsContextGLOpenGL
+ https://bugs.webkit.org/show_bug.cgi?id=210213
+
+ Reviewed by Dean Jackson.
+
+ Release WebGLLayer earlier and remove public context property,
+ which is no longer called.
+
+ * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
+ (WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):
+ * platform/graphics/cocoa/WebGLLayer.h:
+ * platform/graphics/cocoa/WebGLLayer.mm:
+
2020-04-08 Daniel Bates <[email protected]>
Track editable elements on screen
Modified: trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm (259763 => 259764)
--- trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm 2020-04-08 22:55:41 UTC (rev 259763)
+++ trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm 2020-04-08 22:57:51 UTC (rev 259764)
@@ -582,6 +582,10 @@
gl::DeleteFramebuffers(1, &m_fbo);
#endif
+ // Release the WebGLLayer before destroying the underlying
+ // context to enable it to do any necessary cleanups.
+ m_webGLLayer = nullptr;
+
#if USE(OPENGL_ES)
[EAGLContext setCurrentContext:0];
[static_cast<EAGLContext *>(m_contextObj) release];
@@ -592,7 +596,6 @@
EGL_MakeCurrent(m_displayObj, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
EGL_DestroyContext(m_displayObj, m_contextObj);
#endif
- [m_webGLLayer setContext:nullptr];
}
LOG(WebGL, "Destroyed a GraphicsContextGLOpenGL (%p).", this);
Modified: trunk/Source/WebCore/platform/graphics/cocoa/WebGLLayer.h (259763 => 259764)
--- trunk/Source/WebCore/platform/graphics/cocoa/WebGLLayer.h 2020-04-08 22:55:41 UTC (rev 259763)
+++ trunk/Source/WebCore/platform/graphics/cocoa/WebGLLayer.h 2020-04-08 22:57:51 UTC (rev 259764)
@@ -66,8 +66,6 @@
#endif
}
-@property (nonatomic) NakedPtr<WebCore::GraphicsContextGLOpenGL> context;
-
- (id)initWithGraphicsContextGL:(NakedPtr<WebCore::GraphicsContextGLOpenGL>)context;
- (CGImageRef)copyImageSnapshotWithColorSpace:(CGColorSpaceRef)colorSpace;
Modified: trunk/Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm (259763 => 259764)
--- trunk/Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm 2020-04-08 22:55:41 UTC (rev 259763)
+++ trunk/Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm 2020-04-08 22:57:51 UTC (rev 259764)
@@ -59,8 +59,6 @@
@implementation WebGLLayer
-@synthesize context=_context;
-
-(id)initWithGraphicsContextGL:(NakedPtr<WebCore::GraphicsContextGLOpenGL>)context
{
_context = context;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes