Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e29aed83c50ffbe64b7d09c6bd5ffd5ab4b1ddc8
      
https://github.com/WebKit/WebKit/commit/e29aed83c50ffbe64b7d09c6bd5ffd5ab4b1ddc8
  Author: Matt Woodrow <[email protected]>
  Date:   2025-06-25 (Wed, 25 Jun 2025)

  Changed paths:
    M Source/WebCore/platform/graphics/GraphicsContext.h
    M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTree.serialization.in
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm
    M 
Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStore.mm
    M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h

  Log Message:
  -----------
  [HDR] Gray background appears when switching from Safari tab overview to a 
tab with HDR images.
https://bugs.webkit.org/show_bug.cgi?id=294998
<rdar://154230589>

Reviewed by Simon Fraser and Mike Wyrzykowski.

Content painted by WebKit gets tonemapped at paint time, so we never want it to
be tonemapped again by the system.

Changes GraphicContext/RemoteLayerBackingStore to track the max EDR headroom
requested during painting, rather than just a bool of whether any draw exceeded
the available headroom.

Synchronize this value across to the UI process instead of the painted headroom,
and set it as the contentHeadroom so that the system knows what the intended
headroom is. Set CAToneMapModeNever for these layers, since tonemapping has
already been applied.

Also fixes a bug where GraphicsContextCG wouldn't call
CGContextSetEDRTargetHeadroom if the clamped headroom was 1, even if the image
had a higher source headroom.

* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::maxRequestedEDRHeadroom const):
(WebCore::GraphicsContext::clearMaxEDRHeadrooms):
(WebCore::GraphicsContext::hasPaintedClampedEDRHeadroom const): Deleted.
(WebCore::GraphicsContext::clearMaxPaintedEDRHeadroom): Deleted.
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::drawNativeImageInternal):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::encode const):
(WebKit::RemoteLayerBackingStoreProperties::dump const):
(WebKit::RemoteLayerBackingStore::setNeedsDisplay):
(WebKit::RemoteLayerBackingStore::setNeedsDisplayIfEDRHeadroomExceeds):
(WebKit::RemoteLayerBackingStore::setDelegatedContents):
(WebKit::RemoteLayerBackingStore::drawInContext):
(WebKit::RemoteLayerBackingStoreProperties::applyBackingStoreToLayer):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTree.serialization.in:
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
* 
Source/WebKit/Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStore.mm:
(WebKit::RemoteLayerWithRemoteRenderingBackingStore::dump const):
* Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::screenPropertiesChanged):
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::drawNativeImageInternal):
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to