[webkit-changes] [WebKit/WebKit] dfab89: Refactor dynamic-range-limit layer-setting code af...

Gerald Squelart noreply at github.com
Wed Mar 12 14:19:55 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dfab897cb22d7f3f0e49f950ecc85186b7d010a0
      https://github.com/WebKit/WebKit/commit/dfab897cb22d7f3f0e49f950ecc85186b7d010a0
  Author: Gerald Squelart <g_squelart at apple.com>
  Date:   2025-03-12 (Wed, 12 Mar 2025)

  Changed paths:
    M Source/WebCore/html/HTMLMediaElement.cpp
    M Source/WebCore/platform/graphics/PlatformDynamicRangeLimit.h
    M Source/WebKit/UIProcess/mac/WebViewImpl.h
    M Source/WebKit/UIProcess/mac/WebViewImpl.mm

  Log Message:
  -----------
  Refactor dynamic-range-limit layer-setting code after suppress-HDR notifications
https://bugs.webkit.org/show_bug.cgi?id=289152
rdar://146238622

Reviewed by Mike Wyrzykowski.

Centralize the dynamic-range-limit to be used when suppressing HDR in
videos and other elements.

Also directly use the window-did-become/resign-key notification to use
as window activity state -- `m_page->isViewWindowActive()` was not
actually correct yet.
And only update layer properties when the target dynamic range limit has
actually changed.

* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::computePlayerDynamicRangeLimit const):
* Source/WebCore/platform/graphics/PlatformDynamicRangeLimit.h:
(WebCore::PlatformDynamicRangeLimit::defaultWhenSuppressingHDR):
(WebCore::PlatformDynamicRangeLimit::defaultWhenSuppressingHDRInVideos):
* Source/WebKit/UIProcess/mac/WebViewImpl.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::windowDidBecomeKey):
(WebKit::WebViewImpl::windowDidResignKey):
(WebKit::WebViewImpl::updateHDRState):
(WebKit::WebViewImpl::applicationShouldSuppressHDR):
(WebKit::WebViewImpl::applicationShouldAllowHDR):

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



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


More information about the webkit-changes mailing list