[webkit-changes] [WebKit/WebKit] 0f0ff2: [HDR] Add test infrastructure to enable HDR images...
Said Abou-Hallawa
noreply at github.com
Thu Feb 20 06:21:18 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0f0ff23d36e8a0f0fb8627b7038275a1cc569eeb
https://github.com/WebKit/WebKit/commit/0f0ff23d36e8a0f0fb8627b7038275a1cc569eeb
Author: Said Abou-Hallawa <said at apple.com>
Date: 2025-02-20 (Thu, 20 Feb 2025)
Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/compositing/hdr/hdr-basic-image.html
A LayoutTests/fast/images/hdr-basic-image-expected.html
A LayoutTests/fast/images/hdr-basic-image.html
M LayoutTests/platform/ios/TestExpectations
A LayoutTests/platform/ios/compositing/hdr/hdr-basic-image-expected.txt
M LayoutTests/platform/mac-wk2/TestExpectations
A LayoutTests/platform/mac-wk2/compositing/hdr/hdr-basic-image-expected.txt
M Source/WebCore/platform/graphics/BitmapImage.cpp
M Source/WebCore/platform/graphics/BitmapImage.h
M Source/WebCore/platform/graphics/BitmapImageSource.h
M Source/WebCore/platform/graphics/ImageSource.h
M Source/WebCore/testing/Internals.cpp
M Source/WebCore/testing/Internals.h
M Source/WebCore/testing/Internals.idl
Log Message:
-----------
[HDR] Add test infrastructure to enable HDR images in layout tests
https://bugs.webkit.org/show_bug.cgi?id=288020#
rdar://145173897
Reviewed by Simon Fraser.
An internal API called setHeadroomForTesting() will be added. The inputs of this
API are: HTMLImageElement and a headroom as a float. This API will will override
the image headroom value.
This API will eventually sets an std::optional<Headroom> member in BitmapImageSource.
This setting will force the CALayer to be an HDR layer. Plus it will change the
display of this image. BitmapImage::draw() will check if setHeadroomForTesting()
was called for this image. And if this happened, it will display a golden rectangle
regardless of the original contents.
* LayoutTests/TestExpectations:
* LayoutTests/compositing/hdr/hdr-basic-image.html: Added.
* LayoutTests/fast/images/hdr-basic-image-expected.html: Added.
* LayoutTests/fast/images/hdr-basic-image.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/ios/compositing/hdr/hdr-basic-image-expected.txt: Added.
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/platform/mac-wk2/compositing/hdr/hdr-basic-image-expected.txt: Added.
* Source/WebCore/platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::draw):
* Source/WebCore/platform/graphics/BitmapImage.h:
* Source/WebCore/platform/graphics/BitmapImageSource.h:
* Source/WebCore/platform/graphics/ImageSource.h:
(WebCore::ImageSource::setHeadroomForTesting):
(WebCore::ImageSource::headroomForTesting const):
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::setHeadroomForTesting):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:
Canonical link: https://commits.webkit.org/290704@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