Patch from Dmitry Antipov:

- Visibility hiding
- Move common asm macros to asm.h
- Fix some typos.


SVN revision: 21974
This commit is contained in:
Kim Woelders 2006-04-09 08:12:51 +00:00
parent 4c91decfa6
commit 81c3539440
36 changed files with 348 additions and 515 deletions

View File

@ -29,3 +29,4 @@ Kim Woelders <kim@woelders.dk>
Nick Blievers <nickb@sgi.com>
Mike Castle <dalgoda@ix.netcom.com>
R.Ramkumar <andyetitmoves@gmail.com>
Dmitry Antipov <dmantipov@yandex.ru>

View File

@ -10,6 +10,16 @@ AM_CONFIG_HEADER(config.h)
AC_C_BIGENDIAN
AC_PROG_CC
AC_MSG_CHECKING([if gcc supports __attribute__((visibility("hidden")))])
AC_COMPILE_IFELSE([
void __attribute__((visibility("hidden"))) func (void) {}
],
[AC_MSG_RESULT(yes)
AC_DEFINE(USE_HIDDEN_FUNCTION_ATTRIBUTE,1,
[Define this to 1 if `hidden' attribute for internal functions is used.])],
[AC_MSG_RESULT(no)])
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_C_CONST

View File

@ -6,6 +6,7 @@ lib_LTLIBRARIES = libImlib2.la
include_HEADERS = Imlib2.h
libImlib2_la_SOURCES = \
api.c \
asm.h \
blend.c \
blend.h \
color.c \

View File

@ -1,22 +1,5 @@
#include <config.h>
#ifdef __EMX__
/* Due to strange behaviour of as.exe we use this macros */
/* For all OS/2 coders - please use PGCC to compile this code */
#define PR_(foo) ___##foo
#define PT_(foo,func) ___##foo,##func
#define SIZE(sym) \
.___end_##sym:; \
.size ___##sym,.___end_##sym-___##sym; \
.align 16;
#else
#define PR_(foo) __##foo
#define PT_(foo,func) __##foo,##func
#define SIZE(sym) \
.__end_##sym:; \
.size __##sym,.__end_##sym-__##sym; \
.align 16;
#endif
#include "asm.h"
#ifdef DO_AMD64_ASM
@ -70,49 +53,29 @@ c1: .word 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1
.text
.align 16
.globl PR_(imlib_amd64_blend_rgba_to_rgb)
.type PT_(imlib_amd64_blend_rgba_to_rgb,@function)
.globl PR_(imlib_amd64_blend_rgba_to_rgba)
.type PT_(imlib_amd64_blend_rgba_to_rgba,@function)
.globl PR_(imlib_amd64_copy_rgba_to_rgb)
.type PT_(imlib_amd64_copy_rgba_to_rgb,@function)
.globl PR_(imlib_amd64_copy_rgba_to_rgba)
.type PT_(imlib_amd64_copy_rgba_to_rgba,@function)
FN_(imlib_amd64_blend_rgba_to_rgb)
FN_(imlib_amd64_blend_rgba_to_rgba)
FN_(imlib_amd64_copy_rgba_to_rgb)
FN_(imlib_amd64_copy_rgba_to_rgba)
.globl PR_(imlib_amd64_copy_rgb_to_rgba)
.type PT_(imlib_amd64_copy_rgb_to_rgba,@function)
.globl PR_(imlib_amd64_add_blend_rgba_to_rgb)
.type PT_(imlib_amd64_add_blend_rgba_to_rgb,@function)
.globl PR_(imlib_amd64_add_blend_rgba_to_rgba)
.type PT_(imlib_amd64_add_blend_rgba_to_rgba,@function)
.globl PR_(imlib_amd64_add_copy_rgba_to_rgb)
.type PT_(imlib_amd64_add_copy_rgba_to_rgb,@function)
.globl PR_(imlib_amd64_add_copy_rgba_to_rgba)
.type PT_(imlib_amd64_add_copy_rgba_to_rgba,@function)
.globl PR_(imlib_amd64_add_copy_rgb_to_rgba)
.type PT_(imlib_amd64_add_copy_rgb_to_rgba,@function)
FN_(imlib_amd64_copy_rgb_to_rgba)
FN_(imlib_amd64_add_blend_rgba_to_rgb)
FN_(imlib_amd64_add_blend_rgba_to_rgba)
FN_(imlib_amd64_add_copy_rgba_to_rgb)
FN_(imlib_amd64_add_copy_rgba_to_rgba)
FN_(imlib_amd64_add_copy_rgb_to_rgba)
.globl PR_(imlib_amd64_subtract_blend_rgba_to_rgb)
.type PT_(imlib_amd64_subtract_blend_rgba_to_rgb,@function)
.globl PR_(imlib_amd64_subtract_blend_rgba_to_rgba)
.type PT_(imlib_amd64_subtract_blend_rgba_to_rgba,@function)
.globl PR_(imlib_amd64_subtract_copy_rgba_to_rgb)
.type PT_(imlib_amd64_subtract_copy_rgba_to_rgb,@function)
.globl PR_(imlib_amd64_subtract_copy_rgba_to_rgba)
.type PT_(imlib_amd64_subtract_copy_rgba_to_rgba,@function)
.globl PR_(imlib_amd64_subtract_copy_rgb_to_rgba)
.type PT_(imlib_amd64_subtract_copy_rgb_to_rgba,@function)
FN_(imlib_amd64_subtract_blend_rgba_to_rgb)
FN_(imlib_amd64_subtract_blend_rgba_to_rgba)
FN_(imlib_amd64_subtract_copy_rgba_to_rgb)
FN_(imlib_amd64_subtract_copy_rgba_to_rgba)
FN_(imlib_amd64_subtract_copy_rgb_to_rgba)
.globl PR_(imlib_amd64_reshade_blend_rgba_to_rgb)
.type PT_(imlib_amd64_reshade_blend_rgba_to_rgb,@function)
.globl PR_(imlib_amd64_reshade_blend_rgba_to_rgba)
.type PT_(imlib_amd64_reshade_blend_rgba_to_rgba,@function)
.globl PR_(imlib_amd64_reshade_copy_rgba_to_rgb)
.type PT_(imlib_amd64_reshade_copy_rgba_to_rgb,@function)
.globl PR_(imlib_amd64_reshade_copy_rgba_to_rgba)
.type PT_(imlib_amd64_reshade_copy_rgba_to_rgba,@function)
.globl PR_(imlib_amd64_reshade_copy_rgb_to_rgba)
.type PT_(imlib_amd64_reshade_copy_rgb_to_rgba,@function)
FN_(imlib_amd64_reshade_blend_rgba_to_rgb)
FN_(imlib_amd64_reshade_blend_rgba_to_rgba)
FN_(imlib_amd64_reshade_copy_rgba_to_rgb)
FN_(imlib_amd64_reshade_copy_rgba_to_rgba)
FN_(imlib_amd64_reshade_copy_rgb_to_rgba)
.extern pow_lut

View File

@ -1,22 +1,5 @@
#include <config.h>
#ifdef __EMX__
/* Due to strange behaviour of as.exe we use this macros */
/* For all OS/2 coders - please use PGCC to compile this code */
#define PR_(foo) ___##foo
#define PT_(foo,func) ___##foo,##func
#define SIZE(sym) \
.___end_##sym:; \
.size ___##sym,.___end_##sym-___##sym; \
.align 16;
#else
#define PR_(foo) __##foo
#define PT_(foo,func) __##foo,##func
#define SIZE(sym) \
.__end_##sym:; \
.size __##sym,.__end_##sym-__##sym; \
.align 16;
#endif
#include "asm.h"
#ifdef DO_AMD64_ASM
@ -70,65 +53,37 @@ c1: .word 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1
.text
.align 16
.globl PR_(imlib_amd64_blend_rgba_to_rgb_cmod)
.type PT_(imlib_amd64_blend_rgba_to_rgb_cmod,@function)
.globl PR_(imlib_amd64_blend_rgba_to_rgba_cmod)
.type PT_(imlib_amd64_blend_rgba_to_rgba_cmod,@function)
.globl PR_(imlib_amd64_blend_rgb_to_rgba_cmod)
.type PT_(imlib_amd64_blend_rgb_to_rgba_cmod,@function)
.globl PR_(imlib_amd64_blend_rgb_to_rgb_cmod)
.type PT_(imlib_amd64_blend_rgb_to_rgb_cmod,@function)
.globl PR_(imlib_amd64_copy_rgba_to_rgb_cmod)
.type PT_(imlib_amd64_copy_rgba_to_rgb_cmod,@function)
.globl PR_(imlib_amd64_copy_rgba_to_rgba_cmod)
.type PT_(imlib_amd64_copy_rgba_to_rgba_cmod,@function)
.globl PR_(imlib_amd64_copy_rgb_to_rgba_cmod)
.type PT_(imlib_amd64_copy_rgb_to_rgba_cmod,@function)
FN_(imlib_amd64_blend_rgba_to_rgb_cmod)
FN_(imlib_amd64_blend_rgba_to_rgba_cmod)
FN_(imlib_amd64_blend_rgb_to_rgba_cmod)
FN_(imlib_amd64_blend_rgb_to_rgb_cmod)
FN_(imlib_amd64_copy_rgba_to_rgb_cmod)
FN_(imlib_amd64_copy_rgba_to_rgba_cmod)
FN_(imlib_amd64_copy_rgb_to_rgba_cmod)
.globl PR_(imlib_amd64_add_blend_rgba_to_rgb_cmod)
.type PT_(imlib_amd64_add_blend_rgba_to_rgb_cmod,@function)
.globl PR_(imlib_amd64_add_blend_rgba_to_rgba_cmod)
.type PT_(imlib_amd64_add_blend_rgba_to_rgba_cmod,@function)
.globl PR_(imlib_amd64_add_blend_rgb_to_rgba_cmod)
.type PT_(imlib_amd64_add_blend_rgb_to_rgba_cmod,@function)
.globl PR_(imlib_amd64_add_blend_rgb_to_rgb_cmod)
.type PT_(imlib_amd64_add_blend_rgb_to_rgb_cmod,@function)
.globl PR_(imlib_amd64_add_copy_rgba_to_rgb_cmod)
.type PT_(imlib_amd64_add_copy_rgba_to_rgb_cmod,@function)
.globl PR_(imlib_amd64_add_copy_rgba_to_rgba_cmod)
.type PT_(imlib_amd64_add_copy_rgba_to_rgba_cmod,@function)
.globl PR_(imlib_amd64_add_copy_rgb_to_rgba_cmod)
.type PT_(imlib_amd64_add_copy_rgb_to_rgba_cmod,@function)
FN_(imlib_amd64_add_blend_rgba_to_rgb_cmod)
FN_(imlib_amd64_add_blend_rgba_to_rgba_cmod)
FN_(imlib_amd64_add_blend_rgb_to_rgba_cmod)
FN_(imlib_amd64_add_blend_rgb_to_rgb_cmod)
FN_(imlib_amd64_add_copy_rgba_to_rgb_cmod)
FN_(imlib_amd64_add_copy_rgba_to_rgba_cmod)
FN_(imlib_amd64_add_copy_rgb_to_rgba_cmod)
.globl PR_(imlib_amd64_subtract_blend_rgba_to_rgb_cmod)
.type PT_(imlib_amd64_subtract_blend_rgba_to_rgb_cmod,@function)
.globl PR_(imlib_amd64_subtract_blend_rgba_to_rgba_cmod)
.type PT_(imlib_amd64_subtract_blend_rgba_to_rgba_cmod,@function)
.globl PR_(imlib_amd64_subtract_blend_rgb_to_rgba_cmod)
.type PT_(imlib_amd64_subtract_blend_rgb_to_rgba_cmod,@function)
.globl PR_(imlib_amd64_subtract_blend_rgb_to_rgb_cmod)
.type PT_(imlib_amd64_subtract_blend_rgb_to_rgb_cmod,@function)
.globl PR_(imlib_amd64_subtract_copy_rgba_to_rgb_cmod)
.type PT_(imlib_amd64_subtract_copy_rgba_to_rgb_cmod,@function)
.globl PR_(imlib_amd64_subtract_copy_rgba_to_rgba_cmod)
.type PT_(imlib_amd64_subtract_copy_rgba_to_rgba_cmod,@function)
.globl PR_(imlib_amd64_subtract_copy_rgb_to_rgba_cmod)
.type PT_(imlib_amd64_subtract_copy_rgb_to_rgba_cmod,@function)
FN_(imlib_amd64_subtract_blend_rgba_to_rgb_cmod)
FN_(imlib_amd64_subtract_blend_rgba_to_rgba_cmod)
FN_(imlib_amd64_subtract_blend_rgb_to_rgba_cmod)
FN_(imlib_amd64_subtract_blend_rgb_to_rgb_cmod)
FN_(imlib_amd64_subtract_copy_rgba_to_rgb_cmod)
FN_(imlib_amd64_subtract_copy_rgba_to_rgba_cmod)
FN_(imlib_amd64_subtract_copy_rgb_to_rgba_cmod)
.globl PR_(imlib_amd64_reshade_blend_rgba_to_rgb_cmod)
.type PT_(imlib_amd64_reshade_blend_rgba_to_rgb_cmod,@function)
.globl PR_(imlib_amd64_reshade_blend_rgba_to_rgba_cmod)
.type PT_(imlib_amd64_reshade_blend_rgba_to_rgba_cmod,@function)
.globl PR_(imlib_amd64_reshade_blend_rgb_to_rgba_cmod)
.type PT_(imlib_amd64_reshade_blend_rgb_to_rgba_cmod,@function)
.globl PR_(imlib_amd64_reshade_blend_rgb_to_rgb_cmod)
.type PT_(imlib_amd64_reshade_blend_rgb_to_rgb_cmod,@function)
.globl PR_(imlib_amd64_reshade_copy_rgba_to_rgb_cmod)
.type PT_(imlib_amd64_reshade_copy_rgba_to_rgb_cmod,@function)
.globl PR_(imlib_amd64_reshade_copy_rgba_to_rgba_cmod)
.type PT_(imlib_amd64_reshade_copy_rgba_to_rgba_cmod,@function)
.globl PR_(imlib_amd64_reshade_copy_rgb_to_rgba_cmod)
.type PT_(imlib_amd64_reshade_copy_rgb_to_rgba_cmod,@function)
FN_(imlib_amd64_reshade_blend_rgba_to_rgb_cmod)
FN_(imlib_amd64_reshade_blend_rgba_to_rgba_cmod)
FN_(imlib_amd64_reshade_blend_rgb_to_rgba_cmod)
FN_(imlib_amd64_reshade_blend_rgb_to_rgb_cmod)
FN_(imlib_amd64_reshade_copy_rgba_to_rgb_cmod)
FN_(imlib_amd64_reshade_copy_rgba_to_rgba_cmod)
FN_(imlib_amd64_reshade_copy_rgb_to_rgba_cmod)
.extern pow_lut

View File

@ -125,7 +125,7 @@ static ImlibContextItem *contexts = NULL; /* (ImlibContext*) imlib_context
static ImlibContext *ctx = NULL; /* contexts->context; */
/* frees the given context including all its members */
void
__hidden void
__imlib_free_context(ImlibContext * context)
{
ImlibContextItem *next = contexts;

35
src/lib/asm.h Normal file
View File

@ -0,0 +1,35 @@
#ifndef __ASM_H
#define __ASM_H
#ifdef __EMX__
/* Due to strange behaviour of as.exe we use this macros */
/* For all OS/2 coders - please use PGCC to compile this code */
#define PR_(foo) ___##foo
#define PT_(foo,func) ___##foo,##func
#define FN_(foo) \
.globl PR_(foo); \
.type PT_(foo,@function)
#define SIZE(sym) \
.___end_##sym:; \
.size ___##sym,.___end_##sym-___##sym; \
.align 8;
#else /* not __EMX__ */
#define PR_(foo) __##foo
#define PT_(foo,func) __##foo,##func
#ifdef USE_HIDDEN_FUNCTION_ATTRIBUTE
#define FN_(foo) \
.globl PR_(foo); \
.hidden PR_(foo); \
.type PT_(foo,@function)
#else /* not USE_HIDDEN... */
#define FN_(foo) \
.globl PR_(foo); \
.type PT_(foo,@function)
#endif /* USE_HIDDEN... */
#define SIZE(sym) \
.__end_##sym:; \
.size __##sym,.__end_##sym-__##sym; \
.align 8;
#endif
#endif /* __ASM_H */

View File

@ -1,22 +1,5 @@
#include <config.h>
#ifdef __EMX__
/* Due to strange behaviour of as.exe we use this macros */
/* For all OS/2 coders - please use PGCC to compile this code */
#define PR_(foo) ___##foo
#define PT_(foo,func) ___##foo,##func
#define SIZE(sym) \
.___end_##sym:; \
.size ___##sym,.___end_##sym-___##sym; \
.align 8;
#else
#define PR_(foo) __##foo
#define PT_(foo,func) __##foo,##func
#define SIZE(sym) \
.__end_##sym:; \
.size __##sym,.__end_##sym-__##sym; \
.align 8;
#endif
#include "asm.h"
#ifdef DO_MMX_ASM
@ -42,49 +25,29 @@
.text
.align 8
.globl PR_(imlib_mmx_blend_rgba_to_rgb)
.type PT_(imlib_mmx_blend_rgba_to_rgb,@function)
.globl PR_(imlib_mmx_blend_rgba_to_rgba)
.type PT_(imlib_mmx_blend_rgba_to_rgba,@function)
.globl PR_(imlib_mmx_copy_rgba_to_rgb)
.type PT_(imlib_mmx_copy_rgba_to_rgb,@function)
.globl PR_(imlib_mmx_copy_rgba_to_rgba)
.type PT_(imlib_mmx_copy_rgba_to_rgba,@function)
.globl PR_(imlib_mmx_copy_rgb_to_rgba)
FN_(imlib_mmx_blend_rgba_to_rgb)
FN_(imlib_mmx_blend_rgba_to_rgba)
FN_(imlib_mmx_copy_rgba_to_rgb)
FN_(imlib_mmx_copy_rgba_to_rgba)
FN_(imlib_mmx_copy_rgb_to_rgba)
.type PT_(imlib_mmx_copy_rgb_to_rgba,@function)
.globl PR_(imlib_mmx_add_blend_rgba_to_rgb)
.type PT_(imlib_mmx_add_blend_rgba_to_rgb,@function)
.globl PR_(imlib_mmx_add_blend_rgba_to_rgba)
.type PT_(imlib_mmx_add_blend_rgba_to_rgba,@function)
.globl PR_(imlib_mmx_add_copy_rgba_to_rgb)
.type PT_(imlib_mmx_add_copy_rgba_to_rgb,@function)
.globl PR_(imlib_mmx_add_copy_rgba_to_rgba)
.type PT_(imlib_mmx_add_copy_rgba_to_rgba,@function)
.globl PR_(imlib_mmx_add_copy_rgb_to_rgba)
.type PT_(imlib_mmx_add_copy_rgb_to_rgba,@function)
FN_(imlib_mmx_add_blend_rgba_to_rgb)
FN_(imlib_mmx_add_blend_rgba_to_rgba)
FN_(imlib_mmx_add_copy_rgba_to_rgb)
FN_(imlib_mmx_add_copy_rgba_to_rgba)
FN_(imlib_mmx_add_copy_rgb_to_rgba)
.globl PR_(imlib_mmx_subtract_blend_rgba_to_rgb)
.type PT_(imlib_mmx_subtract_blend_rgba_to_rgb,@function)
.globl PR_(imlib_mmx_subtract_blend_rgba_to_rgba)
.type PT_(imlib_mmx_subtract_blend_rgba_to_rgba,@function)
.globl PR_(imlib_mmx_subtract_copy_rgba_to_rgb)
.type PT_(imlib_mmx_subtract_copy_rgba_to_rgb,@function)
.globl PR_(imlib_mmx_subtract_copy_rgba_to_rgba)
.type PT_(imlib_mmx_subtract_copy_rgba_to_rgba,@function)
.globl PR_(imlib_mmx_subtract_copy_rgb_to_rgba)
.type PT_(imlib_mmx_subtract_copy_rgb_to_rgba,@function)
FN_(imlib_mmx_subtract_blend_rgba_to_rgb)
FN_(imlib_mmx_subtract_blend_rgba_to_rgba)
FN_(imlib_mmx_subtract_copy_rgba_to_rgb)
FN_(imlib_mmx_subtract_copy_rgba_to_rgba)
FN_(imlib_mmx_subtract_copy_rgb_to_rgba)
.globl PR_(imlib_mmx_reshade_blend_rgba_to_rgb)
.type PT_(imlib_mmx_reshade_blend_rgba_to_rgb,@function)
.globl PR_(imlib_mmx_reshade_blend_rgba_to_rgba)
.type PT_(imlib_mmx_reshade_blend_rgba_to_rgba,@function)
.globl PR_(imlib_mmx_reshade_copy_rgba_to_rgb)
.type PT_(imlib_mmx_reshade_copy_rgba_to_rgb,@function)
.globl PR_(imlib_mmx_reshade_copy_rgba_to_rgba)
.type PT_(imlib_mmx_reshade_copy_rgba_to_rgba,@function)
.globl PR_(imlib_mmx_reshade_copy_rgb_to_rgba)
.type PT_(imlib_mmx_reshade_copy_rgb_to_rgba,@function)
FN_(imlib_mmx_reshade_blend_rgba_to_rgb)
FN_(imlib_mmx_reshade_blend_rgba_to_rgba)
FN_(imlib_mmx_reshade_copy_rgba_to_rgb)
FN_(imlib_mmx_reshade_copy_rgba_to_rgba)
FN_(imlib_mmx_reshade_copy_rgb_to_rgba)
#include "asm_loadimmq.S"

View File

@ -1,22 +1,5 @@
#include <config.h>
#ifdef __EMX__
/* Due to strange behaviour of as.exe we use this macros */
/* For all OS/2 coders - please use PGCC to compile this code */
#define PR_(foo) ___##foo
#define PT_(foo,func) ___##foo,##func
#define SIZE(sym) \
.___end_##sym:; \
.size ___##sym,.___end_##sym-___##sym; \
.align 8;
#else
#define PR_(foo) __##foo
#define PT_(foo,func) __##foo,##func
#define SIZE(sym) \
.__end_##sym:; \
.size __##sym,.__end_##sym-__##sym; \
.align 8;
#endif
#include "asm.h"
#ifdef DO_MMX_ASM
@ -49,69 +32,41 @@
.text
.align 8
.globl PR_(imlib_mmx_blend_rgba_to_rgb_cmod)
.type PT_(imlib_mmx_blend_rgba_to_rgb_cmod,@function)
.globl PR_(imlib_mmx_blend_rgba_to_rgba_cmod)
.type PT_(imlib_mmx_blend_rgba_to_rgba_cmod,@function)
.globl PR_(imlib_mmx_blend_rgb_to_rgb_cmod)
.type PT_(imlib_mmx_blend_rgb_to_rgb_cmod,@function)
.globl PR_(imlib_mmx_blend_rgb_to_rgba_cmod)
.type PT_(imlib_mmx_blend_rgb_to_rgba_cmod,@function)
FN_(imlib_mmx_blend_rgba_to_rgb_cmod)
FN_(imlib_mmx_blend_rgba_to_rgba_cmod)
FN_(imlib_mmx_blend_rgb_to_rgb_cmod)
FN_(imlib_mmx_blend_rgb_to_rgba_cmod)
.globl PR_(imlib_mmx_copy_rgba_to_rgb_cmod)
.type PT_(imlib_mmx_copy_rgba_to_rgb_cmod,@function)
.globl PR_(imlib_mmx_copy_rgba_to_rgba_cmod)
.type PT_(imlib_mmx_copy_rgba_to_rgba_cmod,@function)
.globl PR_(imlib_mmx_copy_rgb_to_rgba_cmod)
.type PT_(imlib_mmx_copy_rgb_to_rgba_cmod,@function)
FN_(imlib_mmx_copy_rgba_to_rgb_cmod)
FN_(imlib_mmx_copy_rgba_to_rgba_cmod)
FN_(imlib_mmx_copy_rgb_to_rgba_cmod)
.globl PR_(imlib_mmx_add_blend_rgba_to_rgb_cmod)
.type PT_(imlib_mmx_add_blend_rgba_to_rgb_cmod,@function)
.globl PR_(imlib_mmx_add_blend_rgba_to_rgba_cmod)
.type PT_(imlib_mmx_add_blend_rgba_to_rgba_cmod,@function)
.globl PR_(imlib_mmx_add_blend_rgb_to_rgb_cmod)
.type PT_(imlib_mmx_add_blend_rgb_to_rgb_cmod,@function)
.globl PR_(imlib_mmx_add_blend_rgb_to_rgba_cmod)
.type PT_(imlib_mmx_add_blend_rgb_to_rgba_cmod,@function)
FN_(imlib_mmx_add_blend_rgba_to_rgb_cmod)
FN_(imlib_mmx_add_blend_rgba_to_rgba_cmod)
FN_(imlib_mmx_add_blend_rgb_to_rgb_cmod)
FN_(imlib_mmx_add_blend_rgb_to_rgba_cmod)
.globl PR_(imlib_mmx_add_copy_rgba_to_rgb_cmod)
.type PT_(imlib_mmx_add_copy_rgba_to_rgb_cmod,@function)
.globl PR_(imlib_mmx_add_copy_rgba_to_rgba_cmod)
.type PT_(imlib_mmx_add_copy_rgba_to_rgba_cmod,@function)
.globl PR_(imlib_mmx_add_copy_rgb_to_rgba_cmod)
.type PT_(imlib_mmx_add_copy_rgb_to_rgba_cmod,@function)
FN_(imlib_mmx_add_copy_rgba_to_rgb_cmod)
FN_(imlib_mmx_add_copy_rgba_to_rgba_cmod)
FN_(imlib_mmx_add_copy_rgb_to_rgba_cmod)
.globl PR_(imlib_mmx_subtract_blend_rgba_to_rgb_cmod)
.type PT_(imlib_mmx_subtract_blend_rgba_to_rgb_cmod,@function)
.globl PR_(imlib_mmx_subtract_blend_rgba_to_rgba_cmod)
.type PT_(imlib_mmx_subtract_blend_rgba_to_rgba_cmod,@function)
.globl PR_(imlib_mmx_subtract_blend_rgb_to_rgb_cmod)
.type PT_(imlib_mmx_subtract_blend_rgb_to_rgb_cmod,@function)
.globl PR_(imlib_mmx_subtract_blend_rgb_to_rgba_cmod)
.type PT_(imlib_mmx_subtract_blend_rgb_to_rgba_cmod,@function)
FN_(imlib_mmx_subtract_blend_rgba_to_rgb_cmod)
FN_(imlib_mmx_subtract_blend_rgba_to_rgba_cmod)
FN_(imlib_mmx_subtract_blend_rgb_to_rgb_cmod)
FN_(imlib_mmx_subtract_blend_rgb_to_rgba_cmod)
.globl PR_(imlib_mmx_subtract_copy_rgba_to_rgb_cmod)
.type PT_(imlib_mmx_subtract_copy_rgba_to_rgb_cmod,@function)
.globl PR_(imlib_mmx_subtract_copy_rgba_to_rgba_cmod)
.type PT_(imlib_mmx_subtract_copy_rgba_to_rgba_cmod,@function)
.globl PR_(imlib_mmx_subtract_copy_rgb_to_rgba_cmod)
.type PT_(imlib_mmx_subtract_copy_rgb_to_rgba_cmod,@function)
FN_(imlib_mmx_subtract_copy_rgba_to_rgb_cmod)
FN_(imlib_mmx_subtract_copy_rgba_to_rgba_cmod)
FN_(imlib_mmx_subtract_copy_rgb_to_rgba_cmod)
.globl PR_(imlib_mmx_reshade_blend_rgba_to_rgb_cmod)
.type PT_(imlib_mmx_reshade_blend_rgba_to_rgb_cmod,@function)
.globl PR_(imlib_mmx_reshade_blend_rgba_to_rgba_cmod)
.type PT_(imlib_mmx_reshade_blend_rgba_to_rgba_cmod,@function)
.globl PR_(imlib_mmx_reshade_blend_rgb_to_rgb_cmod)
.type PT_(imlib_mmx_reshade_blend_rgb_to_rgb_cmod,@function)
.globl PR_(imlib_mmx_reshade_blend_rgb_to_rgba_cmod)
.type PT_(imlib_mmx_reshade_blend_rgb_to_rgba_cmod,@function)
FN_(imlib_mmx_reshade_blend_rgba_to_rgb_cmod)
FN_(imlib_mmx_reshade_blend_rgba_to_rgba_cmod)
FN_(imlib_mmx_reshade_blend_rgb_to_rgb_cmod)
FN_(imlib_mmx_reshade_blend_rgb_to_rgba_cmod)
.globl PR_(imlib_mmx_reshade_copy_rgba_to_rgb_cmod)
.type PT_(imlib_mmx_reshade_copy_rgba_to_rgb_cmod,@function)
.globl PR_(imlib_mmx_reshade_copy_rgba_to_rgba_cmod)
.type PT_(imlib_mmx_reshade_copy_rgba_to_rgba_cmod,@function)
.globl PR_(imlib_mmx_reshade_copy_rgb_to_rgba_cmod)
.type PT_(imlib_mmx_reshade_copy_rgb_to_rgba_cmod,@function)
FN_(imlib_mmx_reshade_copy_rgba_to_rgb_cmod)
FN_(imlib_mmx_reshade_copy_rgba_to_rgba_cmod)
FN_(imlib_mmx_reshade_copy_rgb_to_rgba_cmod)
#include "asm_loadimmq.S"

View File

@ -1,22 +1,5 @@
#include <config.h>
#ifdef __EMX__
/* Due to strange behaviour of as.exe we use this macros */
/* For all OS/2 coders - please use PGCC to compile this code */
#define PR_(foo) ___##foo
#define PT_(foo,func) ___##foo,##func
#define SIZE(sym) \
.___end_##sym:; \
.size ___##sym,.___end_##sym-___##sym; \
.align 8;
#else
#define PR_(foo) __##foo
#define PT_(foo,func) __##foo,##func
#define SIZE(sym) \
.__end_##sym:; \
.size __##sym,.__end_##sym-__##sym; \
.align 8;
#endif
#include "asm.h"
#ifdef DO_MMX_ASM
@ -43,17 +26,12 @@
.text
.align 8
.globl PR_(imlib_mmx_rgb565_fast)
.type PT_(imlib_mmx_rgb565_fast,@function)
.globl PR_(imlib_mmx_bgr565_fast)
.type PT_(imlib_mmx_bgr565_fast,@function)
.globl PR_(imlib_mmx_rgb555_fast)
.type PT_(imlib_mmx_rgb555_fast,@function)
.globl PR_(imlib_mmx_bgr555_fast)
.type PT_(imlib_mmx_bgr555_fast,@function)
FN_(imlib_mmx_rgb565_fast)
FN_(imlib_mmx_bgr565_fast)
FN_(imlib_mmx_rgb555_fast)
FN_(imlib_mmx_bgr555_fast)
.globl PR_(imlib_get_cpuid)
.type PT_(imlib_get_cpuid,@function)
FN_(imlib_get_cpuid)
#include "asm_loadimmq.S"

View File

@ -1,22 +1,5 @@
#include <config.h>
#ifdef __EMX__
/* Due to strange behaviour of as.exe we use this macros */
/* For all OS/2 coders - please use PGCC to compile this code */
#define PR_(foo) ___##foo
#define PT_(foo,func) ___##foo,##func
#define SIZE(sym) \
.___end_##sym:; \
.size ___##sym,.___end_##sym-___##sym; \
.align 8;
#else
#define PR_(foo) __##foo
#define PT_(foo,func) __##foo,##func
#define SIZE(sym) \
.__end_##sym:; \
.size __##sym,.__end_##sym-__##sym; \
.align 8;
#endif
#include "asm.h"
#ifdef DO_MMX_ASM
@ -27,8 +10,7 @@
.text
.align 8
.globl PR_(imlib_mmx_RotateAA)
.type PT_(imlib_mmx_RotateAA,@function)
FN_(imlib_mmx_RotateAA)
/*\ Prototype: __imlib_mmx_RotateAA(DATA32 *src, DATA32 *dest, int sow, int sw,

View File

@ -1,22 +1,5 @@
#include <config.h>
#ifdef __EMX__
/* Due to strange behaviour of as.exe we use this macros */
/* For all OS/2 coders - please use PGCC to compile this code */
#define PR_(foo) ___##foo
#define PT_(foo,func) ___##foo,##func
#define SIZE(sym) \
.___end_##sym:; \
.size ___##sym,.___end_##sym-___##sym; \
.align 8;
#else
#define PR_(foo) __##foo
#define PT_(foo,func) __##foo,##func
#define SIZE(sym) \
.__end_##sym:; \
.size __##sym,.__end_##sym-__##sym; \
.align 8;
#endif
#include "asm.h"
#ifdef DO_MMX_ASM
@ -27,8 +10,7 @@
.text
.align 8
.globl PR_(imlib_Scale_mmx_AARGBA)
.type PT_(imlib_Scale_mmx_AARGBA,@function)
FN_(imlib_Scale_mmx_AARGBA)
/*\ Prototype: __imlib_Scale_mmx_AARGBA(ImlibScaleInfo *isi, DATA32 *dest,
|*| int dxx, int dyy, int dx, int dy, int dw, int dh, int dow, int sow)

View File

@ -387,22 +387,22 @@ typedef enum _imlibop ImlibOp;
typedef void (*ImlibBlendFunction)(DATA32*, int, DATA32*, int, int, int,
ImlibColorModifier *);
ImlibBlendFunction
__hidden ImlibBlendFunction
__imlib_GetBlendFunction(ImlibOp op, char merge_alpha, char blend, char rgb_src,
ImlibColorModifier * cm);
void
__hidden void
__imlib_BlendImageToImage(ImlibImage *im_src, ImlibImage *im_dst,
char aa, char blend, char merge_alpha,
int ssx, int ssy, int ssw, int ssh,
int ddx, int ddy, int ddw, int ddh,
ImlibColorModifier *cm, ImlibOp op,
int clx, int cly, int clw, int clh);
void
__hidden void
__imlib_BlendRGBAToData(DATA32 *src, int src_w, int src_h, DATA32 *dst,
int dst_w, int dst_h, int sx, int sy, int dx, int dy,
int w, int h, char blend, char merge_alpha,
ImlibColorModifier *cm, ImlibOp op, char rgb_src);
void
__hidden void
__imlib_build_pow_lut(void);
#ifdef DO_MMX_ASM

View File

@ -5,17 +5,17 @@
extern DATA16 _max_colors;
int __imlib_XActualDepth(Display *d, Visual *v);
Visual *__imlib_BestVisual(Display *d, int screen, int *depth_return);
DATA8 * __imlib_AllocColorTable(Display *d, Colormap cmap, DATA8 *type_return, Visual *v);
DATA8 * __imlib_AllocColors332(Display *d, Colormap cmap, Visual *v);
DATA8 * __imlib_AllocColors666(Display *d, Colormap cmap, Visual *v);
DATA8 * __imlib_AllocColors232(Display *d, Colormap cmap, Visual *v);
DATA8 * __imlib_AllocColors222(Display *d, Colormap cmap, Visual *v);
DATA8 * __imlib_AllocColors221(Display *d, Colormap cmap, Visual *v);
DATA8 * __imlib_AllocColors121(Display *d, Colormap cmap, Visual *v);
DATA8 * __imlib_AllocColors111(Display *d, Colormap cmap, Visual *v);
DATA8 * __imlib_AllocColors1(Display *d, Colormap cmap, Visual *v);
__hidden int __imlib_XActualDepth(Display *d, Visual *v);
__hidden Visual *__imlib_BestVisual(Display *d, int screen, int *depth_return);
__hidden DATA8 * __imlib_AllocColorTable(Display *d, Colormap cmap, DATA8 *type_return, Visual *v);
__hidden DATA8 * __imlib_AllocColors332(Display *d, Colormap cmap, Visual *v);
__hidden DATA8 * __imlib_AllocColors666(Display *d, Colormap cmap, Visual *v);
__hidden DATA8 * __imlib_AllocColors232(Display *d, Colormap cmap, Visual *v);
__hidden DATA8 * __imlib_AllocColors222(Display *d, Colormap cmap, Visual *v);
__hidden DATA8 * __imlib_AllocColors221(Display *d, Colormap cmap, Visual *v);
__hidden DATA8 * __imlib_AllocColors121(Display *d, Colormap cmap, Visual *v);
__hidden DATA8 * __imlib_AllocColors111(Display *d, Colormap cmap, Visual *v);
__hidden DATA8 * __imlib_AllocColors1(Display *d, Colormap cmap, Visual *v);
#endif

View File

@ -7,9 +7,11 @@
#include <string.h>
#include <math.h>
void __imlib_rgb_to_hsv(int r, int g, int b, float *hue, float *saturation, float *value);
void __imlib_hsv_to_rgb(float hue, float saturation, float value, int *r, int *g, int *b);
void __imlib_rgb_to_hls(int r, int g, int b, float *hue, float *lightness, float *saturation);
void __imlib_hls_to_rgb(float hue, float lightness, float saturation, int *r, int *g, int *b);
#include "common.h"
__hidden void __imlib_rgb_to_hsv(int r, int g, int b, float *hue, float *saturation, float *value);
__hidden void __imlib_hsv_to_rgb(float hue, float saturation, float value, int *r, int *g, int *b);
__hidden void __imlib_rgb_to_hls(int r, int g, int b, float *hue, float *lightness, float *saturation);
__hidden void __imlib_hls_to_rgb(float hue, float lightness, float saturation, int *r, int *g, int *b);
#endif

View File

@ -51,22 +51,22 @@ struct _imlib_color_modifier
#define A_CMOD(cm, a) \
(cm)->alpha_mapping[(int)(a)]
ImlibColorModifier * __imlib_CreateCmod(void);
void __imlib_FreeCmod(ImlibColorModifier *cm);
void __imlib_CmodChanged(ImlibColorModifier *cm);
void __imlib_CmodSetTables(ImlibColorModifier *cm, DATA8 *r,
__hidden ImlibColorModifier * __imlib_CreateCmod(void);
__hidden void __imlib_FreeCmod(ImlibColorModifier *cm);
__hidden void __imlib_CmodChanged(ImlibColorModifier *cm);
__hidden void __imlib_CmodSetTables(ImlibColorModifier *cm, DATA8 *r,
DATA8 *g, DATA8 *b, DATA8 *a);
void __imlib_CmodReset(ImlibColorModifier *cm);
void __imlib_DataCmodApply(DATA32 *data, int w, int h,
__hidden void __imlib_CmodReset(ImlibColorModifier *cm);
__hidden void __imlib_DataCmodApply(DATA32 *data, int w, int h,
int jump, ImlibImageFlags *fl,
ImlibColorModifier *cm);
void __imlib_CmodGetTables(ImlibColorModifier *cm, DATA8 *r,
__hidden void __imlib_CmodGetTables(ImlibColorModifier *cm, DATA8 *r,
DATA8 *g, DATA8 *b, DATA8 *a);
void __imlib_CmodModBrightness(ImlibColorModifier *cm,
__hidden void __imlib_CmodModBrightness(ImlibColorModifier *cm,
double v);
void __imlib_CmodModContrast(ImlibColorModifier *cm,
__hidden void __imlib_CmodModContrast(ImlibColorModifier *cm,
double v);
void __imlib_CmodModGamma(ImlibColorModifier *cm,
__hidden void __imlib_CmodModGamma(ImlibColorModifier *cm,
double v);
#endif

View File

@ -15,6 +15,12 @@
#include <sys/types.h>
#endif
#ifdef USE_HIDDEN_FUNCTION_ATTRIBUTE
#define __hidden __attribute__((visibility("hidden")))
#else
#define __hidden
#endif
#define DATABIG unsigned long long
#define DATA64 unsigned long long
#define DATA32 unsigned int
@ -22,7 +28,7 @@
#define DATA8 unsigned char
#ifdef DO_MMX_ASM
int __imlib_get_cpuid(void);
__hidden int __imlib_get_cpuid(void);
#define CPUID_MMX (1 << 23)
#define CPUID_XMM (1 << 25)
#endif

View File

@ -21,15 +21,15 @@ struct _context
void *b_dither;
};
void __imlib_SetMaxContexts(int num);
int __imlib_GetMaxContexts(void);
void __imlib_FlushContexts(void);
void __imlib_FreeContextForDisplay(Display *d);
void __imlib_FreeContextForColormap(Display *d, Colormap cm);
void __imlib_FreeContextForVisual(Display *d, Visual *v);
Context *__imlib_FindContext(Display *d, Visual *v, Colormap c, int depth);
Context *__imlib_NewContext(Display *d, Visual *v, Colormap c, int depth);
Context *__imlib_GetContext(Display *d, Visual *v, Colormap c, int depth);
__hidden void __imlib_SetMaxContexts(int num);
__hidden int __imlib_GetMaxContexts(void);
__hidden void __imlib_FlushContexts(void);
__hidden void __imlib_FreeContextForDisplay(Display *d);
__hidden void __imlib_FreeContextForColormap(Display *d, Colormap cm);
__hidden void __imlib_FreeContextForVisual(Display *d, Visual *v);
__hidden Context *__imlib_FindContext(Display *d, Visual *v, Colormap c, int depth);
__hidden Context *__imlib_NewContext(Display *d, Visual *v, Colormap c, int depth);
__hidden Context *__imlib_GetContext(Display *d, Visual *v, Colormap c, int depth);
#endif

View File

@ -3,7 +3,7 @@
#ifdef BUILD_X11
char
__hidden char
__imlib_CreatePixmapsForImage(Display *d, Drawable w, Visual *v, int depth,
Colormap cm, ImlibImage *im, Pixmap *p, Mask *m,
int sx, int sy, int sw, int sh,

View File

@ -29,11 +29,11 @@ struct _imlib_external_filter
pImlibExternalFilter next;
};
void __imlib_dynamic_filters_init();
void __imlib_dynamic_filters_deinit();
pImlibExternalFilter __imlib_get_dynamic_filter( char *name );
char **__imlib_ListFilters(int *num_ret);
pImlibExternalFilter __imlib_LoadFilter( char *file );
__hidden void __imlib_dynamic_filters_init();
__hidden void __imlib_dynamic_filters_deinit();
__hidden pImlibExternalFilter __imlib_get_dynamic_filter( char *name );
__hidden char **__imlib_ListFilters(int *num_ret);
__hidden pImlibExternalFilter __imlib_LoadFilter( char *file );

View File

@ -1,20 +1,20 @@
#ifndef __FILE
#define __FILE 1
char *__imlib_FileKey(const char *file);
char *__imlib_FileRealFile(const char *file);
char *__imlib_FileExtension(const char *file);
int __imlib_FileExists(const char *s);
int __imlib_FileIsFile(const char *s);
int __imlib_FileIsDir(const char *s);
char **__imlib_FileDir(char *dir, int *num);
void __imlib_FileFreeDirList(char **l, int num);
void __imlib_FileDel(char *s);
time_t __imlib_FileModDate(const char *s);
char *__imlib_FileHomeDir(int uid);
char *__imlib_FileField(char *s, int field);
int __imlib_FilePermissions(const char *s);
int __imlib_FileCanRead(const char *s);
int __imlib_IsRealFile(const char *s);
__hidden char *__imlib_FileKey(const char *file);
__hidden char *__imlib_FileRealFile(const char *file);
__hidden char *__imlib_FileExtension(const char *file);
__hidden int __imlib_FileExists(const char *s);
__hidden int __imlib_FileIsFile(const char *s);
__hidden int __imlib_FileIsDir(const char *s);
__hidden char **__imlib_FileDir(char *dir, int *num);
__hidden void __imlib_FileFreeDirList(char **l, int num);
__hidden void __imlib_FileDel(char *s);
__hidden time_t __imlib_FileModDate(const char *s);
__hidden char *__imlib_FileHomeDir(int uid);
__hidden char *__imlib_FileField(char *s, int field);
__hidden int __imlib_FilePermissions(const char *s);
__hidden int __imlib_FileCanRead(const char *s);
__hidden int __imlib_IsRealFile(const char *s);
#endif

View File

@ -23,20 +23,20 @@ struct _imlib_filter
ImlibFilterColor alpha, red, green, blue;
};
ImlibFilter *
__hidden ImlibFilter *
__imlib_CreateFilter(int size);
void
__hidden void
__imlib_FreeFilter(ImlibFilter *fil);
void
__hidden void
__imlib_FilterSet(ImlibFilterColor *fil, int x, int y,
int a, int r, int g, int b);
void
__hidden void
__imlib_FilterSetColor(ImlibFilterColor * fil, int x, int y,
int a, int r, int g, int b);
void
__hidden void
__imlib_FilterDivisors(ImlibFilter *fil, int a, int r, int g, int b);
void
__hidden void
__imlib_FilterConstants(ImlibFilter *fil, int a, int r, int g, int b);
void
__hidden void
__imlib_FilterImage(ImlibImage *im, ImlibFilter *fil);
#endif

View File

@ -3,12 +3,12 @@
#ifdef BUILD_X11
char
__hidden char
__imlib_GrabDrawableToRGBA(DATA32 *data, int ox, int oy, int ow, int oh,
Display *d, Drawable p, Pixmap m, Visual *v,
Colormap cm, int depth, int x, int y,
int w, int h, char domask, char grab);
void
__hidden void
__imlib_GrabXImageToRGBA(DATA32 *data, int ox, int oy, int ow, int oh,
Display *d, XImage *xim, XImage *mxim, Visual *v,
int depth, int x, int y,

View File

@ -16,13 +16,13 @@ struct _imlib_range
ImlibRangeColor *color;
};
ImlibRange *__imlib_CreateRange(void);
void __imlib_FreeRange(ImlibRange *rg);
void __imlib_AddRangeColor(ImlibRange *rg, DATA8 r, DATA8 g, DATA8 b,
__hidden ImlibRange *__imlib_CreateRange(void);
__hidden void __imlib_FreeRange(ImlibRange *rg);
__hidden void __imlib_AddRangeColor(ImlibRange *rg, DATA8 r, DATA8 g, DATA8 b,
DATA8 a, int dist);
DATA32 *__imlib_MapRange(ImlibRange *rg, int len);
DATA32 *__imlib_MapHsvaRange(ImlibRange *rg, int len);
void __imlib_DrawGradient(ImlibImage *im, int x, int y, int w, int h, ImlibRange *rg, double angle, ImlibOp op, int clx, int cly, int clw, int clh);
void __imlib_DrawHsvaGradient(ImlibImage *im, int x, int y, int w, int h, ImlibRange *rg, double angle, ImlibOp op, int clx, int cly, int clw, int clh);
__hidden DATA32 *__imlib_MapRange(ImlibRange *rg, int len);
__hidden DATA32 *__imlib_MapHsvaRange(ImlibRange *rg, int len);
__hidden void __imlib_DrawGradient(ImlibImage *im, int x, int y, int w, int h, ImlibRange *rg, double angle, ImlibOp op, int clx, int cly, int clw, int clh);