Remove libwebp dependency; rely on bimg for WebP decoding#1740
Open
bkaradzic-microsoft wants to merge 2 commits into
Open
Remove libwebp dependency; rely on bimg for WebP decoding#1740bkaradzic-microsoft wants to merge 2 commits into
bkaradzic-microsoft wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the standalone libwebp dependency and the NativeEngine-side WebP decode fallback, relying instead on bimg’s built-in WebP parsing/decoding to handle WebP images end-to-end.
Changes:
- Removed
libwebpFetchContent/dependency wiring and associated install logic. - Deleted the NativeEngine WebP feature toggle/compile definition/link and the
WebPDecode*fallback path inParseImage. - Updated third-party notices to drop the libwebp license section.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Plugins/NativeEngine/Source/NativeEngine.cpp | Removes webp/decode.h usage and the libwebp-based WebP decoding fallback; bimg::imageParse is now the single image parse path. |
| Plugins/NativeEngine/CMakeLists.txt | Drops the NativeEngine WebP option wiring (WEBP define + webp link). |
| CMakeLists.txt | Removes FetchContent_Declare(libwebp) and eliminates the NativeEngine WebP option/config coupling. |
| Dependencies/CMakeLists.txt | Removes the conditional block that fetched/built libwebp and set its target properties. |
| Install/Install.cmake | Removes installation of the webp target when present. |
| NOTICE.md | Removes the libwebp notice section. |
be06aa7 to
d261fe2
Compare
bimg now parses WebP natively via its bundled simplewebp decoder (BIMG_CONFIG_PARSE_WEBP defaults on), so the standalone libwebp dependency and the WebP decode fallback in NativeEngine are redundant. - Drop the libwebp FetchContent declaration and its dependency build block. - Remove the BABYLON_NATIVE_PLUGIN_NATIVEENGINE_WEBP option, the WEBP compile definition / webp link in the NativeEngine target, and the libwebp install entry. - Remove the <webp/decode.h> include and the WebPGetInfo/WebPDecodeRGBAInto fallback in ParseImage; bimg::imageParse now handles WebP directly. - Drop the libwebp NOTICE section. Verified: the EXT_texture_webp Playground visual test passes with no pixel difference using bimg's decoder. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore the BABYLON_NATIVE_PLUGIN_NATIVEENGINE_WEBP option (and its coupling to LOAD_IMAGES) so WebP support stays toggleable. Instead of the removed libwebp path, disabling the option now compiles WebP parsing out of bimg by defining BIMG_CONFIG_PARSE_WEBP=0 on the bimg_decode target. Default (ON) leaves bimg's bundled simplewebp decoder enabled. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
e5ab52e to
77bf6c9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
bimg now parses WebP natively via its bundled
simplewebpdecoder (BIMG_CONFIG_PARSE_WEBPdefaults to on), so the standalone libwebp dependency and the WebP decode fallback in NativeEngine are now redundant. This removes them.Changes
libwebpFetchContentdeclaration (rootCMakeLists.txt) and its dependency build block (Dependencies/CMakeLists.txt).BABYLON_NATIVE_PLUGIN_NATIVEENGINE_WEBPoption, theWEBPcompile definition /webplink in the NativeEngine target, and thelibwebpinstall entry (Install/Install.cmake).<webp/decode.h>include and theWebPGetInfo/WebPDecodeRGBAIntofallback inParseImage;bimg::imageParsenow handles WebP directly.libwebpNOTICE.mdsection.Verification
EXT_texture_webpPlayground visual test passes with no pixel difference using bimg's decoder (ran=1 passed=1 failed=0). CI exercises this test on all backends.