Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8ff9ee25d0ec06f7173aa827b6bf4307ffe400b8
      
https://github.com/WebKit/WebKit/commit/8ff9ee25d0ec06f7173aa827b6bf4307ffe400b8
  Author: Simon Fraser <[email protected]>
  Date:   2026-04-22 (Wed, 22 Apr 2026)

  Changed paths:
    M Source/WebCore/page/scrolling/ScrollingTree.cpp
    M Source/WebCore/page/scrolling/ScrollingTree.h

  Log Message:
  -----------
  Avoid updating UI-side layer positions for no-op transactions
https://bugs.webkit.org/show_bug.cgi?id=312959
rdar://175308880

Reviewed by Brent Fulgham.

Currently, after every RemoteLayerTree commit that is received by the UI 
process,
we call `applyScrollingTreeLayerPositionsAfterCommit()`, which traverses the 
scrolling
tree and updates CALayer positions.

If the transaction contains no scrolling tree changes, then this is not 
necessary;
`applyLayerPositions()` only needs to be called after a scrolling tree state 
change,
or after a user scroll.

Track this state via `ScrollingTree::m_needsApplyLayerPositions()`, and set the 
flag
under `commitTreeState()` and `scrollingTreeNodeDidScroll()`. It's the 
`commitTreeState(()`
call that's skipped when `stateTree->hasChangedProperties()` is false.

This should be a minor power saving.

* Source/WebCore/page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::scrollingTreeNodeDidScroll):
(WebCore::ScrollingTree::commitTreeStateInternal):
(WebCore::ScrollingTree::applyLayerPositions):
* Source/WebCore/page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::setNeedsApplyLayerPositions):

Canonical link: https://commits.webkit.org/311816@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to