Title: [230913] trunk/Source
Revision
230913
Author
[email protected]
Date
2018-04-23 07:16:00 -0700 (Mon, 23 Apr 2018)

Log Message

[CoordGraphics] Remove unused trajectory cruft in CoordinatedLayerTreeHost, CoordinatedGraphicsLayer
https://bugs.webkit.org/show_bug.cgi?id=184881

Reviewed by Michael Catanzaro.

Source/WebCore:

Remove the redundant findFirstDescendantWithContentsRecursively() and
setVisibleContentRectTrajectoryVector() methods on the
CoordinatedGraphicsLayer class.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::findFirstDescendantWithContentsRecursively): Deleted.
(WebCore::CoordinatedGraphicsLayer::setVisibleContentRectTrajectoryVector): Deleted.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

Source/WebKit:

The CompositingCoordinator::setVisibleContentsRect() method is always
called with a (0,0) FloatPoint value as the trajectory vector parameter,
which is already the default value in TiledBackingStore where this ends
up. Removing this call chain also enables removing some unnecessary and
odd code in the CoordinatedGraphicsLayer class.

This doesn't yet touch the trajectory logic in the TiledBackingStore
class since it's not yet a given this won't be used in the future. But
if that will be necessary, hope is to not use it this way.

* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::setVisibleContentsRect):
(WebKit::CompositingCoordinator::mainContentsLayer): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::didChangeViewport):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (230912 => 230913)


--- trunk/Source/WebCore/ChangeLog	2018-04-23 14:12:24 UTC (rev 230912)
+++ trunk/Source/WebCore/ChangeLog	2018-04-23 14:16:00 UTC (rev 230913)
@@ -1,5 +1,21 @@
 2018-04-23  Zan Dobersek  <[email protected]>
 
+        [CoordGraphics] Remove unused trajectory cruft in CoordinatedLayerTreeHost, CoordinatedGraphicsLayer
+        https://bugs.webkit.org/show_bug.cgi?id=184881
+
+        Reviewed by Michael Catanzaro.
+
+        Remove the redundant findFirstDescendantWithContentsRecursively() and
+        setVisibleContentRectTrajectoryVector() methods on the
+        CoordinatedGraphicsLayer class.
+
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+        (WebCore::CoordinatedGraphicsLayer::findFirstDescendantWithContentsRecursively): Deleted.
+        (WebCore::CoordinatedGraphicsLayer::setVisibleContentRectTrajectoryVector): Deleted.
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
+
+2018-04-23  Zan Dobersek  <[email protected]>
+
         [CoordGraphics] TiledBackingStore unnecessarily tracks alpha support value
         https://bugs.webkit.org/show_bug.cgi?id=184880
 

Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (230912 => 230913)


--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp	2018-04-23 14:12:24 UTC (rev 230912)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp	2018-04-23 14:16:00 UTC (rev 230913)
@@ -801,28 +801,6 @@
     m_layerState.imageChanged = true;
 }
 
-CoordinatedGraphicsLayer* CoordinatedGraphicsLayer::findFirstDescendantWithContentsRecursively()
-{
-    if (shouldHaveBackingStore())
-        return this;
-
-    for (auto& child : children()) {
-        if (CoordinatedGraphicsLayer* layer = downcast<CoordinatedGraphicsLayer>(*child).findFirstDescendantWithContentsRecursively())
-            return layer;
-    }
-
-    return nullptr;
-}
-
-void CoordinatedGraphicsLayer::setVisibleContentRectTrajectoryVector(const FloatPoint& trajectoryVector)
-{
-    if (!m_mainBackingStore)
-        return;
-
-    m_mainBackingStore->setTrajectoryVector(trajectoryVector);
-    setNeedsVisibleRectAdjustment();
-}
-
 void CoordinatedGraphicsLayer::deviceOrPageScaleFactorChanged()
 {
     if (shouldHaveBackingStore())

Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h (230912 => 230913)


--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h	2018-04-23 14:12:24 UTC (rev 230912)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h	2018-04-23 14:16:00 UTC (rev 230913)
@@ -116,8 +116,6 @@
     FloatPoint computePositionRelativeToBase();
     void computePixelAlignment(FloatPoint& position, FloatSize&, FloatPoint3D& anchorPoint, FloatSize& alignmentOffset);
 
-    void setVisibleContentRectTrajectoryVector(const FloatPoint&);
-
     CoordinatedLayerID id() const { return m_id; }
 
     void setFixedToViewport(bool isFixed);
@@ -135,8 +133,6 @@
     void setNeedsVisibleRectAdjustment();
     void purgeBackingStores();
 
-    CoordinatedGraphicsLayer* findFirstDescendantWithContentsRecursively();
-
 private:
     bool isCoordinatedGraphicsLayer() const override { return true; }
 

Modified: trunk/Source/WebKit/ChangeLog (230912 => 230913)


--- trunk/Source/WebKit/ChangeLog	2018-04-23 14:12:24 UTC (rev 230912)
+++ trunk/Source/WebKit/ChangeLog	2018-04-23 14:16:00 UTC (rev 230913)
@@ -1,3 +1,30 @@
+2018-04-23  Zan Dobersek  <[email protected]>
+
+        [CoordGraphics] Remove unused trajectory cruft in CoordinatedLayerTreeHost, CoordinatedGraphicsLayer
+        https://bugs.webkit.org/show_bug.cgi?id=184881
+
+        Reviewed by Michael Catanzaro.
+
+        The CompositingCoordinator::setVisibleContentsRect() method is always
+        called with a (0,0) FloatPoint value as the trajectory vector parameter,
+        which is already the default value in TiledBackingStore where this ends
+        up. Removing this call chain also enables removing some unnecessary and
+        odd code in the CoordinatedGraphicsLayer class.
+
+        This doesn't yet touch the trajectory logic in the TiledBackingStore
+        class since it's not yet a given this won't be used in the future. But
+        if that will be necessary, hope is to not use it this way.
+
+        * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
+        (WebKit::CompositingCoordinator::setVisibleContentsRect):
+        (WebKit::CompositingCoordinator::mainContentsLayer): Deleted.
+        * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
+        (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
+        * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
+        (WebKit::ThreadedCoordinatedLayerTreeHost::didChangeViewport):
+
 2018-04-23  Fujii Hironori  <[email protected]>
 
         [Win][WK2] REGRESSION(r230834) 'getpid': identifier not found

Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp (230912 => 230913)


--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp	2018-04-23 14:12:24 UTC (rev 230912)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp	2018-04-23 14:16:00 UTC (rev 230913)
@@ -275,20 +275,8 @@
     return m_visibleContentsRect;
 }
 
-CoordinatedGraphicsLayer* CompositingCoordinator::mainContentsLayer()
+void CompositingCoordinator::setVisibleContentsRect(const FloatRect& rect)
 {
-    if (!is<CoordinatedGraphicsLayer>(m_rootCompositingLayer))
-        return nullptr;
-
-    return downcast<CoordinatedGraphicsLayer>(*m_rootCompositingLayer).findFirstDescendantWithContentsRecursively();
-}
-
-void CompositingCoordinator::setVisibleContentsRect(const FloatRect& rect, const FloatPoint& trajectoryVector)
-{
-    // A zero trajectoryVector indicates that tiles all around the viewport are requested.
-    if (CoordinatedGraphicsLayer* contentsLayer = mainContentsLayer())
-        contentsLayer->setVisibleContentRectTrajectoryVector(trajectoryVector);
-
     bool contentsRectDidChange = rect != m_visibleContentsRect;
     if (contentsRectDidChange) {
         m_visibleContentsRect = rect;

Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h (230912 => 230913)


--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h	2018-04-23 14:12:24 UTC (rev 230912)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h	2018-04-23 14:16:00 UTC (rev 230913)
@@ -73,13 +73,12 @@
     void sizeDidChange(const WebCore::IntSize&);
     void deviceOrPageScaleFactorChanged();
 
-    void setVisibleContentsRect(const WebCore::FloatRect&, const WebCore::FloatPoint&);
+    void setVisibleContentsRect(const WebCore::FloatRect&);
     void renderNextFrame();
 
     void createRootLayer(const WebCore::IntSize&);
     WebCore::GraphicsLayer* rootLayer() const { return m_rootLayer.get(); }
     WebCore::GraphicsLayer* rootCompositingLayer() const { return m_rootCompositingLayer; }
-    WebCore::CoordinatedGraphicsLayer* mainContentsLayer();
 
     void forceFrameSync() { m_shouldSyncFrame = true; }
 

Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp (230912 => 230913)


--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp	2018-04-23 14:12:24 UTC (rev 230912)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp	2018-04-23 14:16:00 UTC (rev 230913)
@@ -139,9 +139,9 @@
     scheduleLayerFlush();
 }
 
-void CoordinatedLayerTreeHost::setVisibleContentsRect(const FloatRect& rect, const FloatPoint& trajectoryVector)
+void CoordinatedLayerTreeHost::setVisibleContentsRect(const FloatRect& rect)
 {
-    m_coordinator.setVisibleContentsRect(rect, trajectoryVector);
+    m_coordinator.setVisibleContentsRect(rect);
     scheduleLayerFlush();
 }
 

Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h (230912 => 230913)


--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h	2018-04-23 14:12:24 UTC (rev 230912)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h	2018-04-23 14:16:00 UTC (rev 230913)
@@ -57,7 +57,7 @@
     void deviceOrPageScaleFactorChanged() override;
     void pageBackgroundTransparencyChanged() override;
 
-    void setVisibleContentsRect(const WebCore::FloatRect&, const WebCore::FloatPoint&);
+    void setVisibleContentsRect(const WebCore::FloatRect&);
     void renderNextFrame();
 
     WebCore::GraphicsLayerFactory* graphicsLayerFactory() override;

Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp (230912 => 230913)


--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp	2018-04-23 14:12:24 UTC (rev 230912)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp	2018-04-23 14:16:00 UTC (rev 230913)
@@ -224,7 +224,7 @@
     if (scrollbar && !scrollbar->isOverlayScrollbar())
         visibleRect.expand(0, scrollbar->height());
 
-    CoordinatedLayerTreeHost::setVisibleContentsRect(visibleRect, FloatPoint::zero());
+    CoordinatedLayerTreeHost::setVisibleContentsRect(visibleRect);
 
     float pageScale = m_viewportController.pageScaleFactor();
     IntPoint scrollPosition = roundedIntPoint(visibleRect.location());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to