Bug 241997

Summary: Consolidate the directive flags for enabling image formats
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: ImagesAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: sabouhallawa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Said Abou-Hallawa 2022-06-24 23:23:35 PDT
HAVE_WEBP: 

It is defined in PlatformHave.h for Apple ports

#if PLATFORM(COCOA)
#define HAVE_WEBP 1
#endif

USE_WEBP:

It is defined in Source/cmake/OptionsPlayStation.cmake and Source/cmake/OptionsWinCairo.cmake for WinCairo 
And it is defined in PlatformUse.h for GTK and WPE

#if PLATFORM(GTK) || PLATFORM(WPE)
#define USE_WEBP 1
#endif

HAVE_AVIF:

It is defined in PlatformHave.h for Apple ports. See https://github.com/WebKit/WebKit/pull/1717

USE_AVIF:

It is defined in Source/cmake/OptionsWPE.cmake for WPE
And it is defined Source/cmake/OptionsGTK.cmake for GTK


We need a single flag for WebP and another flag for AVIF to control when the image format is enabled.
Comment 1 Radar WebKit Bug Importer 2022-07-01 23:24:13 PDT
<rdar://problem/96332088>