[webkit-reviews] review granted: [Bug 178719] [GTK] When using EGL, request an OpenGL core profile when possible : [Attachment 335924] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 16 02:52:14 PDT 2018


Carlos Garcia Campos <cgarcia at igalia.com> has granted Miguel Gomez
<magomez at igalia.com>'s request for review:
Bug 178719: [GTK] When using EGL, request an OpenGL core profile when possible
https://bugs.webkit.org/show_bug.cgi?id=178719

Attachment 335924: Patch

https://bugs.webkit.org/attachment.cgi?id=335924&action=review




--- Comment #2 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 335924
  --> https://bugs.webkit.org/attachment.cgi?id=335924
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=335924&action=review

> Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:379
> +	   String versionString = String(reinterpret_cast<const
char*>(eglQueryString(display, EGL_VERSION)));
> +	   Vector<String> versionStringComponents;
> +	   versionString.split(' ', versionStringComponents);
> +	   Vector<String> versionDigits;
> +	   versionStringComponents[0].split('.', versionDigits);
> +	   uint version = versionDigits[0].toUInt() * 100 +
versionDigits[1].toUInt() * 10;

I don't think we need to parse the version here again. We already have the
version parsed when EGL is initialized in PlatformDisplay. I guess we could
simply pass the PlatformDisplay here instead of the EGLDisplay and use
PlatformDisplay::eglCheckVersion()

> Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:417
> +	   contextAttributesInitialized = true;

We are doing this in all the cases inside the if, no? I think we can dot this
once at the beginning.


More information about the webkit-reviews mailing list