Changeset 286978 in webkit
- Timestamp:
- Dec 13, 2021, 1:16:28 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
-
ThirdParty/ANGLE/ChangeLog (modified) (1 diff)
-
ThirdParty/ANGLE/PlatformGTK.cmake (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/graphics/GLContext.cpp (modified) (1 diff)
-
WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h (modified) (2 diffs)
-
WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp (modified) (1 diff)
-
WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/ThirdParty/ANGLE/ChangeLog
r286964 r286978 1 2021-12-13 Alejandro G. Castro <alex@igalia.com> 2 3 [GTK] Fix ANGLE compilation 4 https://bugs.webkit.org/show_bug.cgi?id=233327 5 6 Reviewed by Kenneth Russell. 7 8 There is a define with a typo in the name and activating EGL and 9 X11 does not work at the same time. 10 11 * PlatformGTK.cmake: 12 1 13 2021-12-13 Kyle Piddington <kpiddington@apple.com> 2 14 -
trunk/Source/ThirdParty/ANGLE/PlatformGTK.cmake
r278130 r286978 49 49 endif () 50 50 51 if (ENABLE_WAYLAND_TARGET)52 list(APPEND GKT_ANGLE_DEFINITIONS WL_EGL_PLATFORM)53 endif ()54 55 51 # Allow building ANGLE on platforms which may not provide X11 headers. 56 52 if (NOT GTK_ANGLE_DEFINITIONS) -
trunk/Source/WebCore/ChangeLog
r286972 r286978 1 2021-12-13 Alejandro G. Castro <alex@igalia.com> 2 3 [GTK] Fix ANGLE compilation 4 https://bugs.webkit.org/show_bug.cgi?id=233327 5 6 Reviewed by Kenneth Russell. 7 8 No tests required. 9 10 Fixed the issues to make the engine work with -DUSE_ANGLE_WEBGL=ON 11 defined. 12 13 * platform/graphics/GLContext.cpp: 14 (WebCore::initializeOpenGLShimsIfNeeded): In case of GTK and WPE 15 initially we are going to keep TextureMapper using system GL 16 libraries, even when we are using ANGLE for WebGL, so we need the 17 shims definitions. 18 * platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp: 19 (Nicosia::GCGLLayer::swapBuffersIfNeeded): We need to allocate and 20 update the layer buffer in the compositor thread to make sure it 21 is handled in just one thread. 22 1 23 2021-12-13 Antti Koivisto <antti@apple.com> 2 24 -
trunk/Source/WebCore/platform/graphics/GLContext.cpp
r284857 r286978 59 59 static bool initializeOpenGLShimsIfNeeded() 60 60 { 61 #if USE(OPENGL_ES) || USE(LIBEPOXY) || USE(ANGLE)61 #if USE(OPENGL_ES) || USE(LIBEPOXY) || (USE(ANGLE) && !(PLATFORM(GTK) || PLATFORM(WPE))) 62 62 return true; 63 63 #else -
trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h
r286838 r286978 43 43 #if USE(NICOSIA) 44 44 namespace Nicosia { 45 class GCGLANGLELayer; 45 46 class GCGLLayer; 46 47 } … … 446 447 #endif 447 448 #if USE(NICOSIA) 448 std::unique_ptr<Nicosia::GCGL Layer> m_nicosiaLayer;449 std::unique_ptr<Nicosia::GCGLANGLELayer> m_nicosiaLayer; 449 450 #elif USE(TEXTURE_MAPPER) 450 451 std::unique_ptr<TextureMapperGCGLPlatformLayer> m_texmapLayer; -
trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp
r286293 r286978 145 145 { 146 146 if (m_context) { 147 gl::BindFramebuffer(GL_FRAMEBUFFER, 0);147 GL_BindFramebuffer(GL_FRAMEBUFFER, 0); 148 148 EGL_MakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); 149 149 EGL_DestroyContext(m_display, m_context); -
trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp
r286293 r286978 87 87 88 88 m_context.paintRenderingResultsToCanvas(*imageBuffer.get()); 89 RefPtr<Image> image = imageBuffer->copyImage(DontCopyBackingStore);90 if (!image)91 return;92 89 #else 93 90 flags |= TextureMapperGL::ShouldFlipTexture; … … 97 94 auto& proxy = downcast<Nicosia::ContentLayerTextureMapperImpl>(m_contentLayer->impl()).proxy(); 98 95 #if USE(ANGLE) 99 std::unique_ptr<TextureMapperPlatformLayerBuffer> layerBuffer; 100 layerBuffer = proxy.getAvailableBuffer(textureSize, m_context.m_internalColorFormat); 101 if (!layerBuffer) { 102 auto texture = BitmapTextureGL::create(TextureMapperContextAttributes::get(), flags, m_context.m_internalColorFormat); 103 static_cast<BitmapTextureGL&>(texture.get()).setPendingContents(WTFMove(image)); 104 layerBuffer = makeUnique<TextureMapperPlatformLayerBuffer>(WTFMove(texture), flags); 105 } else 106 layerBuffer->textureGL().setPendingContents(WTFMove(image)); 96 auto proxyOperation = 97 [this, textureSize, flags, imageBuffer = WTFMove(imageBuffer)] () { 98 RefPtr<Image> image = imageBuffer->copyImage(DontCopyBackingStore); 99 if (!image) 100 return; 107 101 108 Locker locker { proxy.lock() }; 109 proxy.pushNextBuffer(WTFMove(layerBuffer)); 102 std::unique_ptr<TextureMapperPlatformLayerBuffer> layerBuffer; 103 auto& proxy = downcast<Nicosia::ContentLayerTextureMapperImpl>(m_contentLayer->impl()).proxy(); 104 Locker locker { proxy.lock() }; 105 layerBuffer = proxy.getAvailableBuffer(textureSize, m_context.m_internalColorFormat); 106 107 if (!layerBuffer) { 108 auto texture = BitmapTextureGL::create(TextureMapperContextAttributes::get(), flags, m_context.m_internalColorFormat); 109 static_cast<BitmapTextureGL&>(texture.get()).setPendingContents(WTFMove(image)); 110 layerBuffer = makeUnique<TextureMapperPlatformLayerBuffer>(WTFMove(texture), flags); 111 } else 112 layerBuffer->textureGL().setPendingContents(WTFMove(image)); 113 114 proxy.pushNextBuffer(WTFMove(layerBuffer)); 115 116 m_context.markLayerComposited(); 117 }; 118 119 proxy.scheduleUpdateOnCompositorThread([proxyOperation] { 120 proxyOperation(); 121 }); 122 123 return; 110 124 #else 111 125 Locker locker { proxy.lock() };
Note:
See TracChangeset
for help on using the changeset viewer.