[webkit-changes] [WebKit/WebKit] ef4bcf: [WPE][GTK] ExtensionsGLOpenGLES.cpp uses GLES3 sym...

Adrian Perez noreply at github.com
Sun Apr 23 23:51:58 PDT 2023


  Branch: refs/heads/webkitglib/2.38
  Home:   https://github.com/WebKit/WebKit
  Commit: ef4bcf4c99daedaa2221134db02286c1a70f5096
      https://github.com/WebKit/WebKit/commit/ef4bcf4c99daedaa2221134db02286c1a70f5096
  Author: Adrian Perez de Castro <aperez at igalia.com>
  Date:   2023-04-24 (Mon, 24 Apr 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
    M Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLES.cpp

  Log Message:
  -----------
  [WPE][GTK] ExtensionsGLOpenGLES.cpp uses GLES3 symbols unconditionally in 2.38.x
https://bugs.webkit.org/show_bug.cgi?id=255847

Reviewed by NOBODY (OOPS!).

EGLNativeWindowType can be aliased to a different type depending on the
EGL implementation headers, and static_cast (or reinterpret_cast) may
not always work. This is similar to 194561 at main, but with the conversion
being done in the opposite direction, therefore we apply the same
solution using a C style cast expression, which works in all cases.

For the build failures related to the usage of OpenGL ES 3 symbols, add
the needed HAVE(OPENGL_3_ES) guards and avoid using GL_MAJOR_VERSION
and instead parse the GL_VERSION string in a way similar as in the
GLContext::version() function.

* Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::createWindowContext): Use a plain C cast expression.
* Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLES.cpp:
(WebCore::ExtensionsGLOpenGLES::platformSupportsExtension): Apply
HAVE(OPENGL_3_ES) guards, avoid using GL_MAJOR_VERSION.




More information about the webkit-changes mailing list