Skip to content

Commit

Permalink
Support for arm cross-compile
Browse files Browse the repository at this point in the history
  • Loading branch information
laggykiller committed Jul 23, 2023
1 parent 056c0a1 commit 7d5d25c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ if (LOTTIE_ASAN)
endif()

if (NOT LIB_INSTALL_DIR)
set (LIB_INSTALL_DIR "/usr/lib")
set (LIB_INSTALL_DIR "/usr/local/lib")
endif (NOT LIB_INSTALL_DIR)

#declare source and include files
Expand Down
16 changes: 4 additions & 12 deletions src/vector/vdrawhelper_neon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
int ialpha, i;
if (const_alpha != 255) color = BYTE_MUL(color, const_alpha);

pixman_composite_over_n_8888_asm_neon(length, 1, dest, length, color);
ialpha = 255 - vAlpha(color);
for (i = 0; i < length; ++i) dest[i] = color + BYTE_MUL(dest[i], ialpha);
}

void RenderFuncTable::neon()
Expand Down

0 comments on commit 7d5d25c

Please sign in to comment.