From 8fe6b1a3330bd297ad99313cecd2e75bd98f649a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBy=C5=BAniewski?= Date: Fri, 30 Dec 2022 15:57:32 +0100 Subject: [PATCH 1/2] fix: use LD Version Script only if BUILD_SHARED_LIBS --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 38a98622..21b34f2c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,7 +88,7 @@ target_link_libraries(rlottie "${CMAKE_THREAD_LIBS_INIT}" ) -if (NOT APPLE AND NOT WIN32) +if (NOT APPLE AND NOT WIN32 AND BUILD_SHARED_LIBS) target_link_libraries(rlottie PRIVATE "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/rlottie.expmap" From c84298a9b87b440624e92ade11e11bff0a58ea00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBy=C5=BAniewski?= Date: Sun, 29 Jan 2023 19:38:35 +0100 Subject: [PATCH 2/2] fix: Apple Silicon --- src/vector/vdrawhelper_neon.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/vector/vdrawhelper_neon.cpp b/src/vector/vdrawhelper_neon.cpp index 681eabbc..1c1eed6d 100644 --- a/src/vector/vdrawhelper_neon.cpp +++ b/src/vector/vdrawhelper_neon.cpp @@ -2,28 +2,20 @@ #include "vdrawhelper.h" -extern "C" void pixman_composite_src_n_8888_asm_neon(int32_t w, int32_t h, - uint32_t *dst, - int32_t dst_stride, - uint32_t src); - -extern "C" void pixman_composite_over_n_8888_asm_neon(int32_t w, int32_t h, - uint32_t *dst, - int32_t dst_stride, - uint32_t src); - void memfill32(uint32_t *dest, uint32_t value, int length) { - pixman_composite_src_n_8888_asm_neon(length, 1, dest, length, value); + memset(dest, value, length); } static void color_SourceOver(uint32_t *dest, int length, uint32_t color, - uint32_t const_alpha) + uint32_t alpha) { - if (const_alpha != 255) color = BYTE_MUL(color, const_alpha); + int ialpha, i; - pixman_composite_over_n_8888_asm_neon(length, 1, dest, length, color); + if (alpha != 255) color = BYTE_MUL(color, alpha); + ialpha = 255 - vAlpha(color); + for (i = 0; i < length; ++i) dest[i] = color + BYTE_MUL(dest[i], ialpha); } void RenderFuncTable::neon()