New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[macOS Monterey and Big Sur] Enable AVIF image decoding using libavif and dav1d #5690
Conversation
EWS run on previous version of this PR (hash d412bd1) |
d412bd1
to
2b1efa8
Compare
EWS run on previous version of this PR (hash 2b1efa8) |
2b1efa8
to
9934097
Compare
EWS run on previous version of this PR (hash 9934097) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not all/some of the skipped AVIF tests be un-skipped with this change?
fast/images/avif-image-decoding.html [ Skip ]
fast/images/avif-as-image.html [ Skip ]
fast/images/avif-heif-container-as-image.html [ Skip ]
fast/images/animated-avif.html [ Skip ]
http/tests/images/avif-partial-load-crash.html [ Skip ]
Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp
Outdated
Show resolved
Hide resolved
9934097
to
7e2ec93
Compare
EWS run on previous version of this PR (hash 7e2ec93) |
7e2ec93
to
3c88d48
Compare
EWS run on previous version of this PR (hash 3c88d48) |
3c88d48
to
eb1134f
Compare
β¦ and dav1d https://bugs.webkit.org/show_bug.cgi?id=246925 rdar://101481679 Reviewed by Said Abou-Hallawa. We checked in libavif and dav1d sources in 494a012. This patch hooks up image decoding to use them, on macOS Monterey and Big Sur. It does so by using the same glue code that non-Apple platforms use: ScalableImageDecoder and AVIFImageDecoder. This patch includes those files in Sources.txt for all ports, and refactors ScalableImageDecoder on Cocoa platforms to only support AVIF, as per https://webkit.slack.com/archives/CU64U6FDW/p1666556573569359?thread_ts=1666555605.109619&cid=CU64U6FDW. This patch re-uses the same USE(AVIF) flag that the non-Apple ports have been using. There are currently 2 AVIF flags: - USE(AVIF) indicates that libavif will be used to decode AVIF images, using the ScalableImageDecoder infrastructure. This is enabled on the non-Apple ports, and on macOS Monterey and Big Sur. - HAVE(AVIF) indicates that the platform can decode AVIF images directly. This is enabled on macOS Ventura and later (and other Cocoa ports). These flags are mutually exclusive; no port has both enabled at the same time. The Apple Windows port has neither of these flags enabled. * Source/WTF/wtf/PlatformUse.h: * Source/WebCore/Configurations/WebCore.xcconfig: * Source/WebCore/PAL/libavif/Configurations/libavif.xcconfig: * Source/WebCore/Sources.txt: * Source/WebCore/SourcesCocoa.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/platform/graphics/ImageDecoder.cpp: (WebCore::ImageDecoder::create): * Source/WebCore/platform/graphics/cg/ImageBackingStoreCG.cpp: Copied from Source/WebCore/platform/image-decoders/avif/AVIFImageDecoder.h. (WebCore::ImageBackingStore::image const): * Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp: (WebCore::ImageDecoderCG::decodeUTI const): (WebCore::ImageDecoderCG::decodeUTI): * Source/WebCore/platform/graphics/cg/ImageDecoderCG.h: * Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp: (WebCore::ScalableImageDecoder::create): * Source/WebCore/platform/image-decoders/avif/AVIFImageDecoder.h: * Source/WebCore/platform/image-decoders/avif/AVIFImageReader.cpp: (WebCore::AVIFImageReader::decodeFrame): Canonical link: https://commits.webkit.org/255984@main
eb1134f
to
5300e66
Compare
Committed 255984@main (5300e66): https://commits.webkit.org/255984@main Reviewed commits have been landed. Closing PR #5690 and removing active labels. |
5300e66
eb1134f
π macπ wpeπ π§ͺ winπ mac-debugπ wincairoπ§ͺ ios-wk2π§ͺ gtk-wk2π§ͺ api-iosπ§ͺ api-macπ§ͺ api-gtkπ§ͺ mac-wk1π§ͺ mac-wk2π§ͺ mac-AS-debug-wk2π§ͺ mac-wk2-stress