[webkit-changes] [WebKit/WebKit] 050470: REGRESSION (Sonoma): Media elements can trigger ex...

Simon Fraser noreply at github.com
Sun Aug 13 09:25:04 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 050470812f66ff2f80f31700b9c959fa42b855ea
      https://github.com/WebKit/WebKit/commit/050470812f66ff2f80f31700b9c959fa42b855ea
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2023-08-13 (Sun, 13 Aug 2023)

  Changed paths:
    A LayoutTests/media/media-source/media-source-rendering-update-count-expected.txt
    A LayoutTests/media/media-source/media-source-rendering-update-count.html
    M LayoutTests/platform/gtk/TestExpectations
    M LayoutTests/platform/wpe/TestExpectations
    M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

  Log Message:
  -----------
  REGRESSION (Sonoma): Media elements can trigger extra compositing updates, increasing power usage
https://bugs.webkit.org/show_bug.cgi?id=260095
rdar://113643405

Reviewed by Jer Noble.

After media layer double-hosting (260575 at main) and subsequent fixes (261455 at main, 264812 at main)
every call to GraphicsLayerCA::setContentsToVideoElement() triggered layer tree mutations via
updateVideoGravity() and noteSublayersChanged(), which schedule rendering updates. These in
turn result in CA commits in the UI process, causing a meassurable power regression.

Fix by early returning from GraphicsLayerCA::setContentsToVideoElement() when nothing has changed.

* LayoutTests/media/media-source/media-source-rendering-update-count-expected.txt: Added.
* LayoutTests/media/media-source/media-source-rendering-update-count.html: Added.
* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/wpe/TestExpectations:
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setContentsToVideoElement):

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




More information about the webkit-changes mailing list