[webkit-changes] [WebKit/WebKit] 1c695e: Merge 254183 at main - [GTK] Crash in Nicosia::GC3DLa...
Carlos Garcia Campos
noreply at github.com
Fri Sep 9 00:43:11 PDT 2022
Branch: refs/heads/webkitglib/2.38
Home: https://github.com/WebKit/WebKit
Commit: 1c695e2b52c95b5b8451bacff96cb3acd1239b20
https://github.com/WebKit/WebKit/commit/1c695e2b52c95b5b8451bacff96cb3acd1239b20
Author: Carlos Garcia Campos <cgarcia at igalia.com>
Date: 2022-09-09 (Fri, 09 Sep 2022)
Changed paths:
M Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp
M Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.h
M Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp
Log Message:
-----------
Merge 254183 at main - [GTK] Crash in Nicosia::GC3DLayer::makeContextCurrent, failure to play fullscreen video due to failure in EGL display creation
https://bugs.webkit.org/show_bug.cgi?id=201507
Reviewed by Žan Doberšek.
NicosiaGCGLLayer assumes the creation of the GL context can't fail and
we end up crashing when that happens for whatever reason.
* Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp:
(Nicosia::GCGLLayer::create): Create the GL context and return nullptr
if it fails, otherwise pass it to the constructor.
(Nicosia::GCGLLayer::GCGLLayer): Receive the GL context as parameter too.
* Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.h:
* Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:
(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): Do not
initialize the context here, move it to initialize().
(WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL): Return
early if makeContextCurrent() returns false.
(WebCore::GraphicsContextGLOpenGL::initialize): Move initialization
here, returning false if context creation or making the context current fails.
(WebCore::GraphicsContextGLOpenGL::makeContextCurrent): Null check m_nicosiaLayer.
Canonical link: https://commits.webkit.org/254183@main
(cherry picked from commit b7d555805988f56bc97e9ae21014a35a463b1987)
More information about the webkit-changes
mailing list