[CoordGraphics] Fix compilation errors around USE(COORDINATED_GRAPHICS)
authordon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jun 2018 18:36:47 +0000 (18:36 +0000)
committerdon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jun 2018 18:36:47 +0000 (18:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=186374

Reviewed by Žan Doberšek.

Source/WebCore:

No new tests. No change in behavior.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
(WebCore::AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions):
* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
* page/scrolling/coordinatedgraphics/ScrollingTreeFixedNode.cpp:
* page/scrolling/coordinatedgraphics/ScrollingTreeStickyNode.cpp:
* platform/PlatformWheelEvent.h:
* platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp:
* platform/graphics/nicosia/NicosiaPaintingEngineThreaded.h:
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
* platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:

Source/WebKit:

* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::sceneUpdateFinished):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232590 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp
Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFixedNode.cpp
Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeStickyNode.cpp
Source/WebCore/platform/PlatformWheelEvent.h
Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp
Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngineThreaded.h
Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp

index 213ec82..73796a9 100644 (file)
@@ -1,3 +1,24 @@
+2018-06-07  Don Olmstead  <don.olmstead@sony.com>
+
+        [CoordGraphics] Fix compilation errors around USE(COORDINATED_GRAPHICS)
+        https://bugs.webkit.org/show_bug.cgi?id=186374
+
+        Reviewed by Žan Doberšek.
+
+        No new tests. No change in behavior.
+
+        * page/scrolling/AsyncScrollingCoordinator.cpp:
+        (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
+        (WebCore::AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions):
+        * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
+        * page/scrolling/coordinatedgraphics/ScrollingTreeFixedNode.cpp:
+        * page/scrolling/coordinatedgraphics/ScrollingTreeStickyNode.cpp:
+        * platform/PlatformWheelEvent.h:
+        * platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp:
+        * platform/graphics/nicosia/NicosiaPaintingEngineThreaded.h:
+        * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
+        * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
+
 2018-06-07  Thibault Saunier  <tsaunier@igalia.com> and Alejandro G. Castro  <alex@igalia.com>
 
         [GTK][WPE] Start implementing MediaStream API
index 0bf3197..38b0826 100644 (file)
@@ -46,6 +46,7 @@
 #include "ScrollingStateTree.h"
 #include "Settings.h"
 #include "WheelEventTestTrigger.h"
+#include <wtf/ProcessID.h>
 #include <wtf/text/TextStream.h>
 
 namespace WebCore {
@@ -369,7 +370,7 @@ void AsyncScrollingCoordinator::reconcileScrollingState(FrameView& frameView, co
     bool oldProgrammaticScroll = frameView.inProgrammaticScroll();
     frameView.setInProgrammaticScroll(programmaticScroll);
 
-    LOG_WITH_STREAM(Scrolling, stream << getpid() << " AsyncScrollingCoordinator " << this << " reconcileScrollingState scrollPosition " << scrollPosition << " programmaticScroll " << programmaticScroll << " stability " << viewportRectStability << " " << scrollingLayerPositionAction);
+    LOG_WITH_STREAM(Scrolling, stream << getCurrentProcessID() << " AsyncScrollingCoordinator " << this << " reconcileScrollingState scrollPosition " << scrollPosition << " programmaticScroll " << programmaticScroll << " stability " << viewportRectStability << " " << scrollingLayerPositionAction);
 
     std::optional<FloatRect> layoutViewportRect;
 
@@ -492,7 +493,7 @@ void AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions(const
     if (!m_scrollingStateTree->rootStateNode())
         return;
 
-    LOG_WITH_STREAM(Scrolling, stream << getpid() << " AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions for viewport rect " << viewportRect);
+    LOG_WITH_STREAM(Scrolling, stream << getCurrentProcessID() << " AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions for viewport rect " << viewportRect);
 
     m_scrollingStateTree->rootStateNode()->reconcileLayerPositionForViewportRect(viewportRect, action);
 }
index d23f378..8303536 100644 (file)
@@ -28,7 +28,7 @@
 #include "config.h"
 #include "ScrollingCoordinatorCoordinatedGraphics.h"
 
-#if USE(COORDINATED_GRAPHICS)
+#if ENABLE(ASYNC_SCROLLING) && USE(COORDINATED_GRAPHICS)
 
 #include "ScrollingThread.h"
 #include "ScrollingTreeCoordinatedGraphics.h"
@@ -93,4 +93,4 @@ void ScrollingCoordinatorCoordinatedGraphics::commitTreeState()
 
 } // namespace WebCore
 
-#endif // USE(COORDINATED_GRAPHICS)
+#endif // ENABLE(ASYNC_SCROLLING) && USE(COORDINATED_GRAPHICS)
index 2408170..22cd1ff 100644 (file)
@@ -30,6 +30,8 @@
 
 #if ENABLE(ASYNC_SCROLLING) && USE(COORDINATED_GRAPHICS)
 
+#include "ScrollingTree.h"
+
 namespace WebCore {
 
 Ref<ScrollingTreeFixedNode> ScrollingTreeFixedNode::create(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
index 25a7689..0322e67 100644 (file)
@@ -30,6 +30,8 @@
 
 #if ENABLE(ASYNC_SCROLLING) && USE(COORDINATED_GRAPHICS)
 
+#include "ScrollingTree.h"
+
 namespace WebCore {
 
 Ref<ScrollingTreeStickyNode> ScrollingTreeStickyNode::create(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
index e1d2d3b..9003225 100644 (file)
@@ -48,7 +48,7 @@ enum PlatformWheelEventGranularity : uint8_t {
     ScrollByPixelWheelEvent,
 };
 
-#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)
+#if ENABLE(ASYNC_SCROLLING)
 
 enum PlatformWheelEventPhase : uint8_t {
     PlatformWheelEventPhaseNone = 0,
@@ -146,7 +146,7 @@ public:
     bool useLatchedEventElement() const { return false; }
 #endif
 
-#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)
+#if ENABLE(ASYNC_SCROLLING)
     PlatformWheelEventPhase phase() const { return m_phase; }
     PlatformWheelEventPhase momentumPhase() const { return m_momentumPhase; }
     bool isEndOfNonMomentumScroll() const;
@@ -171,7 +171,7 @@ protected:
     // Scrolling velocity in pixels per second.
     FloatSize m_scrollingVelocity;
 
-#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)
+#if ENABLE(ASYNC_SCROLLING)
     PlatformWheelEventPhase m_phase { PlatformWheelEventPhaseNone };
     PlatformWheelEventPhase m_momentumPhase { PlatformWheelEventPhaseNone };
 #endif
index 64617ff..b72895c 100644 (file)
@@ -29,6 +29,8 @@
 #include "config.h"
 #include "NicosiaPaintingEngineThreaded.h"
 
+#if USE(COORDINATED_GRAPHICS_THREADED)
+
 #include "GraphicsContext.h"
 #include "GraphicsLayer.h"
 #include "NicosiaBuffer.h"
@@ -102,3 +104,5 @@ bool PaintingEngineThreaded::paint(GraphicsLayer& layer, Ref<Buffer>&& buffer, c
 }
 
 } // namespace Nicosia
+
+#endif // USE(COORDINATED_GRAPHICS_THREADED)
index 391c8cc..2f1ff80 100644 (file)
@@ -28,6 +28,8 @@
 
 #pragma once
 
+#if USE(COORDINATED_GRAPHICS_THREADED)
+
 #include "NicosiaPaintingEngine.h"
 
 typedef struct _GThreadPool GThreadPool;
@@ -46,3 +48,5 @@ private:
 };
 
 } // namespace Nicosia
+
+#endif // USE(COORDINATED_GRAPHICS_THREADED)
index 0834988..c66e463 100644 (file)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "TextureMapperPlatformLayerBuffer.h"
 
+#if USE(COORDINATED_GRAPHICS_THREADED)
+
 #include "NotImplemented.h"
 
 namespace WebCore {
@@ -80,3 +82,5 @@ void TextureMapperPlatformLayerBuffer::paintToTextureMapper(TextureMapper& textu
 }
 
 } // namespace WebCore
+
+#endif // USE(COORDINATED_GRAPHICS_THREADED)
index 7c8069d..8b9455a 100644 (file)
 
 #pragma once
 
+#if USE(COORDINATED_GRAPHICS_THREADED)
+
 #include "BitmapTextureGL.h"
 #include "TextureMapperGLHeaders.h"
 #include "TextureMapperPlatformLayer.h"
 #include <wtf/MonotonicTime.h>
 
-#if USE(COORDINATED_GRAPHICS_THREADED)
-
 namespace WebCore {
 
 class TextureMapperPlatformLayerBuffer : public TextureMapperPlatformLayer {
@@ -80,4 +80,4 @@ private:
 
 } // namespace WebCore
 
-#endif // COORDINATED_GRAPHICS_THREADED
+#endif // USE(COORDINATED_GRAPHICS_THREADED)
index bc353f0..948f13b 100644 (file)
@@ -1,3 +1,13 @@
+2018-06-07  Don Olmstead  <don.olmstead@sony.com>
+
+        [CoordGraphics] Fix compilation errors around USE(COORDINATED_GRAPHICS)
+        https://bugs.webkit.org/show_bug.cgi?id=186374
+
+        Reviewed by Žan Doberšek.
+
+        * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
+        (WebKit::ThreadedCompositor::sceneUpdateFinished):
+
 2018-06-07  Brent Fulgham  <bfulgham@apple.com>
 
         Remove unused debug mode conditions
index e721000..17b8de9 100644 (file)
@@ -267,15 +267,21 @@ void ThreadedCompositor::sceneUpdateFinished()
     {
         LockHolder locker(m_attributes.lock);
         shouldDispatchDisplayRefreshCallback = m_attributes.clientRendersNextFrame
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
             || m_displayRefreshMonitor->requiresDisplayRefreshCallback();
+#else
+            ;
+#endif
         shouldCoordinateUpdateCompletionWithClient = m_attributes.coordinateUpdateCompletionWithClient;
     }
 
     LockHolder stateLocker(m_compositingRunLoop->stateLock());
 
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
     // Schedule the DisplayRefreshMonitor callback, if necessary.
     if (shouldDispatchDisplayRefreshCallback)
         m_displayRefreshMonitor->dispatchDisplayRefreshCallback();
+#endif
 
     // Mark the scene update as completed if no coordination is required and if not in a forced repaint.
     if (!shouldCoordinateUpdateCompletionWithClient && !m_inForceRepaint)