Use OPENGL macros to be more clear about which OpenGL/ES WebGL uses on Cocoa
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Feb 2018 00:48:36 +0000 (00:48 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Feb 2018 00:48:36 +0000 (00:48 +0000)
commitf3a54b77399b36f189a1216751ec3623b6cabc9f
tree60fe1dddfddf72416b529128bb36a720279d2da4
parent1ead5e3d98dbc65721a8b8a007acf01e138ee11b
Use OPENGL macros to be more clear about which OpenGL/ES WebGL uses on Cocoa
https://bugs.webkit.org/show_bug.cgi?id=182894

Reviewed by Tim Horton.

.:

Rename OPENGL_ES_2 to OPENGL_ES.

* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:

PerformanceTests:

Rename OPENGL_ES_2 to OPENGL_ES.

* StitchMarker/wtf/Platform.h:

Source/WebCore:

Adjust the places where we check for PLATFORM(MAC) or
PLATFORM(IOS) related to WebGL, and instead rely
on USE(OPENGL) USE(OPENGL_ES).

* CMakeLists.txt:
* PlatformGTK.cmake:
* platform/graphics/GLContext.cpp:
(WebCore::initializeOpenGLShimsIfNeeded):
* platform/graphics/GraphicsContext3DPrivate.cpp:
* platform/graphics/OpenGLESShims.h:
* platform/graphics/cairo/ImageBufferCairo.cpp:
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::getEGLConfig):
(WebCore::GLContextEGL::createContext):
(WebCore::GLContextEGL::createSharingContext):
* platform/graphics/egl/GLContextEGLWPE.cpp:
(WebCore::GLContextEGL::createWPEContext):
* platform/graphics/egl/GLContextEGLWayland.cpp:
(WebCore::GLContextEGL::createWaylandContext):
* platform/graphics/egl/GLContextEGLX11.cpp:
(WebCore::GLContextEGL::createPixmapContext):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
* platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
(WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer):
(WebCore::VideoTextureCopierGStreamer::~VideoTextureCopierGStreamer):
(WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):
* platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
* platform/graphics/opengl/Extensions3DOpenGLES.cpp:
* platform/graphics/opengl/Extensions3DOpenGLES.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
(WebCore::GraphicsContext3D::create):
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::isGLES2Compliant const):
* platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp:
(WebCore::GraphicsContext3D::create):
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::isGLES2Compliant const):
(WebCore::GraphicsContext3D::getExtensions):
* platform/graphics/texmap/TextureMapperContextAttributes.cpp:
(WebCore::TextureMapperContextAttributes::initialize):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGLData::~TextureMapperGLData):
(WebCore::TextureMapperGLData::getVAO):
(WebCore::TextureMapperGL::beginPainting):
(WebCore::TextureMapperGL::endPainting):
* platform/graphics/texmap/TextureMapperGLHeaders.h:
* platform/graphics/texmap/TextureMapperShaderProgram.cpp:
(WebCore::TextureMapperShaderProgram::create):

Source/WebKit:

Rename OPENGL_ES_2 to OPENGL_ES.

* CMakeLists.txt:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
* UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
(WebKit::AcceleratedBackingStoreWayland::paint):
* UIProcess/gtk/WaylandCompositor.cpp:
(WebKit::WaylandCompositor::initializeEGL):

Source/WebKitLegacy/win:

Rename OPENGL_ES_2 to OPENGL_ES.

* WebCoreSupport/AcceleratedCompositingContext.cpp:

Source/WTF:

If we're on a Cocoa platform, define USE_OPENGL/USE_OPENGL_ES
depending on what we're actually going to use. In this case,
they are exclusive, but it doesn't appear that other platforms
use this approach. Ultimately the idea is to be more concerned
with the type of OpenGL we're using, rather than the platform.

* wtf/Platform.h: Define USE_OPENGL(_ES) for PLATFORM(COCOA).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228590 268f45cc-cd09-0410-ab3c-d52691b4dbfc
41 files changed:
ChangeLog
PerformanceTests/ChangeLog
PerformanceTests/StitchMarker/wtf/Platform.h
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformGTK.cmake
Source/WebCore/platform/graphics/ANGLEWebKitBridge.h
Source/WebCore/platform/graphics/GLContext.cpp
Source/WebCore/platform/graphics/GraphicsContext3D.h
Source/WebCore/platform/graphics/GraphicsContext3DPrivate.cpp
Source/WebCore/platform/graphics/OpenGLESShims.h
Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
Source/WebCore/platform/graphics/egl/GLContextEGLWPE.cpp
Source/WebCore/platform/graphics/egl/GLContextEGLWayland.cpp
Source/WebCore/platform/graphics/egl/GLContextEGLX11.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
Source/WebCore/platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/VideoTextureCopierGStreamer.h
Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.cpp
Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h
Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
Source/WebCore/platform/graphics/opengl/TemporaryOpenGLSetting.cpp
Source/WebCore/platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperContextAttributes.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperGLHeaders.h
Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp
Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp
Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebCoreSupport/AcceleratedCompositingContext.cpp
Source/cmake/OptionsGTK.cmake
Source/cmake/OptionsWPE.cmake