Changeset 252717 in webkit
- Timestamp:
- Nov 20, 2019, 3:59:11 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 33 edited
- 1 copied
-
ChangeLog (modified) (1 diff)
-
Source/ThirdParty/ANGLE/CMakeLists.txt (modified) (1 diff)
-
Source/ThirdParty/ANGLE/ChangeLog (modified) (1 diff)
-
Source/ThirdParty/ANGLE/GLESv2.cmake (modified) (1 diff)
-
Source/ThirdParty/ANGLE/PlatformGTK.cmake (modified) (1 diff)
-
Source/ThirdParty/ANGLE/adjust-angle-include-paths.sh (modified) (2 diffs)
-
Source/ThirdParty/ANGLE/include/CMakeLists.txt (modified) (1 diff)
-
Source/WTF/ChangeLog (modified) (1 diff)
-
Source/WTF/wtf/Platform.h (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Headers.cmake (modified) (1 diff)
-
Source/WebCore/PlatformGTK.cmake (modified) (2 diffs)
-
Source/WebCore/SourcesGTK.txt (modified) (1 diff)
-
Source/WebCore/platform/TextureMapper.cmake (modified) (1 diff)
-
Source/WebCore/platform/graphics/ANGLEWebKitBridge.h (modified) (1 diff)
-
Source/WebCore/platform/graphics/GLContext.cpp (modified) (1 diff)
-
Source/WebCore/platform/graphics/GLContext.h (modified) (1 diff)
-
Source/WebCore/platform/graphics/GraphicsContext3D.h (modified) (4 diffs)
-
Source/WebCore/platform/graphics/OpenGLShims.cpp (modified) (1 diff)
-
Source/WebCore/platform/graphics/OpenGLShims.h (modified) (3 diffs)
-
Source/WebCore/platform/graphics/PlatformDisplay.cpp (modified) (1 diff)
-
Source/WebCore/platform/graphics/angle/GraphicsContext3DANGLE.cpp (modified) (3 diffs)
-
Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.cpp (added)
-
Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.h (copied) (copied from trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h ) (2 diffs)
-
Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp (modified) (3 diffs)
-
Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h (modified) (1 diff)
-
Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp (modified) (2 diffs)
-
Source/WebCore/platform/graphics/texmap/BitmapTextureGL.h (modified) (3 diffs)
-
Source/WebCore/platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp (modified) (8 diffs)
-
Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp (modified) (1 diff)
-
Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp (modified) (1 diff)
-
Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp (modified) (2 diffs)
-
Source/cmake/OptionsGTK.cmake (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r252682 r252717 1 2019-11-20 ChangSeok Oh <changseok@webkit.org> 2 3 [GTK] Add ANGLE backend to GTK port 4 https://bugs.webkit.org/show_bug.cgi?id=199060 5 6 Reviewed by Žan Doberšek. 7 8 This change brings ANGLE support for WebGL to GTK port. USE_ANGLE_WEBGL 9 is newly defined in OptionGTK.cmake, and turns on the USE_ANGLE_EGL flag. 10 11 * Source/cmake/OptionsGTK.cmake: USE_ANGLE_WEBGL added. 12 1 13 2019-11-19 Devin Rousso <drousso@apple.com> 2 14 -
trunk/Source/ThirdParty/ANGLE/CMakeLists.txt
r251037 r252717 137 137 endif () 138 138 139 if (USE_ANGLE_WEBGL) 140 WEBKIT_COPY_FILES(LibGLESv2EntryPointsHeaders 141 DESTINATION ${ANGLE_FRAMEWORK_HEADERS_DIR}/ANGLE 142 FILES ${libglesv2_entry_points_headers} 143 FLATTENED 144 ) 145 146 add_custom_command( 147 OUTPUT ${ANGLE_FRAMEWORK_HEADERS_DIR}/ANGLE/angle.timestamp 148 DEPENDS LibGLESv2EntryPointsHeaders ANGLEWebGLHeaders 149 COMMAND BUILT_PRODUCTS_DIR=${ANGLE_FRAMEWORK_HEADERS_DIR} 150 PUBLIC_HEADERS_FOLDER_PATH=ANGLE 151 ${CMAKE_CURRENT_SOURCE_DIR}/adjust-angle-include-paths.sh 152 VERBATIM 153 ) 154 add_custom_target(ANGLE-webgl-headers 155 DEPENDS ${ANGLE_FRAMEWORK_HEADERS_DIR}/ANGLE/angle.timestamp 156 ) 157 add_dependencies(ANGLEFramework ANGLE-webgl-headers) 158 endif () 159 139 160 if (COMPILER_IS_GCC_OR_CLANG) 140 161 WEBKIT_ADD_TARGET_CXX_FLAGS(ANGLE -Wno-cast-align -
trunk/Source/ThirdParty/ANGLE/ChangeLog
r252246 r252717 1 2019-11-20 ChangSeok Oh <changseok@webkit.org> 2 3 [GTK] Add ANGLE backend to GTK port 4 https://bugs.webkit.org/show_bug.cgi?id=199060 5 6 Reviewed by Žan Doberšek. 7 8 * CMakeLists.txt: When USE_ANGLE_WEBGL is enabled, necessary glesv2 entry points headers 9 are installed in the derived source directory. And then adjust-angle-include-path.sh is applied 10 to change include paths in the entry points header files. 11 * GLESv2.cmake: libglesv2_entry_points_headers is newly defined, which is a gathering of 12 entry point headers of libGLESv2. 13 * PlatformGTK.cmake: In this file, we append gl and glx related angle code as a build target. 14 Since we want gl context and gles context simultaneously, we remove gl prototype calls 15 from the generated libGLESv2 library. Instead, we invoke egl and gl calls of ANGLE 16 via their non-prototype function names. 17 * adjust-angle-include-paths.sh: sed is slightly different in unix and linux systems. 18 In particular, its inplace option needs to be changed for better compatibility on linux. 19 * include/CMakeLists.txt: ANGLE_WEBGL_HEADERS is newly defined. It gathers header files of ANGLE 20 for WebGL support. 21 1 22 2019-11-08 Dean Jackson <dino@apple.com> 2 23 -
trunk/Source/ThirdParty/ANGLE/GLESv2.cmake
r251037 r252717 1102 1102 ) 1103 1103 1104 set(libglesv2_entry_points_headers 1105 src/libGLESv2/entry_points_egl.h 1106 src/libGLESv2/entry_points_gles_2_0_autogen.h 1107 src/libGLESv2/entry_points_gles_3_0_autogen.h 1108 src/libGLESv2/entry_points_gles_ext_autogen.h 1109 ) 1110 1104 1111 set(libglesv1_cm_sources 1105 1112 src/libGLESv1_CM/libGLESv1_CM.cpp -
trunk/Source/ThirdParty/ANGLE/PlatformGTK.cmake
r250298 r252717 14 14 list(APPEND ANGLE_DEFINITIONS USE_SYSTEM_EGL) 15 15 endif () 16 17 if (USE_ANGLE_EGL) 18 list(APPEND ANGLE_SOURCES 19 ${angle_system_utils_sources_linux} 20 ${angle_system_utils_sources_posix} 21 ${libangle_gl_sources} 22 ${libangle_gl_glx_sources} 23 ) 24 25 list(APPEND ANGLE_DEFINITIONS 26 ANGLE_ENABLE_OPENGL 27 ANGLE_USE_X11 28 ) 29 30 list(APPEND ANGLEGLESv2_LIBRARIES 31 dl 32 pthread 33 X11 34 ) 35 36 string(REPLACE src/libGLESv2/libGLESv2_autogen.cpp "" libglesv2_sources "${libglesv2_sources}") 37 string(REPLACE src/libEGL/libEGL.cpp "" libegl_sources "${libegl_sources}") 38 endif () 39 -
trunk/Source/ThirdParty/ANGLE/adjust-angle-include-paths.sh
r249823 r252717 28 28 fi 29 29 30 if [ $(uname) == "Linux" ]; then 31 inplace_opt="-i" 32 else 33 inplace_opt="-i ''" 34 fi 35 30 36 for i in $output_dir/*.h ; do 31 37 if [ ! -f $output_dir/angle.timestamp ] || [ $i -nt $output_dir/angle.timestamp ] ; then … … 38 44 s/^#include [<"]export.h[>"]/#include <ANGLE\/export.h>/ 39 45 s/^#include "\(eglext_angle\|gl2ext_angle\|ShaderVars\).h"/#include <ANGLE\/\1.h>/ 40 ' -i ""$i46 ' $inplace_opt $i 41 47 echo Postprocessed ANGLE header3 $i 42 48 fi -
trunk/Source/ThirdParty/ANGLE/include/CMakeLists.txt
r245088 r252717 50 50 endif () 51 51 52 if (USE_ANGLE_WEBGL) 53 set(ANGLE_WEBGL_HEADERS 54 export.h 55 ${khr_headers} 56 ${egl_headers} 57 ${gles_headers} 58 ${gles2_headers} 59 ${gles3_headers} 60 ) 61 62 WEBKIT_COPY_FILES(ANGLEWebGLHeaders 63 DESTINATION ${ANGLE_FRAMEWORK_HEADERS_DIR}/ANGLE 64 FILES ${ANGLE_WEBGL_HEADERS} 65 FLATTENED 66 ) 67 endif () 68 52 69 # Cocoa expects headers in an ANGLE directory 53 70 WEBKIT_COPY_FILES(GLSLANGHeaders -
trunk/Source/WTF/ChangeLog
r252687 r252717 1 2019-11-20 ChangSeok Oh <changseok@webkit.org> 2 3 [GTK] Add ANGLE backend to GTK port 4 https://bugs.webkit.org/show_bug.cgi?id=199060 5 6 Reviewed by Žan Doberšek. 7 8 The GTK port uses TEXTURE_MAPPER that has a gl context for accelerated rendering, 9 and ANGLE has an egl context for WebGL. We want to make both live together 10 so an exception is made where TEXTURE_MAPPER is enabled. 11 12 * wtf/Platform.h: 13 1 14 2019-11-20 Fujii Hironori <Hironori.Fujii@sony.com> 2 15 -
trunk/Source/WTF/wtf/Platform.h
r252595 r252717 1147 1147 #endif 1148 1148 1149 #if (USE_ANGLE && (USE_OPENGL || USE_OPENGL_ES || (defined(USE_EGL) && USE_EGL))) 1149 #if (USE_ANGLE && (USE_OPENGL || USE_OPENGL_ES || (defined(USE_EGL) && USE_EGL))) && !USE(TEXTURE_MAPPER) 1150 1150 #error USE_ANGLE is incompatible with USE_OPENGL, USE_OPENGL_ES and USE_EGL 1151 1151 #endif -
trunk/Source/WebCore/ChangeLog
r252716 r252717 1 2019-11-20 ChangSeok Oh <changseok@webkit.org> 2 3 [GTK] Add ANGLE backend to GTK port 4 https://bugs.webkit.org/show_bug.cgi?id=199060 5 6 Reviewed by Žan Doberšek. 7 8 This change aims to bring ANGLE support for WebGL to GTK port. The port 9 wants to have a gl context for texture mapper and a gles/egl context for webgl 10 simultaneously, we adopt the readPixel-copyToTexture approach for now because 11 sharing textures between the two different contextes is not a feasible direction. 12 Also, to avoid conflicts between gl and gles calls, we use non-prototype functions 13 of ANGLE for WebGL context (i.e., GraphicsContext3D). Although many combinations 14 of graphic configurations exist, only default configuration (Nicosia layers 15 running on ANGLE + GLX is supported. Other combinations like ANGLE + GLES or WPE 16 will be covered by following patches. 17 18 No new tests since no functionality changed. 19 20 * Headers.cmake: 21 * PlatformGTK.cmake: 22 * SourcesGTK.txt: 23 * platform/TextureMapper.cmake: 24 * platform/graphics/ANGLEWebKitBridge.h: 25 * platform/graphics/GLContext.cpp: 26 * platform/graphics/GLContext.h: 27 * platform/graphics/GraphicsContext3D.h: 28 * platform/graphics/OpenGLShims.cpp: 29 (WebCore::initializeOpenGLShims): 30 * platform/graphics/OpenGLShims.h: 31 * platform/graphics/PlatformDisplay.cpp: 32 * platform/graphics/angle/GraphicsContext3DANGLE.cpp: 33 (WebCore::GraphicsContext3D::reshapeFBOs): 34 (WebCore::GraphicsContext3D::prepareTexture): 35 * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.cpp: Added. 36 (Nicosia::GC3DANGLELayer::ANGLEContext::errorString): 37 (Nicosia::GC3DANGLELayer::ANGLEContext::lastErrorString): 38 (Nicosia::GC3DANGLELayer::ANGLEContext::createContext): 39 (Nicosia::GC3DANGLELayer::ANGLEContext::ANGLEContext): 40 (Nicosia::GC3DANGLELayer::ANGLEContext::~ANGLEContext): 41 (Nicosia::GC3DANGLELayer::ANGLEContext::makeContextCurrent): 42 (Nicosia::GC3DANGLELayer::ANGLEContext::platformContext): 43 (Nicosia::GC3DANGLELayer::GC3DANGLELayer): 44 (Nicosia::GC3DANGLELayer::~GC3DANGLELayer): 45 (Nicosia::GC3DANGLELayer::makeContextCurrent): 46 (Nicosia::GC3DANGLELayer::platformContext): 47 * platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.h: Copied from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h. 48 * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp: 49 (Nicosia::GC3DLayer::GC3DLayer): 50 (Nicosia::GC3DLayer::swapBuffersIfNeeded): 51 * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h: 52 * platform/graphics/texmap/BitmapTextureGL.cpp: 53 (WebCore::BitmapTextureGL::setPendingContents): 54 (WebCore::BitmapTextureGL::updatePendingContents): 55 * platform/graphics/texmap/BitmapTextureGL.h: 56 * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: 57 (WebCore::GraphicsContext3D::create): 58 (WebCore::GraphicsContext3D::GraphicsContext3D): 59 (WebCore::GraphicsContext3D::~GraphicsContext3D): 60 * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: 61 (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper): 62 * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp: 63 (WebCore::TextureMapperPlatformLayerProxy::pushNextBuffer): 64 1 65 2019-11-20 Zalan Bujtas <zalan@apple.com> 2 66 -
trunk/Source/WebCore/Headers.cmake
r252393 r252717 1122 1122 platform/graphics/WindRule.h 1123 1123 1124 platform/graphics/angle/Extensions3DANGLE.h 1125 1124 1126 platform/graphics/cv/ImageTransferSessionVT.h 1125 1127 -
trunk/Source/WebCore/PlatformGTK.cmake
r251650 r252717 36 36 "${WEBCORE_DIR}/platform/text/gtk" 37 37 ) 38 39 if (USE_ANGLE_WEBGL) 40 list(APPEND WebCore_PRIVATE_INCLUDE_DIRECTORIES 41 "${WEBCORE_DIR}/platform/graphics/angle" 42 ) 43 endif () 38 44 39 45 if (USE_WPE_RENDERER) … … 118 124 endif () 119 125 120 if (USE_OPENGL _ES)126 if (USE_OPENGL) 121 127 list(APPEND WebCore_SOURCES 122 platform/graphics/opengl/Extensions3DOpenGLES.cpp 123 platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp 128 platform/graphics/OpenGLShims.cpp 124 129 ) 125 130 endif () 126 131 127 if (USE_ OPENGL)132 if (USE_ANGLE_WEBGL) 128 133 list(APPEND WebCore_SOURCES 129 platform/graphics/OpenGLShims.cpp 134 platform/graphics/angle/Extensions3DANGLE.cpp 135 platform/graphics/angle/GraphicsContext3DANGLE.cpp 136 platform/graphics/angle/TemporaryANGLESetting.cpp 137 ) 138 else () 139 list(APPEND WebCore_SOURCES 140 platform/graphics/opengl/Extensions3DOpenGLCommon.cpp 141 platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp 142 platform/graphics/opengl/TemporaryOpenGLSetting.cpp 143 ) 130 144 131 platform/graphics/opengl/Extensions3DOpenGL.cpp 132 platform/graphics/opengl/GraphicsContext3DOpenGL.cpp 133 ) 145 if (USE_OPENGL_ES) 146 list(APPEND WebCore_SOURCES 147 platform/graphics/opengl/Extensions3DOpenGLES.cpp 148 platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp 149 ) 150 endif () 151 152 if (USE_OPENGL) 153 list(APPEND WebCore_SOURCES 154 platform/graphics/opengl/Extensions3DOpenGL.cpp 155 platform/graphics/opengl/GraphicsContext3DOpenGL.cpp 156 ) 157 endif () 134 158 endif () 135 159 -
trunk/Source/WebCore/SourcesGTK.txt
r250596 r252717 93 93 platform/graphics/libwpe/PlatformDisplayLibWPE.cpp 94 94 95 platform/graphics/opengl/Extensions3DOpenGLCommon.cpp96 platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp97 platform/graphics/opengl/TemporaryOpenGLSetting.cpp98 99 95 platform/graphics/opentype/OpenTypeVerticalData.cpp 100 96 -
trunk/Source/WebCore/platform/TextureMapper.cmake
r248769 r252717 116 116 ) 117 117 endif () 118 119 if (USE_ANGLE_WEBGL) 120 list(APPEND WebCore_SOURCES 121 platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.cpp 122 ) 123 endif () -
trunk/Source/WebCore/platform/graphics/ANGLEWebKitBridge.h
r247841 r252717 37 37 #include <wtf/text/WTFString.h> 38 38 39 #if PLATFORM(COCOA) 39 #if USE(ANGLE) 40 #include <ANGLE/gl2.h> 40 41 42 #elif PLATFORM(COCOA) 41 43 #if USE(OPENGL_ES) 42 44 #import <OpenGLES/ES2/glext.h> 43 45 #elif USE(OPENGL) 44 46 #include <OpenGL/gl.h> 45 #elif USE(ANGLE)46 #include <ANGLE/gl2.h>47 47 #else 48 48 #error Unsupported configuration -
trunk/Source/WebCore/platform/graphics/GLContext.cpp
r249909 r252717 25 25 #if USE(EGL) 26 26 #include "GLContextEGL.h" 27 #endif28 29 #if USE(LIBEPOXY)30 #include <epoxy/gl.h>31 #elif USE(OPENGL_ES)32 #include <GLES2/gl2.h>33 27 #endif 34 28 -
trunk/Source/WebCore/platform/graphics/GLContext.h
r249909 r252717 21 21 #define GLContext_h 22 22 23 #include "ANGLEWebKitBridge.h"24 23 #include "IntSize.h" 25 24 #include "PlatformDisplay.h" 26 25 #include <wtf/Noncopyable.h> 26 27 #if USE(LIBEPOXY) 28 #include <epoxy/gl.h> 29 #elif USE(OPENGL_ES) 30 #include <GLES2/gl2.h> 31 #endif 27 32 28 33 #if USE(EGL) && !PLATFORM(GTK) -
trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h
r252245 r252717 102 102 namespace WebCore { 103 103 class Extensions3D; 104 #if !PLATFORM(COCOA) && USE(OPENGL_ES) 104 #if USE(ANGLE) 105 class Extensions3DANGLE; 106 #elif !PLATFORM(COCOA) && USE(OPENGL_ES) 105 107 class Extensions3DOpenGLES; 106 108 #elif USE(OPENGL) || (PLATFORM(COCOA) && USE(OPENGL_ES)) 107 109 class Extensions3DOpenGL; 108 #elif USE(ANGLE)109 class Extensions3DANGLE;110 110 #endif 111 111 class HostWindow; … … 1457 1457 #endif // !USE(ANGLE) 1458 1458 1459 #if !PLATFORM(COCOA) && USE(OPENGL_ES) 1459 #if USE(ANGLE) 1460 friend class Extensions3DANGLE; 1461 std::unique_ptr<Extensions3DANGLE> m_extensions; 1462 #elif !PLATFORM(COCOA) && USE(OPENGL_ES) 1460 1463 friend class Extensions3DOpenGLES; 1461 1464 friend class Extensions3DOpenGLCommon; … … 1465 1468 friend class Extensions3DOpenGLCommon; 1466 1469 std::unique_ptr<Extensions3DOpenGL> m_extensions; 1467 #elif USE(ANGLE)1468 friend class Extensions3DANGLE;1469 std::unique_ptr<Extensions3DANGLE> m_extensions;1470 1470 #endif 1471 1471 … … 1493 1493 GC3Duint m_internalColorFormat { 0 }; 1494 1494 1495 #if USE(ANGLE) 1495 #if USE(ANGLE) && PLATFORM(COCOA) 1496 1496 PlatformGraphicsContext3DSurface m_pbuffer; 1497 1497 #endif -
trunk/Source/WebCore/platform/graphics/OpenGLShims.cpp
r208997 r252717 163 163 ASSIGN_FUNCTION_TABLE_ENTRY(glGetShaderiv, success); 164 164 ASSIGN_FUNCTION_TABLE_ENTRY(glGetShaderSource, success); 165 ASSIGN_FUNCTION_TABLE_ENTRY(glGetString, success); 165 166 // glGetStringi is only available on OpenGL or GLES versions >= 3.0. 166 167 // Add it with _EXT so it doesn't cause an initialization failure on lower versions. -
trunk/Source/WebCore/platform/graphics/OpenGLShims.h
r247841 r252717 99 99 typedef void (GLAPIENTRY *glGetShaderivType) (GLuint, GLenum, GLint*); 100 100 typedef void (GLAPIENTRY *glGetShaderSourceType) (GLuint, GLsizei, GLsizei*, char*); 101 typedef const GLubyte* (GLAPIENTRY *glGetStringType) (GLenum); 101 102 typedef const GLubyte* (GLAPIENTRY *glGetStringiType) (GLenum, GLuint); 102 103 typedef GLint (GLAPIENTRY *glGetUniformLocationType) (GLuint, const char*); … … 206 207 FUNCTION_TABLE_ENTRY(glGetShaderiv); 207 208 FUNCTION_TABLE_ENTRY(glGetShaderSource); 209 FUNCTION_TABLE_ENTRY(glGetString); 208 210 FUNCTION_TABLE_ENTRY(glGetStringi); 209 211 FUNCTION_TABLE_ENTRY(glGetUniformfv); … … 334 336 #define glGetShaderiv LOOKUP_GL_FUNCTION(glGetShaderiv) 335 337 #define glGetShaderSource LOOKUP_GL_FUNCTION(glGetShaderSource) 338 #define glGetString LOOKUP_GL_FUNCTION(glGetString) 336 339 #define glGetStringi LOOKUP_GL_FUNCTION(glGetStringi) 337 340 #define glGetUniformfv LOOKUP_GL_FUNCTION(glGetUniformfv) -
trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp
r251122 r252717 53 53 #if PLATFORM(GTK) && PLATFORM(X11) 54 54 #include <gdk/gdkx.h> 55 #if defined(None) 56 #undef None 57 #endif 55 58 #endif 56 59 -
trunk/Source/WebCore/platform/graphics/angle/GraphicsContext3DANGLE.cpp
r252245 r252717 69 69 // would need more work to be included from WebCore. 70 70 #define GL_MAX_SAMPLES_EXT 0x8D57 71 72 #if USE(COORDINATED_GRAPHICS) && USE(TEXTURE_MAPPER) 73 #define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 74 #define GL_FRAMEBUFFER_EXT 0x8D40 75 #endif 71 76 72 77 namespace WebCore { … … 192 197 updateFramebufferTextureBackingStoreFromLayer(); 193 198 gl::FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_RECTANGLE_ANGLE, m_texture, 0); 199 #elif PLATFORM(GTK) 200 gl::BindTexture(GL_TEXTURE_RECTANGLE_ANGLE, m_texture); 201 gl::TexImage2D(GL_TEXTURE_RECTANGLE_ANGLE, 0, m_internalColorFormat, width, height, 0, colorFormat, GL_UNSIGNED_BYTE, 0); 202 gl::FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_RECTANGLE_ANGLE, m_texture, 0); 203 if (m_compositorTexture) { 204 gl::BindTexture(GL_TEXTURE_RECTANGLE_ANGLE, m_compositorTexture); 205 gl::TexImage2D(GL_TEXTURE_RECTANGLE_ANGLE, 0, m_internalColorFormat, width, height, 0, colorFormat, GL_UNSIGNED_BYTE, 0); 206 gl::BindTexture(GL_TEXTURE_RECTANGLE_ANGLE, 0); 207 gl::BindTexture(GL_TEXTURE_RECTANGLE_ANGLE, m_intermediateTexture); 208 gl::TexImage2D(GL_TEXTURE_RECTANGLE_ANGLE, 0, m_internalColorFormat, width, height, 0, colorFormat, GL_UNSIGNED_BYTE, 0); 209 gl::BindTexture(GL_TEXTURE_RECTANGLE_ANGLE, 0); 210 } 194 211 #else 195 212 #error FIXME: Port to non-Cocoa platforms. … … 477 494 resolveMultisamplingIfNecessary(); 478 495 496 #if USE(COORDINATED_GRAPHICS) 497 std::swap(m_texture, m_compositorTexture); 498 std::swap(m_texture, m_intermediateTexture); 499 gl::BindFramebuffer(GL_FRAMEBUFFER, m_fbo); 500 gl::FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_RECTANGLE_ANGLE, m_texture, 0); 479 501 gl::Flush(); 502 503 if (m_state.boundFBO != m_fbo) 504 gl::BindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_state.boundFBO); 505 else 506 gl::BindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_fbo); 507 #else 508 gl::Flush(); 509 #endif 480 510 } 481 511 -
trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.h
r252716 r252717 1 1 /* 2 2 * Copyright (C) 2018 Metrological Group B.V. 3 * Copyright (C) 2018 Igalia S.L.3 * Copyright (C) 2018, 2019 Igalia S.L. 4 4 * 5 5 * Redistribution and use in source and binary forms, with or without … … 31 31 #if USE(NICOSIA) && USE(TEXTURE_MAPPER) 32 32 33 #include "GLContext.h" 33 34 #include "GraphicsContext3D.h" 34 #include "Nicosia ContentLayerTextureMapperImpl.h"35 #include "NicosiaGC3DLayer.h" 35 36 #include <memory> 36 37 38 typedef void *EGLConfig; 39 typedef void *EGLContext; 40 typedef void *EGLDisplay; 41 typedef void *EGLSurface; 42 37 43 namespace WebCore { 44 class IntSize; 38 45 class GLContext; 46 class PlatformDisplay; 39 47 } 40 48 41 49 namespace Nicosia { 42 50 43 class GC3D Layer : public ContentLayerTextureMapperImpl::Client{51 class GC3DANGLELayer final : public GC3DLayer { 44 52 WTF_MAKE_FAST_ALLOCATED; 45 53 public: 46 GC3DLayer(WebCore::GraphicsContext3D&, WebCore::GraphicsContext3D::RenderStyle); 47 virtual ~GC3DLayer(); 54 class ANGLEContext { 55 WTF_MAKE_NONCOPYABLE(ANGLEContext); 56 public: 57 static const char* errorString(int statusCode); 58 static const char* lastErrorString(); 48 59 49 ContentLayer& contentLayer() const { return m_contentLayer; } 50 bool makeContextCurrent(); 51 PlatformGraphicsContext3D platformContext(); 60 static std::unique_ptr<ANGLEContext> createContext(); 61 virtual ~ANGLEContext(); 52 62 53 void swapBuffersIfNeeded() override; 63 bool makeContextCurrent(); 64 #if ENABLE(GRAPHICS_CONTEXT_3D) 65 PlatformGraphicsContext3D platformContext(); 66 #endif 67 68 private: 69 ANGLEContext(EGLDisplay, EGLContext, EGLSurface); 70 71 EGLDisplay m_display { nullptr }; 72 EGLContext m_context { nullptr }; 73 EGLSurface m_surface { nullptr }; 74 }; 75 76 GC3DANGLELayer(WebCore::GraphicsContext3D&, WebCore::GraphicsContext3D::RenderStyle); 77 virtual ~GC3DANGLELayer(); 78 79 bool makeContextCurrent() override; 80 PlatformGraphicsContext3D platformContext() override; 54 81 55 82 private: 56 WebCore::GraphicsContext3D& m_context; 57 std::unique_ptr<WebCore::GLContext> m_glContext; 58 59 Ref<ContentLayer> m_contentLayer; 83 std::unique_ptr<ANGLEContext> m_angleContext; 60 84 }; 61 85 -
trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp
r248846 r252717 38 38 #endif 39 39 40 #if USE(ANGLE) 41 #include "ImageBuffer.h" 42 #endif 43 40 44 #include "GLContext.h" 41 45 … … 43 47 44 48 using namespace WebCore; 49 50 GC3DLayer::GC3DLayer(GraphicsContext3D& context) 51 : m_context(context) 52 , m_contentLayer(Nicosia::ContentLayer::create(Nicosia::ContentLayerTextureMapperImpl::createFactory(*this))) 53 { 54 } 45 55 46 56 GC3DLayer::GC3DLayer(GraphicsContext3D& context, GraphicsContext3D::RenderStyle renderStyle) … … 83 93 m_context.prepareTexture(); 84 94 IntSize textureSize(m_context.m_currentWidth, m_context.m_currentHeight); 85 TextureMapperGL::Flags flags = TextureMapperGL::ShouldFlipTexture | (m_context.m_attrs.alpha ? TextureMapperGL::ShouldBlend : 0); 95 TextureMapperGL::Flags flags = m_context.m_attrs.alpha ? TextureMapperGL::ShouldBlend : 0; 96 #if USE(ANGLE) 97 std::unique_ptr<ImageBuffer> imageBuffer = ImageBuffer::create(textureSize, Unaccelerated); 98 if (!imageBuffer) 99 return; 100 101 m_context.paintRenderingResultsToCanvas(imageBuffer.get()); 102 RefPtr<Image> image = imageBuffer->copyImage(DontCopyBackingStore); 103 if (!image) 104 return; 105 #else 106 flags |= TextureMapperGL::ShouldFlipTexture; 107 #endif 86 108 87 109 { 88 110 auto& proxy = downcast<Nicosia::ContentLayerTextureMapperImpl>(m_contentLayer->impl()).proxy(); 111 #if USE(ANGLE) 112 std::unique_ptr<TextureMapperPlatformLayerBuffer> layerBuffer; 113 layerBuffer = proxy.getAvailableBuffer(textureSize, m_context.m_internalColorFormat); 114 if (!layerBuffer) { 115 auto texture = BitmapTextureGL::create(TextureMapperContextAttributes::get(), m_context.m_internalColorFormat); 116 static_cast<BitmapTextureGL&>(texture.get()).setPendingContents(WTFMove(image)); 117 layerBuffer = makeUnique<TextureMapperPlatformLayerBuffer>(WTFMove(texture), flags); 118 } else 119 layerBuffer->textureGL().setPendingContents(WTFMove(image)); 89 120 90 121 LockHolder holder(proxy.lock()); 122 proxy.pushNextBuffer(WTFMove(layerBuffer)); 123 #else 124 LockHolder holder(proxy.lock()); 91 125 proxy.pushNextBuffer(makeUnique<TextureMapperPlatformLayerBuffer>(m_context.m_compositorTexture, textureSize, flags, m_context.m_internalColorFormat)); 126 #endif 92 127 } 93 128 -
trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h
r248762 r252717 44 44 WTF_MAKE_FAST_ALLOCATED; 45 45 public: 46 explicit GC3DLayer(WebCore::GraphicsContext3D&); 46 47 GC3DLayer(WebCore::GraphicsContext3D&, WebCore::GraphicsContext3D::RenderStyle); 48 47 49 virtual ~GC3DLayer(); 48 50 49 51 ContentLayer& contentLayer() const { return m_contentLayer; } 50 bool makeContextCurrent();51 PlatformGraphicsContext3D platformContext();52 virtual bool makeContextCurrent(); 53 virtual PlatformGraphicsContext3D platformContext(); 52 54 53 55 void swapBuffersIfNeeded() override; -
trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp
r249110 r252717 27 27 #include "Extensions3D.h" 28 28 #include "FilterOperations.h" 29 #include "Image.h"30 29 #include "LengthFunctions.h" 31 30 #include "NativeImage.h" … … 169 168 updateContents(imageData, targetRect, offset, bytesPerLine); 170 169 } 170 171 #if USE(ANGLE) 172 void BitmapTextureGL::setPendingContents(RefPtr<Image>&& image) 173 { 174 m_pendingContents = image; 175 } 176 177 void BitmapTextureGL::updatePendingContents(const IntRect& targetRect, const IntPoint& offset) 178 { 179 if (!m_pendingContents) 180 return; 181 182 if (!isValid()) { 183 IntSize textureSize(m_pendingContents->size()); 184 reset(textureSize); 185 } 186 updateContents(m_pendingContents.get(), targetRect, offset); 187 } 188 #endif 171 189 172 190 static unsigned getPassesRequiredForFilter(FilterOperation::OperationType type) -
trunk/Source/WebCore/platform/graphics/texmap/BitmapTextureGL.h
r229895 r252717 27 27 #include "ClipStack.h" 28 28 #include "FilterOperation.h" 29 #include "Image.h" 29 30 #include "IntSize.h" 30 31 #include "TextureMapperContextAttributes.h" … … 78 79 79 80 void copyFromExternalTexture(GLuint textureID); 81 #if USE(ANGLE) 82 void setPendingContents(RefPtr<Image>&&); 83 void updatePendingContents(const IntRect& targetRect, const IntPoint& offset); 84 #endif 80 85 81 86 TextureMapperGL::Flags colorConvertFlags() const { return m_colorConvertFlags; } … … 94 99 TextureMapperContextAttributes m_contextAttributes; 95 100 TextureMapperGL::Flags m_colorConvertFlags { TextureMapperGL::NoFlag }; 101 102 #if USE(ANGLE) 103 RefPtr<Image> m_pendingContents { nullptr }; 104 #endif 96 105 97 106 void clearIfNeeded(); -
trunk/Source/WebCore/platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp
r248846 r252717 38 38 #include <ANGLE/ShaderLang.h> 39 39 40 #if USE(LIBEPOXY) 40 #if USE(ANGLE) 41 #define EGL_EGL_PROTOTYPES 0 42 // Skip the inclusion of ANGLE's explicit context entry points for now. 43 #define GL_ANGLE_explicit_context 44 #define GL_ANGLE_explicit_context_gles1 45 typedef void* GLeglContext; 46 #include <ANGLE/egl.h> 47 #include <ANGLE/eglext.h> 48 #include <ANGLE/eglext_angle.h> 49 #include <ANGLE/entry_points_egl.h> 50 #include <ANGLE/entry_points_gles_2_0_autogen.h> 51 #include <ANGLE/entry_points_gles_ext_autogen.h> 52 #include <ANGLE/gl2ext.h> 53 #include <ANGLE/gl2ext_angle.h> 54 #if defined(Above) 55 #undef Above 56 #endif 57 #if defined(Below) 58 #undef Below 59 #endif 60 #if defined(None) 61 #undef None 62 #endif 63 #elif USE(LIBEPOXY) 41 64 #include <epoxy/gl.h> 42 65 #elif !USE(OPENGL_ES) … … 44 67 #endif 45 68 46 #if USE(OPENGL_ES) 69 #if USE(ANGLE) 70 #include "Extensions3DANGLE.h" 71 #elif USE(OPENGL_ES) 47 72 #include "Extensions3DOpenGLES.h" 48 73 #else … … 51 76 52 77 #if USE(NICOSIA) 78 #if USE(ANGLE) 79 #include "NicosiaGC3DANGLELayer.h" 80 #else 53 81 #include "NicosiaGC3DLayer.h" 82 #endif 54 83 #endif 55 84 … … 72 101 static bool success = true; 73 102 if (!initialized) { 74 #if !USE(OPENGL_ES) && !USE(LIBEPOXY) 103 #if !USE(OPENGL_ES) && !USE(LIBEPOXY) && !USE(ANGLE) 75 104 success = initializeOpenGLShims(); 76 105 #endif … … 102 131 } 103 132 133 #if USE(ANGLE) 134 GraphicsContext3D::GraphicsContext3D(GraphicsContext3DAttributes attributes, HostWindow*, GraphicsContext3D::RenderStyle renderStyle, GraphicsContext3D* sharedContext) 135 : m_attrs(attributes) 136 { 137 ASSERT_UNUSED(sharedContext, !sharedContext); 138 #if USE(NICOSIA) 139 m_nicosiaLayer = WTF::makeUnique<Nicosia::GC3DANGLELayer>(*this, renderStyle); 140 #else 141 m_texmapLayer = WTF::makeUnique<TextureMapperGC3DPlatformLayer>(*this, renderStyle); 142 #endif 143 makeContextCurrent(); 144 145 146 validateAttributes(); 147 148 if (renderStyle == RenderOffscreen) { 149 // Create a texture to render into. 150 gl::GenTextures(1, &m_texture); 151 gl::BindTexture(GL_TEXTURE_RECTANGLE_ANGLE, m_texture); 152 gl::TexParameterf(GL_TEXTURE_RECTANGLE_ANGLE, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 153 gl::TexParameterf(GL_TEXTURE_RECTANGLE_ANGLE, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 154 gl::TexParameteri(GL_TEXTURE_RECTANGLE_ANGLE, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 155 gl::TexParameteri(GL_TEXTURE_RECTANGLE_ANGLE, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 156 gl::BindTexture(GL_TEXTURE_RECTANGLE_ANGLE, 0); 157 158 // Create an FBO. 159 gl::GenFramebuffers(1, &m_fbo); 160 gl::BindFramebuffer(GL_FRAMEBUFFER, m_fbo); 161 162 #if USE(COORDINATED_GRAPHICS) 163 gl::GenTextures(1, &m_compositorTexture); 164 gl::BindTexture(GL_TEXTURE_RECTANGLE_ANGLE, m_compositorTexture); 165 gl::TexParameterf(GL_TEXTURE_RECTANGLE_ANGLE, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 166 gl::TexParameterf(GL_TEXTURE_RECTANGLE_ANGLE, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 167 gl::TexParameteri(GL_TEXTURE_RECTANGLE_ANGLE, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 168 gl::TexParameteri(GL_TEXTURE_RECTANGLE_ANGLE, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 169 170 gl::GenTextures(1, &m_intermediateTexture); 171 gl::BindTexture(GL_TEXTURE_RECTANGLE_ANGLE, m_intermediateTexture); 172 gl::TexParameterf(GL_TEXTURE_RECTANGLE_ANGLE, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 173 gl::TexParameterf(GL_TEXTURE_RECTANGLE_ANGLE, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 174 gl::TexParameteri(GL_TEXTURE_RECTANGLE_ANGLE, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 175 gl::TexParameteri(GL_TEXTURE_RECTANGLE_ANGLE, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 176 177 gl::BindTexture(GL_TEXTURE_RECTANGLE_ANGLE, 0); 178 #endif 179 180 // Create a multisample FBO. 181 if (m_attrs.antialias) { 182 gl::GenFramebuffers(1, &m_multisampleFBO); 183 gl::BindFramebuffer(GL_FRAMEBUFFER, m_multisampleFBO); 184 m_state.boundFBO = m_multisampleFBO; 185 gl::GenRenderbuffers(1, &m_multisampleColorBuffer); 186 if (m_attrs.stencil || m_attrs.depth) 187 gl::GenRenderbuffers(1, &m_multisampleDepthStencilBuffer); 188 } else { 189 // Bind canvas FBO. 190 gl::BindFramebuffer(GL_FRAMEBUFFER, m_fbo); 191 m_state.boundFBO = m_fbo; 192 #if USE(OPENGL_ES) 193 if (m_attrs.depth) 194 gl::GenRenderbuffers(1, &m_depthBuffer); 195 if (m_attrs.stencil) 196 gl::GenRenderbuffers(1, &m_stencilBuffer); 197 #endif 198 if (m_attrs.stencil || m_attrs.depth) 199 gl::GenRenderbuffers(1, &m_depthStencilBuffer); 200 } 201 } 202 203 gl::ClearColor(0, 0, 0, 0); 204 } 205 #else 104 206 GraphicsContext3D::GraphicsContext3D(GraphicsContext3DAttributes attributes, HostWindow*, GraphicsContext3D::RenderStyle renderStyle, GraphicsContext3D* sharedContext) 105 207 : m_attrs(attributes) … … 226 328 ::glClearColor(0, 0, 0, 0); 227 329 } 228 330 #endif 331 332 #if USE(ANGLE) 333 GraphicsContext3D::~GraphicsContext3D() 334 { 335 makeContextCurrent(); 336 if (m_texture) 337 gl::DeleteTextures(1, &m_texture); 338 #if USE(COORDINATED_GRAPHICS) 339 if (m_compositorTexture) 340 gl::DeleteTextures(1, &m_compositorTexture); 341 #endif 342 343 if (m_attrs.antialias) { 344 gl::DeleteRenderbuffers(1, &m_multisampleColorBuffer); 345 if (m_attrs.stencil || m_attrs.depth) 346 gl::DeleteRenderbuffers(1, &m_multisampleDepthStencilBuffer); 347 gl::DeleteFramebuffers(1, &m_multisampleFBO); 348 } else if (m_attrs.stencil || m_attrs.depth) { 349 #if USE(OPENGL_ES) 350 if (m_depthBuffer) 351 glDeleteRenderbuffers(1, &m_depthBuffer); 352 353 if (m_stencilBuffer) 354 glDeleteRenderbuffers(1, &m_stencilBuffer); 355 #endif 356 if (m_depthStencilBuffer) 357 gl::DeleteRenderbuffers(1, &m_depthStencilBuffer); 358 } 359 gl::DeleteFramebuffers(1, &m_fbo); 360 #if USE(COORDINATED_GRAPHICS) 361 gl::DeleteTextures(1, &m_intermediateTexture); 362 #endif 363 364 #if USE(CAIRO) 365 if (m_vao) 366 deleteVertexArray(m_vao); 367 #endif 368 369 auto* activeContext = activeContexts().takeLast([this](auto* it) { 370 return it == this; 371 }); 372 ASSERT_UNUSED(activeContext, !!activeContext); 373 } 374 #else 229 375 GraphicsContext3D::~GraphicsContext3D() 230 376 { … … 263 409 #endif 264 410 265 auto* activeContext = activeContexts().takeLast([this](auto* it) { return it == this; }); 411 auto* activeContext = activeContexts().takeLast([this](auto* it) { 412 return it == this; 413 }); 266 414 ASSERT_UNUSED(activeContext, !!activeContext); 267 415 } 416 #endif // USE(ANGLE) 268 417 269 418 void GraphicsContext3D::setContextLostCallback(std::unique_ptr<ContextLostCallback>) … … 320 469 } 321 470 322 #if PLATFORM(GTK) 471 #if PLATFORM(GTK) && !USE(ANGLE) 323 472 Extensions3D& GraphicsContext3D::getExtensions() 324 473 { -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp
r249474 r252717 98 98 ASSERT(m_texture); 99 99 BitmapTextureGL* textureGL = static_cast<BitmapTextureGL*>(m_texture.get()); 100 #if USE(ANGLE) 101 textureGL->updatePendingContents(IntRect(IntPoint(), textureGL->contentSize()), IntPoint()); 102 #endif 100 103 texmapGL.drawTexture(textureGL->id(), m_extraFlags | textureGL->colorConvertFlags(), textureGL->size(), targetRect, modelViewMatrix, opacity); 101 104 return; -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp
r248846 r252717 114 114 { 115 115 ASSERT(m_lock.isHeld()); 116 #if USE(ANGLE) 117 // When the newBuffer overwrites m_pendingBuffer that is not swapped yet, 118 // the layer related to m_pendingBuffer is flickering since its texture is destroyed. 119 if (m_pendingBuffer && m_pendingBuffer->hasManagedTexture()) 120 return; 121 #endif 116 122 m_pendingBuffer = WTFMove(newBuffer); 117 123 m_wasBufferDropped = false; -
trunk/Source/WebKit/ChangeLog
r252712 r252717 1 2019-11-20 ChangSeok Oh <changseok@webkit.org> 2 3 [GTK] Add ANGLE backend to GTK port 4 https://bugs.webkit.org/show_bug.cgi?id=199060 5 6 Reviewed by Žan Doberšek. 7 8 * UIProcess/API/glib/WebKitProtocolHandler.cpp: Extention3DANGLE is used instead 9 where ANGLE for WebGL is enabled. 10 * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: Append gl extensions for ANGLE. 11 (WebKit::AcceleratedBackingStoreWayland::checkRequirements): 12 1 13 2019-11-20 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp
r250898 r252717 65 65 #if USE(GLX) 66 66 #include <GL/glx.h> 67 #include <WebCore/OpenGLShims.h> 67 68 #endif 68 69 -
trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp
r249947 r252717 39 39 #include <WebCore/GLContext.h> 40 40 41 #if USE(OPENGL_ES) 41 #if USE(ANGLE) 42 #include <WebCore/Extensions3DANGLE.h> 43 #include <WebCore/OpenGLShims.h> 44 #elif USE(OPENGL_ES) 42 45 #include <GLES2/gl2.h> 43 46 #include <GLES2/gl2ext.h> … … 79 82 return false; 80 83 81 #if USE(OPENGL_ES) 84 #if USE(ANGLE) 85 std::unique_ptr<Extensions3DANGLE> glExtensions = makeUnique<Extensions3DANGLE>(nullptr, GLContext::current()->version() >= 320); 86 #elif USE(OPENGL_ES) 82 87 std::unique_ptr<Extensions3DOpenGLES> glExtensions = makeUnique<Extensions3DOpenGLES>(nullptr, false); 83 88 #else -
trunk/Source/cmake/OptionsGTK.cmake
r252366 r252717 91 91 # Private options specific to the GTK port. Changing these options is 92 92 # completely unsupported. They are intended for use only by WebKit developers. 93 WEBKIT_OPTION_DEFINE(USE_ANGLE_WEBGL "Whether to use ANGLE as WebGL backend." PRIVATE OFF) 93 94 WEBKIT_OPTION_DEFINE(USE_OPENVR "Whether to use OpenVR as WebVR backend." PRIVATE OFF) 94 95 … … 101 102 WEBKIT_OPTION_DEPEND(ENABLE_GLES2 ENABLE_OPENGL) 102 103 WEBKIT_OPTION_DEPEND(ENABLE_WEBGL ENABLE_OPENGL) 104 WEBKIT_OPTION_DEPEND(USE_ANGLE_WEBGL ENABLE_WEBGL) 103 105 WEBKIT_OPTION_DEPEND(USE_WPE_RENDERER ENABLE_OPENGL) 104 106 WEBKIT_OPTION_DEPEND(USE_WPE_RENDERER ENABLE_WAYLAND_TARGET) … … 307 309 endif () 308 310 311 if (USE_ANGLE_WEBGL) 312 SET_AND_EXPOSE_TO_BUILD(USE_ANGLE TRUE) 313 SET_AND_EXPOSE_TO_BUILD(USE_ANGLE_EGL TRUE) 314 endif () 315 309 316 if (ENABLE_SPELLCHECK) 310 317 find_package(Enchant)
Note:
See TracChangeset
for help on using the changeset viewer.