AnimatedWebPDecoder POC (#2426)

This commit is contained in:
FooIbar authored and GitHub committed 2025-06-24 23:58:52 +08:00
1 parent 6edc8f06f3
commit bd11a7fcc2
14 files changed
+373 -5

No files matched your search

@@ -0,0 +1,25 @@
From 07931ec2f127ce2408690cc85399ca750ca12657 Mon Sep 17 00:00:00 2001
From: FooIbar <118464521+FooIbar@users.noreply.github.com>
Date: Thu, 19 Jun 2025 00:03:46 +0800
Subject: [PATCH] Disable runtime detection of NEON support
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d7e8963f..9dda3bb1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -181,7 +181,7 @@ endif()
# ##############################################################################
# Android only.
-if(ANDROID)
+if(0)
include_directories(${ANDROID_NDK}/sources/android/cpufeatures)
add_library(cpufeatures-webp STATIC
${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c)
--
2.45.2
+21
View File
@@ -109,6 +109,26 @@ FetchContent_Declare(
FetchContent_MakeAvailable(libarchive)
include_directories(${libarchive_SOURCE_DIR}/libarchive)
set(LIBWEBP_PATCH ${CMAKE_CURRENT_LIST_DIR}/0001-Disable-runtime-detection-of-NEON-support.patch)
FetchContent_Declare(
libwebp
GIT_REPOSITORY https://chromium.googlesource.com/webm/libwebp
GIT_TAG v1.5.0
GIT_SHALLOW 1
PATCH_COMMAND git apply --check -R ${LIBWEBP_PATCH} || git apply ${LIBWEBP_PATCH}
)
option(WEBP_BUILD_ANIM_UTILS OFF)
option(WEBP_BUILD_CWEBP OFF)
option(WEBP_BUILD_DWEBP OFF)
option(WEBP_BUILD_VWEBP OFF)
option(WEBP_BUILD_WEBPINFO OFF)
option(WEBP_BUILD_LIBWEBPMUX OFF)
option(WEBP_BUILD_EXTRAS OFF)
option(WEBP_ENABLE_SWAP_16BIT_CSP ON)
FetchContent_MakeAvailable(libwebp)
FetchContent_Declare(
Corrosion
GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git
@@ -123,6 +143,7 @@ corrosion_import_crate(
FEATURES $<IF:$<VERSION_GREATER_EQUAL:${ANDROID_NATIVE_API_LEVEL},26>,android-26,android>
FLAGS $<$<NOT:$<CONFIG:Debug>>:-Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort>
)
corrosion_link_libraries(ehviewer_rust webp webpdemux)
corrosion_add_target_local_rustflags(ehviewer_rust "-Clink-args=-Wl,-z,max-page-size=16384")
# Build and link our app's native lib