[GTK] Avoid strstr() when checking (E)GL extensions
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Oct 2016 12:36:06 +0000 (12:36 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Oct 2016 12:36:06 +0000 (12:36 +0000)
commitfe4e1ebbcc7334197982b2e98ccaaaf4349ae769
treed2fe8cf74cf168bc4fe8473e8c2b9cd4d3ffed25
parent3a9014216543c8df307a14550361e4a8733e34fe
[GTK] Avoid strstr() when checking (E)GL extensions
https://bugs.webkit.org/show_bug.cgi?id=161958

Reviewed by Žan Doberšek.

Source/WebCore:

Add static method GLContext::isExtensionSupported() to properly search extenstions in the given extension
list, and use it instead of strstr().

* platform/graphics/GLContext.cpp:
(WebCore::GLContext::isExtensionSupported):
* platform/graphics/GLContext.h:
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::createSurfacelessContext):
* platform/graphics/glx/GLContextGLX.cpp:
(WebCore::hasSGISwapControlExtension):

Source/WebKit2:

Use GLContext::isExtensionSupported() instead of strstr().

* UIProcess/gtk/WaylandCompositor.cpp:
(WebKit::WaylandCompositor::initializeEGL):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@207614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GLContext.cpp
Source/WebCore/platform/graphics/GLContext.h
Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
Source/WebCore/platform/graphics/glx/GLContextGLX.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp