Diff
Modified: trunk/Source/WebCore/ChangeLog (229317 => 229318)
--- trunk/Source/WebCore/ChangeLog 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebCore/ChangeLog 2018-03-06 12:12:04 UTC (rev 229318)
@@ -1,5 +1,58 @@
2018-03-06 Zan Dobersek <zdober...@igalia.com>
+ [CoordGraphics] Remove unused scrolling-related code in TextureMapperLayer, CoordinatedGraphics stack
+ https://bugs.webkit.org/show_bug.cgi?id=183340
+
+ Reviewed by Michael Catanzaro.
+
+ TextureMapperLayer::scrollBy() method is completely unused and can be
+ removed. This opens the gates on removing majority of scrolling-related
+ code in TextureMapperLayer, CoordinatedGraphicsLayer and
+ CoordinatedGraphicsScene classes, along with smaller bits in other
+ closely-associated classes.
+
+ We're able to remove two virtual method overrides in the
+ ScrollingCoordinatorCoordinatedGraphics class.
+
+ TextureMapperLayer can drop the ScrollingClient member variable, along
+ with multiple others. Various unused methods in that class are removed
+ as well.
+
+ CoordinatedGraphicsLayer and GraphicsLayerTextureMapper can both remove
+ the custom scrolling state tracking.
+
+ No new tests -- no change in behavior.
+
+ * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
+ (WebCore::ScrollingCoordinatorCoordinatedGraphics::scrollableAreaScrollLayerDidChange): Deleted.
+ (WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea): Deleted.
+ * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:
+ * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
+ (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
+ (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
+ (WebCore::GraphicsLayerTextureMapper::didCommitScrollOffset): Deleted.
+ (WebCore::GraphicsLayerTextureMapper::setIsScrollable): Deleted.
+ * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
+ * platform/graphics/texmap/TextureMapperLayer.cpp:
+ (WebCore::TextureMapperLayer::hitTest): Deleted.
+ (WebCore::TextureMapperLayer::scrollableLayerHitTestCondition): Deleted.
+ (WebCore::TextureMapperLayer::findScrollableContentsLayerAt): Deleted.
+ (WebCore::TextureMapperLayer::mapScrollOffset): Deleted.
+ (WebCore::TextureMapperLayer::commitScrollOffset): Deleted.
+ (WebCore::TextureMapperLayer::scrollBy): Deleted.
+ (WebCore::TextureMapperLayer::didCommitScrollOffset): Deleted.
+ * platform/graphics/texmap/TextureMapperLayer.h:
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+ (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
+ (WebCore::CoordinatedGraphicsLayer::syncLayerState):
+ (WebCore::CoordinatedGraphicsLayer::resetLayerState):
+ (WebCore::CoordinatedGraphicsLayer::setScrollableArea): Deleted.
+ (WebCore::CoordinatedGraphicsLayer::commitScrollOffset): Deleted.
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
+ * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
+
+2018-03-06 Zan Dobersek <zdober...@igalia.com>
+
[CoordGraphics] Apply TextureMapperLayer animations with a single MonotonicTime value
https://bugs.webkit.org/show_bug.cgi?id=183360
Modified: trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp (229317 => 229318)
--- trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp 2018-03-06 12:12:04 UTC (rev 229318)
@@ -98,24 +98,6 @@
}
}
-void ScrollingCoordinatorCoordinatedGraphics::scrollableAreaScrollLayerDidChange(ScrollableArea& scrollableArea)
-{
- auto* layer = downcast<CoordinatedGraphicsLayer>(scrollLayerForScrollableArea(scrollableArea));
- if (!layer)
- return;
-
- layer->setScrollableArea(&scrollableArea);
-}
-
-void ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea(ScrollableArea& scrollableArea)
-{
- auto* layer = downcast<CoordinatedGraphicsLayer>(scrollLayerForScrollableArea(scrollableArea));
- if (!layer)
- return;
-
- layer->setScrollableArea(nullptr);
-}
-
bool ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate(FrameView& frameView, const IntPoint& scrollPosition)
{
if (!frameView.delegatesScrolling())
Modified: trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h (229317 => 229318)
--- trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h 2018-03-06 12:12:04 UTC (rev 229318)
@@ -45,9 +45,6 @@
void updateNodeLayer(ScrollingNodeID, GraphicsLayer*) override;
void updateNodeViewportConstraints(ScrollingNodeID, const ViewportConstraints&) override;
- void scrollableAreaScrollLayerDidChange(ScrollableArea&) override;
- void willDestroyScrollableArea(ScrollableArea&) override;
-
bool requestScrollPositionUpdate(FrameView&, const IntPoint&) override;
private:
Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp (229317 => 229318)
--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp 2018-03-06 12:12:04 UTC (rev 229318)
@@ -45,7 +45,6 @@
, m_fixedToViewport(false)
, m_debugBorderWidth(0)
, m_contentsLayer(0)
- , m_isScrollable(false)
{
}
@@ -344,24 +343,6 @@
notifyChange(DebugVisualsChange);
}
-void GraphicsLayerTextureMapper::didCommitScrollOffset(const IntSize& offset)
-{
- if (offset.isZero())
- return;
-
- m_committedScrollOffset = offset;
- notifyChange(CommittedScrollOffsetChange);
-}
-
-void GraphicsLayerTextureMapper::setIsScrollable(bool isScrollable)
-{
- if (m_isScrollable == isScrollable)
- return;
-
- m_isScrollable = isScrollable;
- notifyChange(IsScrollableChange);
-}
-
void GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly()
{
prepareBackingStoreIfNeeded();
@@ -486,12 +467,6 @@
if (m_changeMask & FixedToViewporChange)
m_layer.setFixedToViewport(fixedToViewport());
- if (m_changeMask & IsScrollableChange)
- m_layer.setIsScrollable(isScrollable());
-
- if (m_changeMask & CommittedScrollOffsetChange)
- m_layer.didCommitScrollOffset(m_committedScrollOffset);
-
m_changeMask = NoChanges;
}
Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h (229317 => 229318)
--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h 2018-03-06 12:12:04 UTC (rev 229318)
@@ -36,7 +36,6 @@
explicit GraphicsLayerTextureMapper(Type, GraphicsLayerClient&);
virtual ~GraphicsLayerTextureMapper();
- void setScrollClient(TextureMapperLayer::ScrollingClient* client) { m_layer.setScrollClient(client); }
void setID(uint32_t id) { m_layer.setID(id); }
// GraphicsLayer
@@ -89,10 +88,6 @@
TextureMapperLayer& layer() { return m_layer; }
- void didCommitScrollOffset(const IntSize&);
- void setIsScrollable(bool);
- bool isScrollable() const { return m_isScrollable; }
-
void setFixedToViewport(bool);
bool fixedToViewport() const { return m_fixedToViewport; }
@@ -155,9 +150,6 @@
FixedToViewporChange = (1L << 26),
AnimationStarted = (1L << 27),
-
- CommittedScrollOffsetChange = (1L << 28),
- IsScrollableChange = (1L << 29)
};
void notifyChange(ChangeMask);
@@ -178,9 +170,6 @@
FloatRect m_needsDisplayRect;
TextureMapperAnimations m_animations;
MonotonicTime m_animationStartTime;
-
- IntSize m_committedScrollOffset;
- bool m_isScrollable;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp (229317 => 229318)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp 2018-03-06 12:12:04 UTC (rev 229318)
@@ -703,77 +703,4 @@
m_currentTransform.setPosition(adjustedPosition());
}
-template<class HitTestCondition> TextureMapperLayer* TextureMapperLayer::hitTest(const FloatPoint& point, HitTestCondition condition)
-{
- if (!m_state.visible || !m_state.contentsVisible)
- return 0;
-
- TextureMapperLayer* result = 0;
- for (int i = m_children.size() - 1; !result && i >= 0; --i)
- result = m_children[i]->hitTest(point, condition);
-
- if (result)
- return result;
-
- return condition(this, point) ? this : 0;
}
-
-bool TextureMapperLayer::scrollableLayerHitTestCondition(TextureMapperLayer* layer, const FloatPoint& point)
-{
- // scrolling layer's m_parent->m_parent, the parent of the scrolling layes, is the one that defines the
- // rectangle to be used for hit testing.
- if (!layer->isScrollable() || !layer->m_parent || !layer->m_parent->m_parent)
- return false;
-
- TextureMapperLayer* parentLayer = layer->m_parent->m_parent;
- FloatRect rect = parentLayer->layerRect();
- return parentLayer->m_currentTransform.combined().mapQuad(rect).containsPoint(point);
-}
-
-TextureMapperLayer* TextureMapperLayer::findScrollableContentsLayerAt(const FloatPoint& point)
-{
- return hitTest(point, &TextureMapperLayer::scrollableLayerHitTestCondition);
-}
-
-FloatSize TextureMapperLayer::mapScrollOffset(const FloatSize& offset)
-{
- double zeroX, zeroY, offsetX, offsetY;
- TransformationMatrix transform = m_currentTransform.combined().inverse().value_or(TransformationMatrix());
- transform.map(0, 0, zeroX, zeroY);
- transform.map(offset.width(), offset.height(), offsetX, offsetY);
- return FloatSize(offsetX - zeroX, offsetY - zeroY);
-}
-
-void TextureMapperLayer::commitScrollOffset(const FloatSize& offset)
-{
- FloatSize fullOffset = m_accumulatedScrollOffsetFractionalPart + offset;
-
- int intWidth = round(fullOffset.width());
- int intHeight = round(fullOffset.height());
-
- // m_accumulatedScrollOffsetFractionalPart holds the fractional part of the user scroll offset that
- // has not yet been synced with the web process because the web process expects an IntSize.
- m_accumulatedScrollOffsetFractionalPart = FloatSize(fullOffset.width() - intWidth, fullOffset.height() - intHeight);
-
- m_scrollClient->commitScrollOffset(m_id, IntSize(intWidth, intHeight));
-}
-
-void TextureMapperLayer::scrollBy(const FloatSize& offset)
-{
- if (!isScrollable() || !m_scrollClient || offset.isZero())
- return;
-
- FloatSize scrollOffset = mapScrollOffset(offset);
- m_userScrollOffset += scrollOffset;
-
- m_currentTransform.setPosition(adjustedPosition());
- commitScrollOffset(scrollOffset);
-}
-
-void TextureMapperLayer::didCommitScrollOffset(const IntSize& offset)
-{
- m_userScrollOffset = FloatSize(m_userScrollOffset.width() - offset.width(), m_userScrollOffset.height() - offset.height());
- m_currentTransform.setPosition(adjustedPosition());
-}
-
-}
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h (229317 => 229318)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h 2018-03-06 12:12:04 UTC (rev 229318)
@@ -41,7 +41,6 @@
class ScrollingClient {
public:
- virtual void commitScrollOffset(uint32_t layerID, const IntSize& offset) = 0;
};
TextureMapperLayer()
@@ -53,8 +52,6 @@
, m_textureMapper(0)
, m_fixedToViewport(false)
, m_id(0)
- , m_scrollClient(0)
- , m_isScrollable(false)
, m_patternTransformDirty(false)
{ }
@@ -66,13 +63,6 @@
const Vector<TextureMapperLayer*>& children() const { return m_children; }
TextureMapperLayer* findScrollableContentsLayerAt(const FloatPoint& pos);
- void setScrollClient(ScrollingClient* scrollClient) { m_scrollClient = scrollClient; }
- void scrollBy(const WebCore::FloatSize&);
-
- void didCommitScrollOffset(const IntSize&);
- void setIsScrollable(bool isScrollable) { m_isScrollable = isScrollable; }
- bool isScrollable() const { return m_isScrollable; }
-
TextureMapper* textureMapper() const { return rootLayer().m_textureMapper; }
void setTextureMapper(TextureMapper* texmap) { m_textureMapper = texmap; }
@@ -143,7 +133,7 @@
static void sortByZOrder(Vector<TextureMapperLayer* >& array);
RefPtr<BitmapTexture> texture() { return m_backingStore ? m_backingStore->texture() : 0; }
- FloatPoint adjustedPosition() const { return m_state.pos + m_scrollPositionDelta - m_userScrollOffset; }
+ FloatPoint adjustedPosition() const { return m_state.pos + m_scrollPositionDelta; }
bool isAncestorFixedToViewport() const;
TransformationMatrix replicaTransform();
void removeFromParent();
@@ -194,12 +184,6 @@
FilterOperations m_currentFilters;
float m_centerZ;
- template<class HitTestCondition> TextureMapperLayer* hitTest(const FloatPoint&, HitTestCondition);
- static bool scrollableLayerHitTestCondition(TextureMapperLayer*, const FloatPoint&);
-
- FloatSize mapScrollOffset(const FloatSize&);
- void commitScrollOffset(const FloatSize&);
-
struct State {
FloatPoint pos;
FloatPoint3D anchorPoint;
@@ -253,10 +237,6 @@
FloatSize m_scrollPositionDelta;
bool m_fixedToViewport;
uint32_t m_id;
- ScrollingClient* m_scrollClient;
- bool m_isScrollable;
- FloatSize m_userScrollOffset;
- FloatSize m_accumulatedScrollOffsetFractionalPart;
TransformationMatrix m_patternTransform;
bool m_patternTransformDirty;
};
Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (229317 => 229318)
--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp 2018-03-06 12:12:04 UTC (rev 229318)
@@ -141,7 +141,6 @@
, m_compositedNativeImagePtr(0)
, m_platformLayer(0)
, m_animationStartedTimer(*this, &CoordinatedGraphicsLayer::animationStartedTimerFired)
- , m_scrollableArea(0)
{
static CoordinatedLayerID nextLayerID = 1;
m_id = nextLayerID++;
@@ -548,29 +547,6 @@
addRepaintRect(rect);
}
-void CoordinatedGraphicsLayer::setScrollableArea(ScrollableArea* scrollableArea)
-{
- bool oldScrollable = isScrollable();
- m_scrollableArea = scrollableArea;
- if (oldScrollable == isScrollable())
- return;
-
- m_layerState.isScrollable = isScrollable();
- m_layerState.flagsChanged = true;
- didChangeLayerState();
-}
-
-void CoordinatedGraphicsLayer::commitScrollOffset(const IntSize& offset)
-{
- if (!isScrollable() || offset.isZero())
- return;
-
- m_scrollableArea->notifyScrollPositionChanged(m_scrollableArea->scrollPosition() + offset);
- m_layerState.committedScrollOffset += offset;
- m_layerState.committedScrollOffsetChanged = true;
- didChangeLayerState();
-}
-
void CoordinatedGraphicsLayer::setFixedToViewport(bool isFixed)
{
if (m_fixedToViewport == isFixed)
@@ -669,7 +645,6 @@
m_layerState.masksToBounds = masksToBounds();
m_layerState.preserves3D = preserves3D();
m_layerState.fixedToViewport = fixedToViewport();
- m_layerState.isScrollable = isScrollable();
}
if (m_layerState.debugVisualsChanged) {
@@ -775,7 +750,6 @@
m_layerState.tilesToCreate.clear();
m_layerState.tilesToRemove.clear();
m_layerState.tilesToUpdate.clear();
- m_layerState.committedScrollOffset = IntSize();
}
bool CoordinatedGraphicsLayer::imageBackingVisible()
Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h (229317 => 229318)
--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h 2018-03-06 12:12:04 UTC (rev 229318)
@@ -44,7 +44,6 @@
namespace WebCore {
class CoordinatedGraphicsLayer;
class TextureMapperAnimations;
-class ScrollableArea;
class CoordinatedGraphicsLayerClient {
public:
@@ -120,10 +119,6 @@
void setVisibleContentRectTrajectoryVector(const FloatPoint&);
- void setScrollableArea(ScrollableArea*);
- bool isScrollable() const { return !!m_scrollableArea; }
- void commitScrollOffset(const IntSize&);
-
CoordinatedLayerID id() const { return m_id; }
void setFixedToViewport(bool isFixed);
@@ -229,8 +224,6 @@
Timer m_animationStartedTimer;
TextureMapperAnimations m_animations;
MonotonicTime m_lastAnimationStartTime;
-
- ScrollableArea* m_scrollableArea;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h (229317 => 229318)
--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h 2018-03-06 12:12:04 UTC (rev 229318)
@@ -103,7 +103,6 @@
bool platformLayerUpdated: 1;
bool platformLayerShouldSwapBuffers: 1;
bool isScrollableChanged: 1;
- bool committedScrollOffsetChanged: 1;
bool contentsTilingChanged: 1;
};
unsigned changeMask;
@@ -170,8 +169,6 @@
RefPtr<TextureMapperPlatformLayerProxy> platformLayerProxy;
#endif
- IntSize committedScrollOffset;
-
bool hasPendingChanges() const
{
return changeMask || tilesToUpdate.size() || tilesToRemove.size() || tilesToCreate.size();
Modified: trunk/Source/WebKit/ChangeLog (229317 => 229318)
--- trunk/Source/WebKit/ChangeLog 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebKit/ChangeLog 2018-03-06 12:12:04 UTC (rev 229318)
@@ -1,5 +1,39 @@
2018-03-06 Zan Dobersek <zdober...@igalia.com>
+ [CoordGraphics] Remove unused scrolling-related code in TextureMapperLayer, CoordinatedGraphics stack
+ https://bugs.webkit.org/show_bug.cgi?id=183340
+
+ Reviewed by Michael Catanzaro.
+
+ With most of the scrolling-related code in TextureMapperLayer on the
+ chopping block, we can now drop the ScrollingClient inheritance and the
+ commitScrollOffset() virtual method implementation. This enables
+ removing the whole commitScrollOffset() call chain that ran from
+ CoordinatedGraphicsScene through CoordinatedLayerTreeHost and
+ CompositingCoordinator to the affected CoordinatedGraphicsLayer object.
+
+ The CoordinatedGraphicsScene::findScrollableContentsLayerAt() method is
+ also unused and can be deleted.
+
+ * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
+ (WebKit::CoordinatedGraphicsScene::setLayerState):
+ (WebKit::CoordinatedGraphicsScene::createLayer):
+ (WebKit::CoordinatedGraphicsScene::commitScrollOffset): Deleted.
+ (WebKit::CoordinatedGraphicsScene::findScrollableContentsLayerAt): Deleted.
+ * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
+ * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
+ (WebKit::ThreadedCompositor::commitScrollOffset): Deleted.
+ * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
+ * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
+ (WebKit::CompositingCoordinator::commitScrollOffset): Deleted.
+ * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
+ * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
+ (WebKit::CoordinatedLayerTreeHost::commitScrollOffset): Deleted.
+ * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
+ * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
+
+2018-03-06 Zan Dobersek <zdober...@igalia.com>
+
[CoordGraphics] Apply TextureMapperLayer animations with a single MonotonicTime value
https://bugs.webkit.org/show_bug.cgi?id=183360
Modified: trunk/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp (229317 => 229318)
--- trunk/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp 2018-03-06 12:12:04 UTC (rev 229318)
@@ -274,13 +274,8 @@
else
m_fixedLayers.remove(id);
}
-
- layer->setIsScrollable(layerState.isScrollable);
}
- if (layerState.committedScrollOffsetChanged)
- layer->didCommitScrollOffset(layerState.committedScrollOffset);
-
prepareContentBackingStore(layer, commitScope);
// Apply Operations.
@@ -309,7 +304,6 @@
{
std::unique_ptr<TextureMapperLayer> newLayer = std::make_unique<TextureMapperLayer>();
newLayer->setID(id);
- newLayer->setScrollClient(this);
m_layers.add(id, WTFMove(newLayer));
}
@@ -598,16 +592,6 @@
m_backingStores.clear();
}
-void CoordinatedGraphicsScene::commitScrollOffset(uint32_t layerID, const IntSize& offset)
-{
- if (!m_client)
- return;
- dispatchOnMainThread([this, layerID, offset] {
- if (m_client)
- m_client->commitScrollOffset(layerID, offset);
- });
-}
-
void CoordinatedGraphicsScene::setLayerAnimationsIfNeeded(TextureMapperLayer* layer, const CoordinatedGraphicsLayerState& state)
{
if (!state.animationsChanged)
@@ -633,11 +617,6 @@
renderNextFrame();
}
-TextureMapperLayer* CoordinatedGraphicsScene::findScrollableContentsLayerAt(const FloatPoint& point)
-{
- return rootLayer() ? rootLayer()->findScrollableContentsLayerAt(point) : 0;
-}
-
} // namespace WebKit
#endif // USE(COORDINATED_GRAPHICS)
Modified: trunk/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h (229317 => 229318)
--- trunk/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h 2018-03-06 12:12:04 UTC (rev 229318)
@@ -61,10 +61,9 @@
virtual ~CoordinatedGraphicsSceneClient() { }
virtual void renderNextFrame() = 0;
virtual void updateViewport() = 0;
- virtual void commitScrollOffset(uint32_t layerID, const WebCore::IntSize& offset) = 0;
};
-class CoordinatedGraphicsScene : public ThreadSafeRefCounted<CoordinatedGraphicsScene>, public WebCore::TextureMapperLayer::ScrollingClient
+class CoordinatedGraphicsScene : public ThreadSafeRefCounted<CoordinatedGraphicsScene>
#if USE(COORDINATED_GRAPHICS_THREADED)
, public WebCore::TextureMapperPlatformLayerProxy::Compositor
#endif
@@ -77,10 +76,6 @@
void paintToCurrentGLContext(const WebCore::TransformationMatrix&, float, const WebCore::FloatRect&, const WebCore::Color& backgroundColor, bool drawsBackground, const WebCore::FloatPoint&, WebCore::TextureMapper::PaintFlags = 0);
void detach();
- WebCore::TextureMapperLayer* findScrollableContentsLayerAt(const WebCore::FloatPoint&);
-
- void commitScrollOffset(uint32_t layerID, const WebCore::IntSize& offset) override;
-
// The painting thread must lock the main thread to use below two methods, because two methods access members that the main thread manages. See m_client.
// Currently, QQuickWebPage::updatePaintNode() locks the main thread before calling both methods.
void purgeGLResources();
Modified: trunk/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp (229317 => 229318)
--- trunk/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp 2018-03-06 12:12:04 UTC (rev 229318)
@@ -169,12 +169,6 @@
m_client.renderNextFrame();
}
-void ThreadedCompositor::commitScrollOffset(uint32_t layerID, const IntSize& offset)
-{
- ASSERT(RunLoop::isMain());
- m_client.commitScrollOffset(layerID, offset);
-}
-
void ThreadedCompositor::updateViewport()
{
m_compositingRunLoop->scheduleUpdate();
Modified: trunk/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h (229317 => 229318)
--- trunk/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h 2018-03-06 12:12:04 UTC (rev 229318)
@@ -56,7 +56,6 @@
class Client {
public:
virtual void renderNextFrame() = 0;
- virtual void commitScrollOffset(uint32_t layerID, const WebCore::IntSize& offset) = 0;
virtual uint64_t nativeSurfaceHandleForCompositing() = 0;
virtual void didDestroyGLContext() = 0;
@@ -97,7 +96,6 @@
// CoordinatedGraphicsSceneClient
void renderNextFrame() override;
void updateViewport() override;
- void commitScrollOffset(uint32_t layerID, const WebCore::IntSize& offset) override;
void renderLayerTree();
void sceneUpdateFinished();
Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp (229317 => 229318)
--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp 2018-03-06 12:12:04 UTC (rev 229318)
@@ -354,12 +354,6 @@
notifyFlushRequired(layer);
}
-void CompositingCoordinator::commitScrollOffset(uint32_t layerID, const WebCore::IntSize& offset)
-{
- if (auto* layer = m_registeredLayers.get(layerID))
- layer->commitScrollOffset(offset);
-}
-
void CompositingCoordinator::renderNextFrame()
{
for (auto& atlas : m_updateAtlases)
Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h (229317 => 229318)
--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h 2018-03-06 12:12:04 UTC (rev 229318)
@@ -79,7 +79,6 @@
void setVisibleContentsRect(const WebCore::FloatRect&, const WebCore::FloatPoint&);
void renderNextFrame();
- void commitScrollOffset(uint32_t layerID, const WebCore::IntSize& offset);
void createRootLayer(const WebCore::IntSize&);
WebCore::GraphicsLayer* rootLayer() const { return m_rootLayer.get(); }
Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp (229317 => 229318)
--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp 2018-03-06 12:12:04 UTC (rev 229318)
@@ -236,11 +236,6 @@
m_layerFlushTimer.startOneShot(1_s * m_coordinator.nextAnimationServiceTime());
}
-void CoordinatedLayerTreeHost::commitScrollOffset(uint32_t layerID, const WebCore::IntSize& offset)
-{
- m_coordinator.commitScrollOffset(layerID, offset);
-}
-
void CoordinatedLayerTreeHost::clearUpdateAtlases()
{
m_coordinator.clearUpdateAtlases();
Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h (229317 => 229318)
--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h 2018-03-06 12:12:04 UTC (rev 229318)
@@ -61,7 +61,6 @@
void setVisibleContentsRect(const WebCore::FloatRect&, const WebCore::FloatPoint&);
void renderNextFrame();
- void commitScrollOffset(uint32_t layerID, const WebCore::IntSize& offset);
WebCore::GraphicsLayerFactory* graphicsLayerFactory() override;
Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h (229317 => 229318)
--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h 2018-03-06 11:51:53 UTC (rev 229317)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h 2018-03-06 12:12:04 UTC (rev 229318)
@@ -85,11 +85,6 @@
m_layerTreeHost.renderNextFrame();
}
- void commitScrollOffset(uint32_t layerID, const WebCore::IntSize& offset) override
- {
- m_layerTreeHost.commitScrollOffset(layerID, offset);
- }
-
uint64_t nativeSurfaceHandleForCompositing() override
{
return m_layerTreeHost.nativeSurfaceHandleForCompositing();