Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f3e56c5b480ab4dc6bb6412abdfc35c2536467ec
      
https://github.com/WebKit/WebKit/commit/f3e56c5b480ab4dc6bb6412abdfc35c2536467ec
  Author: Gerald Squelart <[email protected]>
  Date:   2026-10-15 (Thu, 15 Oct 2026)

  Changed paths:
    M Source/WebCore/html/HTMLMediaElement.cpp
    M Source/WebCore/html/canvas/GPUCanvasContextCocoa.h
    M Source/WebCore/html/canvas/GPUCanvasContextCocoa.mm
    M Source/WebCore/platform/graphics/PlatformDynamicRangeLimit.cpp
    M Source/WebCore/platform/graphics/PlatformDynamicRangeLimit.h
    M Source/WebKit/WebProcess/Model/WebModelPlayer.h
    M Source/WebKit/WebProcess/Model/WebModelPlayer.mm

  Log Message:
  -----------
  Move dynamic-range-limit and headroom math into PlatformDynamicRangeLimit
https://bugs.webkit.org/show_bug.cgi?id=326941
rdar://189587153

Reviewed by Mike Wyrzykowski.

GPUCanvasContextCocoa and WebModelPlayer each had an identical copy of
computeContentsHeadroom(), interpolateHeadroom() and the effective-limit
calculation. Add headroomForDynamicRangeLimit() and
effectiveDynamicRangeLimitValue() next to PlatformDynamicRangeLimit and
call them from both, as well as from HTMLMediaElement.

No change in behaviour.

* Source/WebCore/html/canvas/GPUCanvasContextCocoa.h:
* Source/WebCore/html/canvas/GPUCanvasContextCocoa.mm:
(WebCore::GPUCanvasContextCocoa::updateContentsHeadroom):
(WebCore::GPUCanvasContextCocoa::getEffectiveDynamicRangeLimitValue const):
(WebCore::interpolateHeadroom): Deleted.
(WebCore::GPUCanvasContextCocoa::computeContentsHeadroom): Deleted.
* Source/WebCore/platform/graphics/PlatformDynamicRangeLimit.cpp:
(WebCore::interpolateHeadroom):
(WebCore::headroomForDynamicRangeLimit):
(WebCore::effectiveDynamicRangeLimitValue):
(WebCore::effectiveDynamicRangeLimit):
* Source/WebCore/platform/graphics/PlatformDynamicRangeLimit.h:
* Source/WebKit/WebProcess/Model/WebModelPlayer.h:
* Source/WebKit/WebProcess/Model/WebModelPlayer.mm:
(WebKit::WebModelPlayer::updateContentsHeadroom):
(WebKit::WebModelPlayer::getEffectiveDynamicRangeLimitValue const):
(WebKit::interpolateHeadroom): Deleted.
(WebKit::WebModelPlayer::computeContentsHeadroom): Deleted.
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::computePlayerDynamicRangeLimit const):

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



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

Reply via email to