[webkit-changes] [294322] trunk/Source/WebKit

2022-05-17 Thread clord
Title: [294322] trunk/Source/WebKit








Revision 294322
Author cl...@igalia.com
Date 2022-05-17 06:22:50 -0700 (Tue, 17 May 2022)


Log Message
[WPE] Use new libwpe API to synchronise display refreshes fully to the screen refresh rate
https://bugs.webkit.org/show_bug.cgi?id=240453

Reviewed by Adrian Perez de Castro.

Use new libwpe API to track the target refresh rate and use it in
ThreadedDisplayRefreshMonitor for DisplayUpdate objects.

* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::targetRefreshRateDidChange):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp:
(WebKit::ThreadedDisplayRefreshMonitor::ThreadedDisplayRefreshMonitor):
(WebKit::ThreadedDisplayRefreshMonitor::setTargetRefreshRate):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.h:
* UIProcess/API/wpe/WPEView.cpp:
(WKWPE::m_backend):
* UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
(WebKit::DrawingAreaProxyCoordinatedGraphics::targetRefreshRateDidChange):
* UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h:
* UIProcess/DrawingAreaProxy.h:
* WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
(WebKit::DrawingAreaCoordinatedGraphics::targetRefreshRateDidChange):
* WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h:
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::targetRefreshRateDidChange):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::targetRefreshRateDidChange):
* WebProcess/WebPage/DrawingArea.messages.in:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp
trunk/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h
trunk/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp
trunk/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.h
trunk/Source/WebKit/UIProcess/API/wpe/WPEView.cpp
trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp
trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
trunk/Source/WebKit/UIProcess/DrawingAreaProxy.h
trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp
trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h
trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp
trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h
trunk/Source/WebKit/WebProcess/WebPage/DrawingArea.h
trunk/Source/WebKit/WebProcess/WebPage/DrawingArea.messages.in




Diff

Modified: trunk/Source/WebKit/ChangeLog (294321 => 294322)

--- trunk/Source/WebKit/ChangeLog	2022-05-17 13:22:01 UTC (rev 294321)
+++ trunk/Source/WebKit/ChangeLog	2022-05-17 13:22:50 UTC (rev 294322)
@@ -1,3 +1,36 @@
+2022-05-17  Chris Lord  
+
+[WPE] Use new libwpe API to synchronise display refreshes fully to the screen refresh rate
+https://bugs.webkit.org/show_bug.cgi?id=240453
+
+Reviewed by Adrian Perez de Castro.
+
+Use new libwpe API to track the target refresh rate and use it in
+ThreadedDisplayRefreshMonitor for DisplayUpdate objects.
+
+* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
+(WebKit::ThreadedCompositor::targetRefreshRateDidChange):
+* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
+* Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp:
+(WebKit::ThreadedDisplayRefreshMonitor::ThreadedDisplayRefreshMonitor):
+(WebKit::ThreadedDisplayRefreshMonitor::setTargetRefreshRate):
+* Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.h:
+* UIProcess/API/wpe/WPEView.cpp:
+(WKWPE::m_backend):
+* UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
+(WebKit::DrawingAreaProxyCoordinatedGraphics::targetRefreshRateDidChange):
+* UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h:
+* UIProcess/DrawingAreaProxy.h:
+* WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
+(WebKit::DrawingAreaCoordinatedGraphics::targetRefreshRateDidChange):
+* WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h:
+* WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
+(WebKit::LayerTreeHost::targetRefreshRateDidChange):
+* WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h:
+* WebProcess/WebPage/DrawingArea.h:
+

[webkit-changes] [290015] trunk/Source/WebCore

2022-02-17 Thread clord
Title: [290015] trunk/Source/WebCore








Revision 290015
Author cl...@igalia.com
Date 2022-02-17 06:54:03 -0800 (Thu, 17 Feb 2022)


Log Message
[WPE] Build failure when building with ANGLE enabled since r289912
https://bugs.webkit.org/show_bug.cgi?id=236768

Reviewed by Alejandro G. Castro.

Fix build after regression caused by r289912.

* platform/graphics/angle/GraphicsContextGLANGLE.h:
* platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::EGLImageBacking):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h
trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (290014 => 290015)

--- trunk/Source/WebCore/ChangeLog	2022-02-17 13:38:12 UTC (rev 290014)
+++ trunk/Source/WebCore/ChangeLog	2022-02-17 14:54:03 UTC (rev 290015)
@@ -1,3 +1,16 @@
+2022-02-17  Chris Lord  
+
+[WPE] Build failure when building with ANGLE enabled since r289912
+https://bugs.webkit.org/show_bug.cgi?id=236768
+
+Reviewed by Alejandro G. Castro.
+
+Fix build after regression caused by r289912.
+
+* platform/graphics/angle/GraphicsContextGLANGLE.h:
+* platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:
+(WebCore::GraphicsContextGLANGLE::EGLImageBacking::EGLImageBacking):
+
 2022-02-17  Lauro Moura  
 
 Unreviewed, non-unified build fix after r290003


Modified: trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h (290014 => 290015)

--- trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h	2022-02-17 13:38:12 UTC (rev 290014)
+++ trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h	2022-02-17 14:54:03 UTC (rev 290015)
@@ -48,6 +48,8 @@
 
 struct gbm_device;
 struct gbm_bo;
+
+typedef void *EGLImage;
 #endif
 
 namespace WebCore {
@@ -492,7 +494,7 @@
 
 gbm_bo* m_BO { nullptr };
 int m_FD { -1 };
-EGLImage m_image { EGL_NO_IMAGE };
+EGLImage m_image;
 };
 
 std::unique_ptr m_textureBacking;


Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp (290014 => 290015)

--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp	2022-02-17 13:38:12 UTC (rev 290014)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp	2022-02-17 14:54:03 UTC (rev 290015)
@@ -127,6 +127,7 @@
 #if USE(NICOSIA)
 GraphicsContextGLANGLE::EGLImageBacking::EGLImageBacking(GCGLDisplay display)
 : m_display(display)
+, m_image(EGL_NO_IMAGE)
 {
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [289884] trunk/Source/WebCore

2022-02-16 Thread clord
Title: [289884] trunk/Source/WebCore








Revision 289884
Author cl...@igalia.com
Date 2022-02-16 01:39:44 -0800 (Wed, 16 Feb 2022)


Log Message
[GTK][WPE] Crashing/weird behaviour when trying to use videos as textures with ANGLE WebGL enabled
https://bugs.webkit.org/show_bug.cgi?id=236587

Reviewed by Kenneth Russell.

Disable the texture-sharing fast-path for GStreamer GL when ANGLE is
also enabled.

No new tests, no change in behaviour.

* platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
(WebCore::GraphicsContextGLTextureMapper::copyTextureFromMedia):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (289883 => 289884)

--- trunk/Source/WebCore/ChangeLog	2022-02-16 09:29:18 UTC (rev 289883)
+++ trunk/Source/WebCore/ChangeLog	2022-02-16 09:39:44 UTC (rev 289884)
@@ -1,3 +1,18 @@
+2022-02-16  Chris Lord  
+
+[GTK][WPE] Crashing/weird behaviour when trying to use videos as textures with ANGLE WebGL enabled
+https://bugs.webkit.org/show_bug.cgi?id=236587
+
+Reviewed by Kenneth Russell.
+
+Disable the texture-sharing fast-path for GStreamer GL when ANGLE is
+also enabled.
+
+No new tests, no change in behaviour.
+
+* platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
+(WebCore::GraphicsContextGLTextureMapper::copyTextureFromMedia):
+
 2022-02-16  Ali Juma  
 
 Floating point exception in RenderListBox::numVisibleItems


Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp (289883 => 289884)

--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp	2022-02-16 09:29:18 UTC (rev 289883)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp	2022-02-16 09:39:44 UTC (rev 289884)
@@ -173,7 +173,22 @@
 #if ENABLE(VIDEO)
 bool GraphicsContextGLTextureMapper::copyTextureFromMedia(MediaPlayer& player, PlatformGLObject outputTexture, GCGLenum outputTarget, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY)
 {
+#if USE(ANGLE) && USE(GSTREAMER_GL)
+UNUSED_PARAM(player);
+UNUSED_PARAM(outputTexture);
+UNUSED_PARAM(outputTarget);
+UNUSED_PARAM(level);
+UNUSED_PARAM(internalFormat);
+UNUSED_PARAM(format);
+UNUSED_PARAM(type);
+UNUSED_PARAM(premultiplyAlpha);
+UNUSED_PARAM(flipY);
+
+// FIXME: Implement copy-free (or at least, software copy-free) texture transfer via dmabuf.
+return false;
+#else
 return player.copyVideoTextureToPlatformTexture(this, outputTexture, outputTarget, level, internalFormat, format, type, premultiplyAlpha, flipY);
+#endif
 }
 #endif
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [289418] trunk/Source/WebCore

2022-02-08 Thread clord
Title: [289418] trunk/Source/WebCore








Revision 289418
Author cl...@igalia.com
Date 2022-02-08 12:45:41 -0800 (Tue, 08 Feb 2022)


Log Message
[GTK][WPE] Fallback path for WebGL rendering with ANGLE is incorrectly scheduling on the compositor thread
https://bugs.webkit.org/show_bug.cgi?id=236290

Reviewed by Alejandro G. Castro.

Fix the WebGL ANGLE fallback path on nicosia to not incorrectly
schedule on the compositor thread.

No new tests, no change in behaviour.

* platform/TextureMapper.cmake:
* platform/graphics/angle/GraphicsContextGLANGLE.h:
* platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.cpp.
* platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.h.
* platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
(WebCore::GraphicsContextGLTextureMapper::GraphicsContextGLTextureMapper):
* platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLANGLE::platformDisplay const):
(WebCore::GraphicsContextGLANGLE::platformConfig const):
(WebCore::GraphicsContextGLANGLE::makeContextCurrent):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/TextureMapper.cmake
trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h
trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp
trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp


Added Paths

trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp
trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h


Removed Paths

trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.cpp
trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (289417 => 289418)

--- trunk/Source/WebCore/ChangeLog	2022-02-08 20:42:04 UTC (rev 289417)
+++ trunk/Source/WebCore/ChangeLog	2022-02-08 20:45:41 UTC (rev 289418)
@@ -1,3 +1,27 @@
+2022-02-08  Chris Lord  
+
+[GTK][WPE] Fallback path for WebGL rendering with ANGLE is incorrectly scheduling on the compositor thread
+https://bugs.webkit.org/show_bug.cgi?id=236290
+
+Reviewed by Alejandro G. Castro.
+
+Fix the WebGL ANGLE fallback path on nicosia to not incorrectly
+schedule on the compositor thread.
+
+No new tests, no change in behaviour.
+
+* platform/TextureMapper.cmake:
+* platform/graphics/angle/GraphicsContextGLANGLE.h:
+* platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.cpp.
+* platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.h.
+* platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
+(WebCore::GraphicsContextGLTextureMapper::GraphicsContextGLTextureMapper):
+* platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:
+(WebCore::GraphicsContextGLANGLE::GraphicsContextGLANGLE):
+(WebCore::GraphicsContextGLANGLE::platformDisplay const):
+(WebCore::GraphicsContextGLANGLE::platformConfig const):
+(WebCore::GraphicsContextGLANGLE::makeContextCurrent):
+
 2022-02-08  Razvan Caliman  
 
 Web Inspector: [Flexbox] Add support for showing/hiding flex container overlays and basic overlay drawing


Modified: trunk/Source/WebCore/platform/TextureMapper.cmake (289417 => 289418)

--- trunk/Source/WebCore/platform/TextureMapper.cmake	2022-02-08 20:42:04 UTC (rev 289417)
+++ trunk/Source/WebCore/platform/TextureMapper.cmake	2022-02-08 20:45:41 UTC (rev 289418)
@@ -127,7 +127,7 @@
 
 if (USE_ANGLE_WEBGL)
 list(APPEND WebCore_SOURCES
-platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.cpp
+platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp
 )
 endif ()
 


Modified: trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h (289417 => 289418)

--- trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h	2022-02-08 20:42:04 UTC (rev 289417)
+++ trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h	2022-02-08 20:45:41 UTC (rev 289418)
@@ -42,8 +42,7 @@
 
 #if USE(NICOSIA)
 namespace Nicosia {
-class GCGLANGLEPipe;
-class GCGLANGLEPipeSource;
+class GCGLANGLELayer;
 class GCGLLayer;
 }
 
@@ -455,7 +454,7 @@
 GCGLuint m_intermediateTexture { 0 };
 #endif
 #if USE(NICOSIA)
-std::unique_ptr m_nicosiaPipe;
+std::unique_ptr m_nicosiaLayer;
 
 class EGLImageBacking {
 WTF_MAKE_FAST_ALLOCATED;
@@ -490,7 +489,7 @@
 
 friend class ExtensionsGLANGLE;
 #if USE(NICOSIA)
-friend class 

[webkit-changes] [289106] trunk/Source/WebCore

2022-02-03 Thread clord
Title: [289106] trunk/Source/WebCore








Revision 289106
Author cl...@igalia.com
Date 2022-02-03 23:16:39 -0800 (Thu, 03 Feb 2022)


Log Message
[GTK][WPE] Use dmabuf when possible to transfer ANGLE rendering to the compositor
https://bugs.webkit.org/show_bug.cgi?id=235946

Reviewed by Žan Doberšek.

Use dmabuf when available to transfer ANGLE WebGL rendering contents
to the compositor.

No new tests, no change in behaviour.

* PlatformGTK.cmake:
* PlatformWPE.cmake:
* SourcesGTK.txt:
* SourcesWPE.txt:
* platform/TextureMapper.cmake:
* platform/graphics/OpenGLShims.cpp:
(WebCore::initializeOpenGLShims):
* platform/graphics/OpenGLShims.h:
* platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::prepareTextureImpl):
* platform/graphics/angle/GraphicsContextGLANGLE.h:
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::GLContextEGL):
(WebCore::GLContextEGL::createImage const):
(WebCore::GLContextEGL::destroyImage const):
* platform/graphics/egl/GLContextEGL.h:
* platform/graphics/gbm/GBMDevice.cpp: Added.
(WebCore::threadSpecificDevice):
(WebCore::GBMDevice::get):
(WebCore::GBMDevice::GBMDevice):
(WebCore::GBMDevice::~GBMDevice):
* platform/graphics/gbm/GBMDevice.h: Added.
(WebCore::GBMDevice::device const):
* platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.cpp:
(Nicosia::GCGLANGLEPipeSource::swapBuffersIfNeeded):
* platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::EGLImageBacking):
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::~EGLImageBacking):
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::format const):
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::stride const):
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::releaseResources):
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::reset):
(WebCore::GraphicsContextGLANGLE::~GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLANGLE::reshapeDisplayBufferBacking):
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
(WebCore::TextureMapperPlatformLayerBuffer::textureVariant const):
(WebCore::TextureMapperPlatformLayerBuffer::size const):
(WebCore::TextureMapperPlatformLayerBuffer::textureVariant): Deleted.
* platform/graphics/texmap/TextureMapperPlatformLayerDmabuf.cpp: Added.
(WebCore::createFourCC):
(WebCore::fourCCToGLFormat):
(WebCore::formatHasAlpha):
(WebCore::TextureMapperPlatformLayerDmabuf::TextureMapperPlatformLayerDmabuf):
(WebCore::m_fd):
(WebCore::TextureMapperPlatformLayerDmabuf::~TextureMapperPlatformLayerDmabuf):
(WebCore::TextureMapperPlatformLayerDmabuf::validateTexture):
(WebCore::TextureMapperPlatformLayerDmabuf::paintToTextureMapper):
(WebCore::TextureMapperPlatformLayerDmabuf::clone):
* platform/graphics/texmap/TextureMapperPlatformLayerDmabuf.h: Added.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/PlatformGTK.cmake
trunk/Source/WebCore/PlatformWPE.cmake
trunk/Source/WebCore/SourcesGTK.txt
trunk/Source/WebCore/SourcesWPE.txt
trunk/Source/WebCore/platform/TextureMapper.cmake
trunk/Source/WebCore/platform/graphics/OpenGLShims.cpp
trunk/Source/WebCore/platform/graphics/OpenGLShims.h
trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp
trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h
trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.h
trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.cpp
trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h


Added Paths

trunk/Source/WebCore/platform/graphics/gbm/
trunk/Source/WebCore/platform/graphics/gbm/GBMDevice.cpp
trunk/Source/WebCore/platform/graphics/gbm/GBMDevice.h
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerDmabuf.cpp
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerDmabuf.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (289105 => 289106)

--- trunk/Source/WebCore/ChangeLog	2022-02-04 06:58:12 UTC (rev 289105)
+++ trunk/Source/WebCore/ChangeLog	2022-02-04 07:16:39 UTC (rev 289106)
@@ -1,3 +1,66 @@
+2022-02-03  Chris Lord  
+
+[GTK][WPE] Use dmabuf when possible to transfer ANGLE rendering to the compositor
+https://bugs.webkit.org/show_bug.cgi?id=235946
+
+Reviewed by Žan Doberšek.
+
+Use dmabuf when available to transfer ANGLE WebGL rendering contents
+to the compositor.
+
+No new tests, no change in behaviour.
+
+* PlatformGTK.cmake:
+* PlatformWPE.cmake:
+* SourcesGTK.txt:
+* SourcesWPE.txt:
+* platform/TextureMapper.cmake:
+* platform/graphics/OpenGLShims.cpp:
+(WebCore::initializeOpenGLShims):
+* platform/graphics/OpenGLShims.h:
+* 

[webkit-changes] [289043] trunk/Source/WebCore

2022-02-03 Thread clord
Title: [289043] trunk/Source/WebCore








Revision 289043
Author cl...@igalia.com
Date 2022-02-03 05:21:54 -0800 (Thu, 03 Feb 2022)


Log Message
Add specialize type traits to GLContext
https://bugs.webkit.org/show_bug.cgi?id=236076

Reviewed by Alejandro G. Castro.

Make GLContext downcastable.

No new tests, no change in behaviour.

* platform/graphics/GLContext.h:
* platform/graphics/egl/GLContextEGL.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/GLContext.h
trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (289042 => 289043)

--- trunk/Source/WebCore/ChangeLog	2022-02-03 13:11:01 UTC (rev 289042)
+++ trunk/Source/WebCore/ChangeLog	2022-02-03 13:21:54 UTC (rev 289043)
@@ -1,3 +1,17 @@
+2022-02-03  Chris Lord  
+
+Add specialize type traits to GLContext
+https://bugs.webkit.org/show_bug.cgi?id=236076
+
+Reviewed by Alejandro G. Castro.
+
+Make GLContext downcastable.
+
+No new tests, no change in behaviour.
+
+* platform/graphics/GLContext.h:
+* platform/graphics/egl/GLContextEGL.h:
+
 2022-02-03  Philippe Normand  
 
 [atspi] missing-braces clang warnings


Modified: trunk/Source/WebCore/platform/graphics/GLContext.h (289042 => 289043)

--- trunk/Source/WebCore/platform/graphics/GLContext.h	2022-02-03 13:11:01 UTC (rev 289042)
+++ trunk/Source/WebCore/platform/graphics/GLContext.h	2022-02-03 13:21:54 UTC (rev 289043)
@@ -121,4 +121,9 @@
 
 } // namespace WebCore
 
+#define SPECIALIZE_TYPE_TRAITS_GLCONTEXT(ToValueTypeName, predicate) \
+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::ToValueTypeName) \
+static bool isType(const WebCore::GLContext& context) { return context.predicate; } \
+SPECIALIZE_TYPE_TRAITS_END()
+
 #endif // GLContext_h


Modified: trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.h (289042 => 289043)

--- trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.h	2022-02-03 13:11:01 UTC (rev 289042)
+++ trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.h	2022-02-03 13:21:54 UTC (rev 289043)
@@ -120,4 +120,6 @@
 
 } // namespace WebCore
 
+SPECIALIZE_TYPE_TRAITS_GLCONTEXT(GLContextEGL, isEGLContext());
+
 #endif // USE(EGL)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [288014] trunk/Source/WebCore

2022-01-14 Thread clord
Title: [288014] trunk/Source/WebCore








Revision 288014
Author cl...@igalia.com
Date 2022-01-14 04:55:03 -0800 (Fri, 14 Jan 2022)


Log Message
[GTK][WPE] Share code between NicosiaGCGLLayer+ANGLE and NicosiaImageBufferPipe
https://bugs.webkit.org/show_bug.cgi?id=235182

Reviewed by Alejandro G. Castro.

Rename NicosiaGCGLANGLELayer to NicosiaGCGLANGLEPipe and have it
inherit from NicosiaImageBufferPipe instead of NicosiaGCGLLayer.

No new tests, no change in behaviour.

* platform/TextureMapper.cmake:
* platform/graphics/angle/GraphicsContextGLANGLE.h:
* platform/graphics/nicosia/NicosiaImageBufferPipe.cpp:
(Nicosia::NicosiaImageBufferPipe::NicosiaImageBufferPipe):
(Nicosia::NicosiaImageBufferPipe::source const):
(Nicosia::NicosiaImageBufferPipe::layerContentsDisplayDelegate):
(): Deleted.
(Nicosia::WebCore::NicosiaImageBufferPipeSource::NicosiaImageBufferPipeSource): Deleted.
(Nicosia::WebCore::NicosiaImageBufferPipeSource::~NicosiaImageBufferPipeSource): Deleted.
(Nicosia::WebCore::NicosiaImageBufferPipeSource::handle): Deleted.
(Nicosia::WebCore::NicosiaImageBufferPipeSource::swapBuffersIfNeeded): Deleted.
* platform/graphics/nicosia/NicosiaImageBufferPipe.h: Added.
(Nicosia::NicosiaImageBufferPipeSource::platformLayer const):
* platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.cpp: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp.
* platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.h: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h.
* platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp:
(Nicosia::GCGLLayer::GCGLLayer):
(Nicosia::GCGLLayer::swapBuffersIfNeeded):
* platform/graphics/nicosia/texmap/NicosiaGCGLLayer.h:
* platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
(WebCore::GraphicsContextGLTextureMapper::GraphicsContextGLTextureMapper):
* platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLANGLE::platformDisplay const):
(WebCore::GraphicsContextGLANGLE::platformConfig const):
(WebCore::GraphicsContextGLANGLE::makeContextCurrent):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/TextureMapper.cmake
trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h
trunk/Source/WebCore/platform/graphics/nicosia/NicosiaImageBufferPipe.cpp
trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp
trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.h
trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp
trunk/Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp


Added Paths

trunk/Source/WebCore/platform/graphics/nicosia/NicosiaImageBufferPipe.h
trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.cpp
trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.h


Removed Paths

trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp
trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (288013 => 288014)

--- trunk/Source/WebCore/ChangeLog	2022-01-14 12:08:58 UTC (rev 288013)
+++ trunk/Source/WebCore/ChangeLog	2022-01-14 12:55:03 UTC (rev 288014)
@@ -1,3 +1,42 @@
+2022-01-14  Chris Lord  
+
+[GTK][WPE] Share code between NicosiaGCGLLayer+ANGLE and NicosiaImageBufferPipe
+https://bugs.webkit.org/show_bug.cgi?id=235182
+
+Reviewed by Alejandro G. Castro.
+
+Rename NicosiaGCGLANGLELayer to NicosiaGCGLANGLEPipe and have it
+inherit from NicosiaImageBufferPipe instead of NicosiaGCGLLayer.
+
+No new tests, no change in behaviour.
+
+* platform/TextureMapper.cmake:
+* platform/graphics/angle/GraphicsContextGLANGLE.h:
+* platform/graphics/nicosia/NicosiaImageBufferPipe.cpp:
+(Nicosia::NicosiaImageBufferPipe::NicosiaImageBufferPipe):
+(Nicosia::NicosiaImageBufferPipe::source const):
+(Nicosia::NicosiaImageBufferPipe::layerContentsDisplayDelegate):
+(): Deleted.
+(Nicosia::WebCore::NicosiaImageBufferPipeSource::NicosiaImageBufferPipeSource): Deleted.
+(Nicosia::WebCore::NicosiaImageBufferPipeSource::~NicosiaImageBufferPipeSource): Deleted.
+(Nicosia::WebCore::NicosiaImageBufferPipeSource::handle): Deleted.
+(Nicosia::WebCore::NicosiaImageBufferPipeSource::swapBuffersIfNeeded): Deleted.
+* platform/graphics/nicosia/NicosiaImageBufferPipe.h: Added.
+(Nicosia::NicosiaImageBufferPipeSource::platformLayer const):
+* platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.cpp: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp.
+* platform/graphics/nicosia/texmap/NicosiaGCGLANGLEPipe.h: Renamed from 

[webkit-changes] [287923] trunk

2022-01-12 Thread clord
Title: [287923] trunk








Revision 287923
Author cl...@igalia.com
Date 2022-01-12 07:04:39 -0800 (Wed, 12 Jan 2022)


Log Message
[WPE] Fix building WebXR with ANGLE enabled
https://bugs.webkit.org/show_bug.cgi?id=235108

Reviewed by Alejandro G. Castro.

.:

Remove conflict between WebXR and ANGLE WebGL for WPE.

* Source/cmake/OptionsWPE.cmake:

Source/WebCore:

Fix building both ANGLE WebGL and WebXR simultaneously when GLES is
being used.

* Modules/webxr/WebXROpaqueFramebuffer.cpp:
(WebCore::WebXROpaqueFramebuffer::startFrame):
(WebCore::WebXROpaqueFramebuffer::setupFramebuffer):

Modified Paths

trunk/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp
trunk/Source/cmake/OptionsWPE.cmake




Diff

Modified: trunk/ChangeLog (287922 => 287923)

--- trunk/ChangeLog	2022-01-12 14:37:38 UTC (rev 287922)
+++ trunk/ChangeLog	2022-01-12 15:04:39 UTC (rev 287923)
@@ -1,5 +1,16 @@
 2022-01-12  Chris Lord  
 
+[WPE] Fix building WebXR with ANGLE enabled
+https://bugs.webkit.org/show_bug.cgi?id=235108
+
+Reviewed by Alejandro G. Castro.
+
+Remove conflict between WebXR and ANGLE WebGL for WPE.
+
+* Source/cmake/OptionsWPE.cmake:
+
+2022-01-12  Chris Lord  
+
 [WPE] Enable WebGL ANGLE support
 https://bugs.webkit.org/show_bug.cgi?id=235064
 


Modified: trunk/Source/WebCore/ChangeLog (287922 => 287923)

--- trunk/Source/WebCore/ChangeLog	2022-01-12 14:37:38 UTC (rev 287922)
+++ trunk/Source/WebCore/ChangeLog	2022-01-12 15:04:39 UTC (rev 287923)
@@ -1,3 +1,17 @@
+2022-01-12  Chris Lord  
+
+[WPE] Fix building WebXR with ANGLE enabled
+https://bugs.webkit.org/show_bug.cgi?id=235108
+
+Reviewed by Alejandro G. Castro.
+
+Fix building both ANGLE WebGL and WebXR simultaneously when GLES is
+being used.
+
+* Modules/webxr/WebXROpaqueFramebuffer.cpp:
+(WebCore::WebXROpaqueFramebuffer::startFrame):
+(WebCore::WebXROpaqueFramebuffer::setupFramebuffer):
+
 2022-01-12  Alan Bujtas  
 
 [LFC][IFC] Incorrect negative margin handling (both left/right) with RTL inline base direction


Modified: trunk/Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp (287922 => 287923)

--- trunk/Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp	2022-01-12 14:37:38 UTC (rev 287922)
+++ trunk/Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp	2022-01-12 15:04:39 UTC (rev 287923)
@@ -31,11 +31,9 @@
 
 #if !USE(ANGLE)
 #include "ExtensionsGLOpenGLCommon.h"
-#endif
 #if USE(OPENGL_ES)
 #include "ExtensionsGLOpenGLES.h"
 #endif
-#if !USE(ANGLE)
 #include "GraphicsContextGL.h"
 #endif
 #include "IntSize.h"
@@ -178,7 +176,7 @@
 #else
 m_opaqueTexture = data.opaqueTexture;
 
-#if USE(OPENGL_ES)
+#if USE(OPENGL_ES) && !USE(ANGLE)
 auto& extensions = reinterpret_cast(gl.getExtensions());
 if (m_attributes.antialias && extensions.isImagination()) {
 extensions.framebufferTexture2DMultisampleIMG(GL::FRAMEBUFFER, GL::COLOR_ATTACHMENT0, GL::TEXTURE_2D, m_opaqueTexture, 0, m_sampleCount);
@@ -269,15 +267,15 @@
 
 // Set up color, depth and stencil formats
 bool hasDepthOrStencil = m_attributes.stencil || m_attributes.depth;
-#if USE(OPENGL_ES)
+#if USE(ANGLE)
+bool platformSupportsPackedDepthStencil = true;
+auto depthFormat = platformSupportsPackedDepthStencil ? GL::DEPTH24_STENCIL8 : GL::DEPTH_COMPONENT;
+auto stencilFormat = GL::STENCIL_INDEX8;
+#elif USE(OPENGL_ES)
 auto& extensions = reinterpret_cast(gl.getExtensions());
 bool platformSupportsPackedDepthStencil = hasDepthOrStencil && extensions.supports("GL_OES_packed_depth_stencil");
 auto depthFormat = platformSupportsPackedDepthStencil ? GL::DEPTH24_STENCIL8 : GL::DEPTH_COMPONENT16;
 auto stencilFormat = GL::STENCIL_INDEX8;
-#elif USE(ANGLE)
-bool platformSupportsPackedDepthStencil = true;
-auto depthFormat = platformSupportsPackedDepthStencil ? GL::DEPTH24_STENCIL8 : GL::DEPTH_COMPONENT;
-auto stencilFormat = GL::STENCIL_INDEX8;
 #else
 auto& extensions = reinterpret_cast(gl.getExtensions());
 bool platformSupportsPackedDepthStencil = hasDepthOrStencil && extensions.supports("GL_EXT_packed_depth_stencil");
@@ -298,7 +296,7 @@
 m_sampleCount = std::min(4, maxSampleCount);
 }
 
-#if USE(OPENGL_ES)
+#if USE(OPENGL_ES) && !USE(ANGLE)
 // Use multisampled_render_to_texture extension if available.
 if (m_attributes.antialias && extensions.isImagination()) {
 // framebufferTexture2DMultisampleIMG is set up in startFrame call.


Modified: trunk/Source/cmake/OptionsWPE.cmake (287922 => 287923)

--- trunk/Source/cmake/OptionsWPE.cmake	2022-01-12 14:37:38 UTC (rev 287922)
+++ trunk/Source/cmake/OptionsWPE.cmake	2022-01-12 15:04:39 UTC (rev 287923)
@@ -89,8 +89,6 @@
 WEBKIT_OPTION_DEFINE(USE_ANGLE_WEBGL "Whether to use ANGLE as WebGL backend." PRIVATE OFF)
 WEBKIT_OPTION_DEPEND(USE_ANGLE_WEBGL ENABLE_WEBGL)
 

[webkit-changes] [287920] trunk

2022-01-12 Thread clord
Title: [287920] trunk








Revision 287920
Author cl...@igalia.com
Date 2022-01-12 05:02:19 -0800 (Wed, 12 Jan 2022)


Log Message
[WPE] Enable WebGL ANGLE support
https://bugs.webkit.org/show_bug.cgi?id=235064

Reviewed by Alejandro G. Castro.

.:

Add the USE_ANGLE_WEBGL option for WPE. This is currently incompatible
with WebXR as there isn't an ANGLE GL context code-path there.

* Source/cmake/OptionsWPE.cmake:

Source/ThirdParty/ANGLE:

Enable building on WPE (mostly copying the GTK build file).

* PlatformWPE.cmake:

Source/WebCore:

Enable ANGLE WebGL support when building the WPE port.

* platform/graphics/angle/ANGLEHeaders.h:
* platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp:
(Nicosia::GCGLLayer::swapBuffersIfNeeded):

Modified Paths

trunk/ChangeLog
trunk/Source/ThirdParty/ANGLE/ChangeLog
trunk/Source/ThirdParty/ANGLE/PlatformWPE.cmake
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/angle/ANGLEHeaders.h
trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp
trunk/Source/cmake/OptionsWPE.cmake




Diff

Modified: trunk/ChangeLog (287919 => 287920)

--- trunk/ChangeLog	2022-01-12 12:25:27 UTC (rev 287919)
+++ trunk/ChangeLog	2022-01-12 13:02:19 UTC (rev 287920)
@@ -1,3 +1,15 @@
+2022-01-12  Chris Lord  
+
+[WPE] Enable WebGL ANGLE support
+https://bugs.webkit.org/show_bug.cgi?id=235064
+
+Reviewed by Alejandro G. Castro.
+
+Add the USE_ANGLE_WEBGL option for WPE. This is currently incompatible
+with WebXR as there isn't an ANGLE GL context code-path there.
+
+* Source/cmake/OptionsWPE.cmake:
+
 2022-01-11  Fujii Hironori  
 
 Remove Direct2D code (part 2)


Modified: trunk/Source/ThirdParty/ANGLE/ChangeLog (287919 => 287920)

--- trunk/Source/ThirdParty/ANGLE/ChangeLog	2022-01-12 12:25:27 UTC (rev 287919)
+++ trunk/Source/ThirdParty/ANGLE/ChangeLog	2022-01-12 13:02:19 UTC (rev 287920)
@@ -1,3 +1,14 @@
+2022-01-12  Chris Lord  
+
+[WPE] Enable WebGL ANGLE support
+https://bugs.webkit.org/show_bug.cgi?id=235064
+
+Reviewed by Alejandro G. Castro.
+
+Enable building on WPE (mostly copying the GTK build file).
+
+* PlatformWPE.cmake:
+
 2022-01-11  Kyle Piddington  
 
 ANGLE: ASTC-HDR is not available on TVOS


Modified: trunk/Source/ThirdParty/ANGLE/PlatformWPE.cmake (287919 => 287920)

--- trunk/Source/ThirdParty/ANGLE/PlatformWPE.cmake	2022-01-12 12:25:27 UTC (rev 287919)
+++ trunk/Source/ThirdParty/ANGLE/PlatformWPE.cmake	2022-01-12 13:02:19 UTC (rev 287920)
@@ -1,2 +1,52 @@
-# Allow building ANGLE on platforms that don't provide X11 headers.
-list(APPEND ANGLE_DEFINITIONS USE_SYSTEM_EGL)
+list(APPEND ANGLE_DEFINITIONS ANGLE_PLATFORM_LINUX)
+include(linux.cmake)
+
+if (USE_OPENGL)
+# Enable GLSL compiler output.
+list(APPEND ANGLE_DEFINITIONS ANGLE_ENABLE_GLSL)
+endif ()
+
+if (USE_ANGLE_EGL OR USE_ANGLE_WEBGL)
+list(APPEND ANGLE_SOURCES
+${_gl_backend_sources}
+
+${angle_system_utils_sources_linux}
+${angle_system_utils_sources_posix}
+
+${angle_dma_buf_sources}
+
+${libangle_gl_egl_dl_sources}
+${libangle_gl_egl_sources}
+${libangle_gl_sources}
+
+${libangle_gpu_info_util_sources}
+${libangle_gpu_info_util_linux_sources}
+)
+
+list(APPEND ANGLE_DEFINITIONS
+ANGLE_ENABLE_OPENGL
+ANGLE_USE_GBM
+USE_SYSTEM_EGL
+)
+
+find_package(LibDRM REQUIRED)
+find_package(GBM REQUIRED)
+
+list(APPEND ANGLE_PRIVATE_INCLUDE_DIRECTORIES
+${LIBDRM_INCLUDE_DIR}
+{GBM_INCLUDE_DIR}
+)
+
+list(APPEND ANGLEGLESv2_LIBRARIES
+${CMAKE_DL_LIBS}
+${LIBDRM_LIBRARIES}
+${GBM_LIBRARIES}
+Threads::Threads
+)
+
+if (USE_OPENGL)
+list(APPEND ANGLEGLESv2_LIBRARIES ${OPENGL_LIBRARIES})
+else ()
+list(APPEND ANGLEGLESv2_LIBRARIES ${OPENGLES_LIBRARIES})
+endif ()
+endif ()


Modified: trunk/Source/WebCore/ChangeLog (287919 => 287920)

--- trunk/Source/WebCore/ChangeLog	2022-01-12 12:25:27 UTC (rev 287919)
+++ trunk/Source/WebCore/ChangeLog	2022-01-12 13:02:19 UTC (rev 287920)
@@ -1,3 +1,16 @@
+2022-01-12  Chris Lord  
+
+[WPE] Enable WebGL ANGLE support
+https://bugs.webkit.org/show_bug.cgi?id=235064
+
+Reviewed by Alejandro G. Castro.
+
+Enable ANGLE WebGL support when building the WPE port.
+
+* platform/graphics/angle/ANGLEHeaders.h:
+* platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp:
+(Nicosia::GCGLLayer::swapBuffersIfNeeded):
+
 2022-01-12  Carlos Garcia Campos  
 
 [GTK][a11y] Defer the emission of AddAccessible signal with ATSPI


Modified: trunk/Source/WebCore/platform/graphics/angle/ANGLEHeaders.h (287919 => 287920)

--- trunk/Source/WebCore/platform/graphics/angle/ANGLEHeaders.h	2022-01-12 12:25:27 UTC (rev 287919)
+++ trunk/Source/WebCore/platform/graphics/angle/ANGLEHeaders.h	2022-01-12 

[webkit-changes] [287794] trunk/Source/WebKit

2022-01-07 Thread clord
Title: [287794] trunk/Source/WebKit








Revision 287794
Author cl...@igalia.com
Date 2022-01-07 15:47:41 -0800 (Fri, 07 Jan 2022)


Log Message
[GTK] REGRESSION: Kinetic scrolling via touch-screen behaves oddly
https://bugs.webkit.org/show_bug.cgi?id=234958

Reviewed by Michael Catanzaro.

The swipe signal handler didn't take into account
Scrollbar::pixelsPerLineStep() and also incorrectly negated the
vertical velocity. Ideally, touch scrolling would use precise wheel
events, but as the rest of the code works correctly and scales by this
amount, make the one-line change that conforms with the previous code.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseTouchSwipe):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (287793 => 287794)

--- trunk/Source/WebKit/ChangeLog	2022-01-07 23:47:29 UTC (rev 287793)
+++ trunk/Source/WebKit/ChangeLog	2022-01-07 23:47:41 UTC (rev 287794)
@@ -1,3 +1,19 @@
+2022-01-07  Chris Lord  
+
+[GTK] REGRESSION: Kinetic scrolling via touch-screen behaves oddly
+https://bugs.webkit.org/show_bug.cgi?id=234958
+
+Reviewed by Michael Catanzaro.
+
+The swipe signal handler didn't take into account
+Scrollbar::pixelsPerLineStep() and also incorrectly negated the
+vertical velocity. Ideally, touch scrolling would use precise wheel
+events, but as the rest of the code works correctly and scales by this
+amount, make the one-line change that conforms with the previous code.
+
+* UIProcess/API/gtk/WebKitWebViewBase.cpp:
+(webkitWebViewBaseTouchSwipe):
+
 2022-01-07  Patrick Angle  
 
 REGRESSION(r286498): Web Inspector: Inspector^2 fails to load in release builds and crashes with an assertion in debug builds


Modified: trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp (287793 => 287794)

--- trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp	2022-01-07 23:47:29 UTC (rev 287793)
+++ trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp	2022-01-07 23:47:41 UTC (rev 287794)
@@ -2001,7 +2001,7 @@
 return;
 }
 
-webkitWebViewBaseSynthesizeWheelEvent(webViewBase, event, -velocityX, -velocityY, x, y, WheelEventPhase::NoPhase, WheelEventPhase::Began);
+webkitWebViewBaseSynthesizeWheelEvent(webViewBase, event, -velocityX / Scrollbar::pixelsPerLineStep(), velocityY / Scrollbar::pixelsPerLineStep(), x, y, WheelEventPhase::NoPhase, WheelEventPhase::Began);
 }
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [287075] trunk

2021-12-15 Thread clord
Title: [287075] trunk








Revision 287075
Author cl...@igalia.com
Date 2021-12-15 08:33:45 -0800 (Wed, 15 Dec 2021)


Log Message
[GTK] Use libgbm and the ANGLE gbm backend to fix initialisation
https://bugs.webkit.org/show_bug.cgi?id=234293

Reviewed by Don Olmstead.

.:

Add cmake files to find gbm and libdrm.

* Source/cmake/FindGBM.cmake: Added.
* Source/cmake/FindLibDRM.cmake: Added.

Source/ThirdParty/ANGLE:

Use GBM backend for GTK platform.

* CMakeLists.txt:
* GL.cmake:
* PlatformGTK.cmake:

Source/WebCore:

Make ANGLE context non-TEXTURE_2D drawingBufferTextureTarget Cocoa-specific.

* platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::drawingBufferTextureTarget):

Modified Paths

trunk/ChangeLog
trunk/Source/ThirdParty/ANGLE/CMakeLists.txt
trunk/Source/ThirdParty/ANGLE/ChangeLog
trunk/Source/ThirdParty/ANGLE/GL.cmake
trunk/Source/ThirdParty/ANGLE/PlatformGTK.cmake
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp


Added Paths

trunk/Source/cmake/FindGBM.cmake
trunk/Source/cmake/FindLibDRM.cmake




Diff

Modified: trunk/ChangeLog (287074 => 287075)

--- trunk/ChangeLog	2021-12-15 16:25:24 UTC (rev 287074)
+++ trunk/ChangeLog	2021-12-15 16:33:45 UTC (rev 287075)
@@ -1,3 +1,15 @@
+2021-12-15  Chris Lord  
+
+[GTK] Use libgbm and the ANGLE gbm backend to fix initialisation
+https://bugs.webkit.org/show_bug.cgi?id=234293
+
+Reviewed by Don Olmstead.
+
+Add cmake files to find gbm and libdrm.
+
+* Source/cmake/FindGBM.cmake: Added.
+* Source/cmake/FindLibDRM.cmake: Added.
+
 2021-12-11  Aakash Jain  
 
 Update my github username.


Modified: trunk/Source/ThirdParty/ANGLE/CMakeLists.txt (287074 => 287075)

--- trunk/Source/ThirdParty/ANGLE/CMakeLists.txt	2021-12-15 16:25:24 UTC (rev 287074)
+++ trunk/Source/ThirdParty/ANGLE/CMakeLists.txt	2021-12-15 16:33:45 UTC (rev 287075)
@@ -9,9 +9,7 @@
 set(angle_is_winuwp FALSE)
 elseif (UNIX)
 set(is_linux TRUE)
-if (ENABLE_X11_TARGET)
-set(angle_use_x11 TRUE)
-endif ()
+set(ozone_platform_gbm TRUE)
 endif ()
 
 include(Compiler.cmake)


Modified: trunk/Source/ThirdParty/ANGLE/ChangeLog (287074 => 287075)

--- trunk/Source/ThirdParty/ANGLE/ChangeLog	2021-12-15 16:25:24 UTC (rev 287074)
+++ trunk/Source/ThirdParty/ANGLE/ChangeLog	2021-12-15 16:33:45 UTC (rev 287075)
@@ -1,3 +1,16 @@
+2021-12-15  Chris Lord  
+
+[GTK] Use libgbm and the ANGLE gbm backend to fix initialisation
+https://bugs.webkit.org/show_bug.cgi?id=234293
+
+Reviewed by Don Olmstead.
+
+Use GBM backend for GTK platform.
+
+* CMakeLists.txt:
+* GL.cmake:
+* PlatformGTK.cmake:
+
 2021-12-15  Kyle Piddington  
 
 [ANGLE] Roll ANGLE to 12-14-2021 (5ee7dfbd5a3)


Modified: trunk/Source/ThirdParty/ANGLE/GL.cmake (287074 => 287075)

--- trunk/Source/ThirdParty/ANGLE/GL.cmake	2021-12-15 16:25:24 UTC (rev 287074)
+++ trunk/Source/ThirdParty/ANGLE/GL.cmake	2021-12-15 16:33:45 UTC (rev 287075)
@@ -163,9 +163,6 @@
 "src/libANGLE/renderer/gl/egl/gbm/SurfaceGbm.cpp"
 "src/libANGLE/renderer/gl/egl/gbm/SurfaceGbm.h"
 )
-
-pkg_config("src/libANGLE/renderer/gl/libdrm") 
-set(packages "src/libANGLE/renderer/gl/libdrm" )
 endif()
 
 


Modified: trunk/Source/ThirdParty/ANGLE/PlatformGTK.cmake (287074 => 287075)

--- trunk/Source/ThirdParty/ANGLE/PlatformGTK.cmake	2021-12-15 16:25:24 UTC (rev 287074)
+++ trunk/Source/ThirdParty/ANGLE/PlatformGTK.cmake	2021-12-15 16:33:45 UTC (rev 287075)
@@ -22,10 +22,22 @@
 
 list(APPEND ANGLE_DEFINITIONS
 ANGLE_ENABLE_OPENGL
+ANGLE_USE_GBM
+USE_SYSTEM_EGL
 )
 
+find_package(LibDRM REQUIRED)
+find_package(GBM REQUIRED)
+
+list(APPEND ANGLE_PRIVATE_INCLUDE_DIRECTORIES
+${LIBDRM_INCLUDE_DIR}
+{GBM_INCLUDE_DIR}
+)
+
 list(APPEND ANGLEGLESv2_LIBRARIES
 ${CMAKE_DL_LIBS}
+${LIBDRM_LIBRARIES}
+${GBM_LIBRARIES}
 Threads::Threads
 )
 
@@ -34,24 +46,4 @@
 else ()
 list(APPEND ANGLEGLESv2_LIBRARIES OpenGL::GLES)
 endif ()
-
-# NOTE: When both Wayland and X11 are enabled, ANGLE_USE_X11 will be
-# defined and the X11 type definitions will be used for code involving
-# both. That works because types for both Wayland and X11 have the same
-# sizes and the code in WebKit casts the values to the proper types as
-# needed.
-set(GTK_ANGLE_DEFINITIONS)
-
-if (ENABLE_X11_TARGET)
-list(APPEND ANGLE_SOURCES ${libangle_gl_glx_sources})
-list(APPEND ANGLEGLESv2_LIBRARIES X11)
-list(APPEND GTK_ANGLE_DEFINITIONS ANGLE_USE_X11)
-endif ()
-
-# Allow building ANGLE on platforms which may not provide X11 headers.
-if (NOT GTK_ANGLE_DEFINITIONS)
-list(APPEND GTK_ANGLE_DEFINITIONS USE_SYSTEM_EGL)
-endif ()
-
-list(APPEND ANGLE_DEFINITIONS 

[webkit-changes] [286839] trunk

2021-12-10 Thread clord
Title: [286839] trunk








Revision 286839
Author cl...@igalia.com
Date 2021-12-10 02:18:50 -0800 (Fri, 10 Dec 2021)


Log Message
Change contributor status of Chris Lord from committer to reviewer
https://bugs.webkit.org/show_bug.cgi?id=234136

Unreviewed.


* metadata/contributors.json:

Modified Paths

trunk/ChangeLog
trunk/metadata/contributors.json




Diff

Modified: trunk/ChangeLog (286838 => 286839)

--- trunk/ChangeLog	2021-12-10 08:24:30 UTC (rev 286838)
+++ trunk/ChangeLog	2021-12-10 10:18:50 UTC (rev 286839)
@@ -1,3 +1,12 @@
+2021-12-10  Chris Lord  
+
+Change contributor status of Chris Lord from committer to reviewer
+https://bugs.webkit.org/show_bug.cgi?id=234136
+
+Unreviewed.
+
+* metadata/contributors.json:
+
 2021-12-09  Lauro Moura  
 
 Adds Lauro Moura's GitHub username to constributors.json


Modified: trunk/metadata/contributors.json (286838 => 286839)

--- trunk/metadata/contributors.json	2021-12-10 08:24:30 UTC (rev 286838)
+++ trunk/metadata/contributors.json	2021-12-10 10:18:50 UTC (rev 286839)
@@ -1485,7 +1485,7 @@
   "nicks" : [
  "cwiiis"
   ],
-  "status" : "committer"
+  "status" : "reviewer"
},
{
   "emails" : [






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [285992] trunk/Source

2021-11-18 Thread clord
Title: [285992] trunk/Source








Revision 285992
Author cl...@igalia.com
Date 2021-11-18 02:06:53 -0800 (Thu, 18 Nov 2021)


Log Message
[GLIB] twitch.tv forces synchronous scrolling
https://bugs.webkit.org/show_bug.cgi?id=232376


Reviewed by Simon Fraser.

Source/WebCore:

Make sure to keep the userScrollInProgress flag in sync for scrolling
nodes in the nicosia backend and add a utility function to determine
if user scroll is in progress for a given wheel event. This lets
EventDispatcher dispatch events asynchronously in that case.

No new tests, exercised by existing tests.

* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::isUserScrollInProgressAtEventLocation):
* page/scrolling/ScrollingTree.h:
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::isUserScrollInProgress const):
(WebCore::ScrollingTreeScrollingNode::isUserScrollProgress const): Deleted.
* page/scrolling/ScrollingTreeScrollingNode.h:
* page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp:
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::handleWheelEvent):

Source/WebKit:

Don't force synchronous wheel event delivery for scroll events when
a user scroll is in progress.

* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp
trunk/Source/WebCore/page/scrolling/ScrollingTree.h
trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp
trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h
trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (285991 => 285992)

--- trunk/Source/WebCore/ChangeLog	2021-11-18 09:51:41 UTC (rev 285991)
+++ trunk/Source/WebCore/ChangeLog	2021-11-18 10:06:53 UTC (rev 285992)
@@ -1,3 +1,28 @@
+2021-11-18  Chris Lord  
+
+[GLIB] twitch.tv forces synchronous scrolling
+https://bugs.webkit.org/show_bug.cgi?id=232376
+
+
+Reviewed by Simon Fraser.
+
+Make sure to keep the userScrollInProgress flag in sync for scrolling
+nodes in the nicosia backend and add a utility function to determine
+if user scroll is in progress for a given wheel event. This lets
+EventDispatcher dispatch events asynchronously in that case.
+
+No new tests, exercised by existing tests.
+
+* page/scrolling/ScrollingTree.cpp:
+(WebCore::ScrollingTree::isUserScrollInProgressAtEventLocation):
+* page/scrolling/ScrollingTree.h:
+* page/scrolling/ScrollingTreeScrollingNode.cpp:
+(WebCore::ScrollingTreeScrollingNode::isUserScrollInProgress const):
+(WebCore::ScrollingTreeScrollingNode::isUserScrollProgress const): Deleted.
+* page/scrolling/ScrollingTreeScrollingNode.h:
+* page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp:
+(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::handleWheelEvent):
+
 2021-11-18  Carlos Garcia Campos  
 
 AX: Use ObjectIdentifier for AXID


Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp (285991 => 285992)

--- trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp	2021-11-18 09:51:41 UTC (rev 285991)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp	2021-11-18 10:06:53 UTC (rev 285992)
@@ -63,6 +63,25 @@
 
 ScrollingTree::~ScrollingTree() = default;
 
+bool ScrollingTree::isUserScrollInProgressAtEventLocation(const PlatformWheelEvent& wheelEvent)
+{
+if (!m_rootNode)
+return false;
+
+// This method is invoked by the event handling thread
+Locker locker { m_treeStateLock };
+
+if (m_treeState.nodesWithActiveUserScrolls.isEmpty())
+return false;
+
+FloatPoint position = wheelEvent.position();
+position.move(m_rootNode->viewToContentsOffset(m_treeState.mainFrameScrollPosition));
+if (auto node = scrollingNodeForPoint(position))
+return m_treeState.nodesWithActiveUserScrolls.contains(node->scrollingNodeID());
+
+return false;
+}
+
 OptionSet ScrollingTree::computeWheelProcessingSteps(const PlatformWheelEvent& wheelEvent)
 {
 if (!m_rootNode)


Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.h (285991 => 285992)

--- trunk/Source/WebCore/page/scrolling/ScrollingTree.h	2021-11-18 09:51:41 UTC (rev 285991)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.h	2021-11-18 10:06:53 UTC (rev 285992)
@@ -103,6 +103,7 @@
 bool momentumScrollingAnimatorEnabled() const { return m_momentumScrollingAnimatorEnabled; }
 void setMomentumScrollingAnimatorEnabled(bool value) { m_momentumScrollingAnimatorEnabled = value; }
 
+WEBCORE_EXPORT bool isUserScrollInProgressAtEventLocation(const PlatformWheelEvent&);
 WEBCORE_EXPORT OptionSet determineWheelEventProcessing(const 

[webkit-changes] [285929] trunk

2021-11-17 Thread clord
Title: [285929] trunk








Revision 285929
Author cl...@igalia.com
Date 2021-11-17 07:08:14 -0800 (Wed, 17 Nov 2021)


Log Message
Add Chris Lord's GitHub username to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=233254

Unreviewed


* metadata/contributors.json:

Modified Paths

trunk/ChangeLog
trunk/metadata/contributors.json




Diff

Modified: trunk/ChangeLog (285928 => 285929)

--- trunk/ChangeLog	2021-11-17 14:52:21 UTC (rev 285928)
+++ trunk/ChangeLog	2021-11-17 15:08:14 UTC (rev 285929)
@@ -1,3 +1,12 @@
+2021-11-17  Chris Lord  
+
+Add Chris Lord's GitHub username to contributors.json
+https://bugs.webkit.org/show_bug.cgi?id=233254
+
+Unreviewed
+
+* metadata/contributors.json:
+
 2021-11-16  Alex Atwater  
 
 Add my GitHub username to contributors.json


Modified: trunk/metadata/contributors.json (285928 => 285929)

--- trunk/metadata/contributors.json	2021-11-17 14:52:21 UTC (rev 285928)
+++ trunk/metadata/contributors.json	2021-11-17 15:08:14 UTC (rev 285929)
@@ -1476,8 +1476,10 @@
   "emails" : [
  "cl...@igalia.com",
  "ch...@igalia.com",
- "cont...@chrislord.net"
+ "cont...@chrislord.net",
+ "chrislord@gmail.com"
   ],
+  "github" : "Cwiiis",
   "name" : "Chris Lord",
   "nicks" : [
  "cwiiis"






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [285858] trunk/Source/WebCore

2021-11-16 Thread clord
Title: [285858] trunk/Source/WebCore








Revision 285858
Author cl...@igalia.com
Date 2021-11-16 05:40:51 -0800 (Tue, 16 Nov 2021)


Log Message
[GTK][WPE] displayDidRefresh can shortcut waking up the scrolling thread
https://bugs.webkit.org/show_bug.cgi?id=233187

Reviewed by Alejandro G. Castro.

Allow scrolling thread wake-up shortcut on GTK and WPE (matching
behaviour on every other platform).

No new tests, covered by existing tests.

* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::displayDidRefresh):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (285857 => 285858)

--- trunk/Source/WebCore/ChangeLog	2021-11-16 11:41:05 UTC (rev 285857)
+++ trunk/Source/WebCore/ChangeLog	2021-11-16 13:40:51 UTC (rev 285858)
@@ -1,3 +1,18 @@
+2021-11-16  Chris Lord  
+
+[GTK][WPE] displayDidRefresh can shortcut waking up the scrolling thread
+https://bugs.webkit.org/show_bug.cgi?id=233187
+
+Reviewed by Alejandro G. Castro.
+
+Allow scrolling thread wake-up shortcut on GTK and WPE (matching
+behaviour on every other platform).
+
+No new tests, covered by existing tests.
+
+* page/scrolling/ThreadedScrollingTree.cpp:
+(WebCore::ThreadedScrollingTree::displayDidRefresh):
+
 2021-11-16  Commit Queue  
 
 Unreviewed, reverting r280078, r280290 and r282008.


Modified: trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp (285857 => 285858)

--- trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp	2021-11-16 11:41:05 UTC (rev 285857)
+++ trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp	2021-11-16 13:40:51 UTC (rev 285858)
@@ -488,10 +488,8 @@
 if (displayID != this->displayID())
 return;
 
-#if !PLATFORM(WPE) && !PLATFORM(GTK)
 if (!scrollingThreadIsActive)
 return;
-#endif
 
 ScrollingThread::dispatch([protectedThis = Ref { *this }]() {
 protectedThis->displayDidRefreshOnScrollingThread();






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [285205] trunk/Source/WebCore

2021-11-03 Thread clord
Title: [285205] trunk/Source/WebCore








Revision 285205
Author cl...@igalia.com
Date 2021-11-03 07:37:04 -0700 (Wed, 03 Nov 2021)


Log Message
[GTK][WPE] Use the display refresh to drive scrolling animations (sync scroll)
https://bugs.webkit.org/show_bug.cgi?id=232077

Reviewed by Simon Fraser.

Service sync scroll animations as part of the scroll phase in
Page::updateRendering, which is driven by the display refresh.

No new tests, covered by existing tests.

* dom/Document.cpp:
(WebCore::serviceScrollAnimationForScrollableArea):
(WebCore::Document::runScrollSteps):
* page/FrameView.cpp:
(WebCore::FrameView::didStartScrollAnimation):
* page/FrameView.h:
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::ScrollAnimator):
(WebCore::ScrollAnimator::startAnimationCallback):
(WebCore::ScrollAnimator::stopAnimationCallback):
(WebCore::ScrollAnimator::serviceScrollAnimation):
(WebCore::ScrollAnimator::scrollControllerAnimationTimerFired): Deleted.
* platform/ScrollAnimator.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::didStartScrollAnimation):
* platform/ScrollingEffectsController.cpp:
(WebCore::ScrollingEffectsController::retargetAnimatedScrollBy):
* rendering/RenderLayerScrollableArea.cpp:
(WebCore::RenderLayerScrollableArea::didStartScrollAnimation):
* rendering/RenderLayerScrollableArea.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::didStartScrollAnimation):
* rendering/RenderListBox.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/Document.cpp
trunk/Source/WebCore/page/FrameView.cpp
trunk/Source/WebCore/page/FrameView.h
trunk/Source/WebCore/platform/ScrollAnimator.cpp
trunk/Source/WebCore/platform/ScrollAnimator.h
trunk/Source/WebCore/platform/ScrollableArea.h
trunk/Source/WebCore/platform/ScrollingEffectsController.cpp
trunk/Source/WebCore/rendering/RenderLayerScrollableArea.cpp
trunk/Source/WebCore/rendering/RenderLayerScrollableArea.h
trunk/Source/WebCore/rendering/RenderListBox.cpp
trunk/Source/WebCore/rendering/RenderListBox.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (285204 => 285205)

--- trunk/Source/WebCore/ChangeLog	2021-11-03 13:37:55 UTC (rev 285204)
+++ trunk/Source/WebCore/ChangeLog	2021-11-03 14:37:04 UTC (rev 285205)
@@ -1,3 +1,39 @@
+2021-11-03  Chris Lord  
+
+[GTK][WPE] Use the display refresh to drive scrolling animations (sync scroll)
+https://bugs.webkit.org/show_bug.cgi?id=232077
+
+Reviewed by Simon Fraser.
+
+Service sync scroll animations as part of the scroll phase in
+Page::updateRendering, which is driven by the display refresh.
+
+No new tests, covered by existing tests.
+
+* dom/Document.cpp:
+(WebCore::serviceScrollAnimationForScrollableArea):
+(WebCore::Document::runScrollSteps):
+* page/FrameView.cpp:
+(WebCore::FrameView::didStartScrollAnimation):
+* page/FrameView.h:
+* platform/ScrollAnimator.cpp:
+(WebCore::ScrollAnimator::ScrollAnimator):
+(WebCore::ScrollAnimator::startAnimationCallback):
+(WebCore::ScrollAnimator::stopAnimationCallback):
+(WebCore::ScrollAnimator::serviceScrollAnimation):
+(WebCore::ScrollAnimator::scrollControllerAnimationTimerFired): Deleted.
+* platform/ScrollAnimator.h:
+* platform/ScrollableArea.h:
+(WebCore::ScrollableArea::didStartScrollAnimation):
+* platform/ScrollingEffectsController.cpp:
+(WebCore::ScrollingEffectsController::retargetAnimatedScrollBy):
+* rendering/RenderLayerScrollableArea.cpp:
+(WebCore::RenderLayerScrollableArea::didStartScrollAnimation):
+* rendering/RenderLayerScrollableArea.h:
+* rendering/RenderListBox.cpp:
+(WebCore::RenderListBox::didStartScrollAnimation):
+* rendering/RenderListBox.h:
+
 2021-11-03  Zalan Bujtas  
 
 [LFC][IFC] Display box builder should take visual order into account when computing horizontal positions


Modified: trunk/Source/WebCore/dom/Document.cpp (285204 => 285205)

--- trunk/Source/WebCore/dom/Document.cpp	2021-11-03 13:37:55 UTC (rev 285204)
+++ trunk/Source/WebCore/dom/Document.cpp	2021-11-03 14:37:04 UTC (rev 285205)
@@ -211,6 +211,7 @@
 #include "ScriptSourceCode.h"
 #include "ScriptState.h"
 #include "ScriptedAnimationController.h"
+#include "ScrollAnimator.h"
 #include "ScrollbarTheme.h"
 #include "ScrollingCoordinator.h"
 #include "SecurityOrigin.h"
@@ -4347,9 +4348,35 @@
 m_needsVisualViewportScrollEvent = true;
 }
 
+static bool serviceScrollAnimationForScrollableArea(ScrollableArea* scrollableArea, MonotonicTime time)
+{
+if (!scrollableArea)
+return false;
+
+if (auto* animator = scrollableArea->existingScrollAnimator())
+return animator->serviceScrollAnimation(time) == ScrollAnimationStatus::Animating;
+
+return false;
+}
+
 // https://drafts.csswg.org/cssom-view/#run-the-scroll-steps
 void Document::runScrollSteps()
 {
+// Service 

[webkit-changes] [285161] trunk/Source/WebCore

2021-11-02 Thread clord
Title: [285161] trunk/Source/WebCore








Revision 285161
Author cl...@igalia.com
Date 2021-11-02 08:59:13 -0700 (Tue, 02 Nov 2021)


Log Message
[GTK][WPE] Use the display refresh to drive scrolling animations (async scroll)
https://bugs.webkit.org/show_bug.cgi?id=232432

Reviewed by Simon Fraser.

Implement missing API in nicosia async scroll path to have scroll
animations driven by the display refresh instead of a 60Hz timer.

No new tests, covered by existing tests.

* page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:
(WebCore::ScrollingCoordinatorNicosia::didCompleteRenderingUpdate):
(WebCore::ScrollingCoordinatorNicosia::hasNodeWithAnimatedScrollChanged):
* page/scrolling/nicosia/ScrollingCoordinatorNicosia.h:
* page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::serviceScrollAnimation):
* page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:
* page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::serviceScrollAnimation):
* page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h:
* page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp:
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::startAnimationCallback):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::stopAnimationCallback):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::serviceScrollAnimation):
(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::animationTimerFired): Deleted.
* page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp
trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.h
trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp
trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h
trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp
trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h
trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp
trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (285160 => 285161)

--- trunk/Source/WebCore/ChangeLog	2021-11-02 15:56:29 UTC (rev 285160)
+++ trunk/Source/WebCore/ChangeLog	2021-11-02 15:59:13 UTC (rev 285161)
@@ -1,3 +1,32 @@
+2021-11-02  Chris Lord  
+
+[GTK][WPE] Use the display refresh to drive scrolling animations (async scroll)
+https://bugs.webkit.org/show_bug.cgi?id=232432
+
+Reviewed by Simon Fraser.
+
+Implement missing API in nicosia async scroll path to have scroll
+animations driven by the display refresh instead of a 60Hz timer.
+
+No new tests, covered by existing tests.
+
+* page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:
+(WebCore::ScrollingCoordinatorNicosia::didCompleteRenderingUpdate):
+(WebCore::ScrollingCoordinatorNicosia::hasNodeWithAnimatedScrollChanged):
+* page/scrolling/nicosia/ScrollingCoordinatorNicosia.h:
+* page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
+(WebCore::ScrollingTreeFrameScrollingNodeNicosia::serviceScrollAnimation):
+* page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:
+* page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
+(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::serviceScrollAnimation):
+* page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h:
+* page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp:
+(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::startAnimationCallback):
+(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::stopAnimationCallback):
+(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::serviceScrollAnimation):
+(WebCore::ScrollingTreeScrollingNodeDelegateNicosia::animationTimerFired): Deleted.
+* page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.h:
+
 2021-11-02  Alan Bujtas  
 
 [LFC][IFC] Line should keep track of whether the content needs visual reordering


Modified: trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp (285160 => 285161)

--- trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp	2021-11-02 15:56:29 UTC (rev 285160)
+++ trunk/Source/WebCore/page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp	2021-11-02 15:59:13 UTC (rev 285161)
@@ -102,6 +102,22 @@
 synchronizeStateFromScrollingTree();
 }
 
+void ScrollingCoordinatorNicosia::didCompleteRenderingUpdate()
+{
+downcast(scrollingTree())->didCompleteRenderingUpdate();
+
+// Scroll animations are driven by the 

[webkit-changes] [284778] trunk

2021-10-25 Thread clord
Title: [284778] trunk








Revision 284778
Author cl...@igalia.com
Date 2021-10-25 05:35:28 -0700 (Mon, 25 Oct 2021)


Log Message
[GTK][WPE] REGRESSION(r284596): Scrolling sometimes jumps to the top of the page during smooth mouse-wheel scrolling
https://bugs.webkit.org/show_bug.cgi?id=232229

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Make sure that retargeting a smooth scroll animation before a frame
callback is called works correctly.

Test: fast/scrolling/gtk/repeated-mouse-wheel-smooth.html

* platform/ScrollAnimationSmooth.cpp:
(WebCore::ScrollAnimationSmooth::startAnimatedScrollToDestination):

LayoutTests:

Add test to make sure that retargeted smooth scrolling doesn't jump to
the top of the page unexpectedly.

* fast/scrolling/gtk/repeated-mouse-wheel-smooth-expected.txt: Added.
* fast/scrolling/gtk/repeated-mouse-wheel-smooth.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/ScrollAnimationSmooth.cpp


Added Paths

trunk/LayoutTests/fast/scrolling/gtk/repeated-mouse-wheel-smooth-expected.txt
trunk/LayoutTests/fast/scrolling/gtk/repeated-mouse-wheel-smooth.html




Diff

Modified: trunk/LayoutTests/ChangeLog (284777 => 284778)

--- trunk/LayoutTests/ChangeLog	2021-10-25 12:11:45 UTC (rev 284777)
+++ trunk/LayoutTests/ChangeLog	2021-10-25 12:35:28 UTC (rev 284778)
@@ -1,3 +1,16 @@
+2021-10-25  Chris Lord  
+
+[GTK][WPE] REGRESSION(r284596): Scrolling sometimes jumps to the top of the page during smooth mouse-wheel scrolling
+https://bugs.webkit.org/show_bug.cgi?id=232229
+
+Reviewed by Carlos Garcia Campos.
+
+Add test to make sure that retargeted smooth scrolling doesn't jump to
+the top of the page unexpectedly.
+
+* fast/scrolling/gtk/repeated-mouse-wheel-smooth-expected.txt: Added.
+* fast/scrolling/gtk/repeated-mouse-wheel-smooth.html: Added.
+
 2021-10-25  Arcady Goldmints-Orlov  
 
 [GLIB] Update test baselines after r284521


Added: trunk/LayoutTests/fast/scrolling/gtk/repeated-mouse-wheel-smooth-expected.txt (0 => 284778)

--- trunk/LayoutTests/fast/scrolling/gtk/repeated-mouse-wheel-smooth-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/scrolling/gtk/repeated-mouse-wheel-smooth-expected.txt	2021-10-25 12:35:28 UTC (rev 284778)
@@ -0,0 +1,7 @@
+PASS Scroll downwards by 1 tick
+PASS Scroll downwards by another tick
+PASS Scroll downwards by two more ticks, interrupting the first
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/fast/scrolling/gtk/repeated-mouse-wheel-smooth.html (0 => 284778)

--- trunk/LayoutTests/fast/scrolling/gtk/repeated-mouse-wheel-smooth.html	(rev 0)
+++ trunk/LayoutTests/fast/scrolling/gtk/repeated-mouse-wheel-smooth.html	2021-10-25 12:35:28 UTC (rev 284778)
@@ -0,0 +1,78 @@
+
+
+
+
+  Repeated mouse-wheel scrolling does not scroll to top of page
+  
+
+
+
+