[webkit-changes] [WebKit/WebKit] 01e5e2: [HDR] Separate "is showing HDR" from screenContent...
Said Abou-Hallawa
noreply at github.com
Fri Feb 7 19:05:13 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 01e5e2df42c3c96d69e335d0ab7cd61a1ea9710a
https://github.com/WebKit/WebKit/commit/01e5e2df42c3c96d69e335d0ab7cd61a1ea9710a
Author: Said Abou-Hallawa <said at apple.com>
Date: 2025-02-07 (Fri, 07 Feb 2025)
Changed paths:
M Source/WebCore/platform/PlatformScreen.h
M Source/WebCore/platform/graphics/ContentsFormat.h
M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
M Source/WebCore/platform/graphics/ca/PlatformCALayer.h
M Source/WebCore/platform/graphics/ca/PlatformCALayer.mm
M Source/WebCore/platform/ios/LegacyTileGridTile.mm
M Source/WebCore/platform/ios/PlatformScreenIOS.mm
M Source/WebCore/platform/mac/PlatformScreenMac.mm
M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.mm
M Tools/DumpRenderTree/ios/PixelDumpSupportIOS.mm
Log Message:
-----------
[HDR] Separate "is showing HDR" from screenContentsFormat()
https://bugs.webkit.org/show_bug.cgi?id=287265
rdar://144396500
Reviewed by Simon Fraser.
screenContentsFormat() is a little confusing. It actually returns the best screen
ContentsFormat for a given optional layer.
I think the right design for this is:
1. screenContentsFormat() should be renamed screenContentsFormats() and it should
return OptionSet<ContentsFormat>. The screen is capable of supporting multiple
ContentsFormat. So it makes sense to return more than one ContentsFormat for the
same screen. The layer should picks whatever suits it.
2. A new static function is added called PlatformCALayer::contentsFormatForLayer().
It will return the best screen ContentsFormat for a given optional layer. This
function will call screenContentsFormats() and it will checks whether the
PlatformCALayerClient wants to show HDR or not. If it does and the screen supports
RGBA16F, it will return RGBA16F.
* Source/WebCore/platform/PlatformScreen.h:
* Source/WebCore/platform/graphics/ContentsFormat.h:
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::createPlatformCALayer):
* Source/WebCore/platform/graphics/ca/PlatformCALayer.h:
* Source/WebCore/platform/graphics/ca/PlatformCALayer.mm:
(WebCore::PlatformCALayer::contentsFormatForLayer):
* Source/WebCore/platform/ios/LegacyTileGridTile.mm:
(WebCore::LegacyTileGridTile::LegacyTileGridTile):
* Source/WebCore/platform/ios/PlatformScreenIOS.mm:
(WebCore::screenContentsFormats):
(WebCore::screenColorSpace):
(WebCore::screenContentsFormat): Deleted.
* Source/WebCore/platform/mac/PlatformScreenMac.mm:
(WebCore::screenContentsFormats):
(WebCore::screenContentsFormat): Deleted.
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _takeViewSnapshot]):
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.mm:
(WebKit::GraphicsLayerCARemote::createPlatformCALayer):
* Tools/DumpRenderTree/ios/PixelDumpSupportIOS.mm:
(createBitmapContextFromWebView):
Canonical link: https://commits.webkit.org/290069@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