Evas: efl_attributes.m4

NEVER define a macro whose name is the name of the attribute, it breaks compilation on some platforms


SVN revision: 64749
This commit is contained in:
Vincent Torri 2011-11-04 22:08:54 +00:00
parent 22dffda1e7
commit e7d87f2539
14 changed files with 38 additions and 54 deletions

View File

@ -71,9 +71,9 @@ __attribute__((always_inline)) inline void foo(void) {}
AC_MSG_RESULT([${have_attribute_always_inline}])
if test "x${have_attribute_always_inline}" = "xyes" ; then
AC_DEFINE([always_inline], [__attribute__ ((always_inline)) inline], [Macro declaring a function to always be inlined.])
AC_DEFINE([EFL_ALWAYS_INLINE], [__attribute__ ((always_inline)) inline], [Macro declaring a function to always be inlined.])
else
AC_DEFINE([always_inline], [inline], [Macro declaring a function to always be inlined.])
AC_DEFINE([EFL_ALWAYS_INLINE], [inline], [Macro declaring a function to always be inlined.])
fi
])

View File

@ -138,7 +138,7 @@ static const DATA8 dither_table[S16_DM_SIZE][S16_DM_SIZE] =
{ 51, 14, 61, 29, 59, 20, 55, 31, 0, 49, 11, 60, 3, 26, 22, 56, 0, 40, 12, 43, 41, 8, 36, 0, 17, 57, 24, 2, 46, 26, 61, 18, 0, 38, 12, 59, 6, 49, 3, 57, 19, 63, 5, 33, 18, 54, 28, 56, 0, 43, 26, 46, 63, 27, 56, 22, 27, 54, 38, 28, 63, 24, 10, 45, 0, 31, 42, 21, 12, 25, 44, 49, 59, 6, 26, 50, 3, 34, 27, 59, 0, 35, 62, 16, 4, 58, 47, 0, 43, 24, 37, 2, 54, 20, 46, 31, 0, 56, 34, 5, 55, 45, 60, 37, 0, 40, 10, 38, 63, 46, 15, 20, 0, 53, 21, 62, 30, 11, 24, 27, 40, 0, 57, 26, 3, 45, 27, 35 }
};
static always_inline void
static EFL_ALWAYS_INLINE void
_soft16_convert_from_rgba_pt(const DATA32 *src, DATA16 *dst, DATA8 *alpha,
const int x, const int y)
{
@ -228,7 +228,7 @@ evas_common_soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src)
_soft16_convert_from_rgba_scanline(sp, dp, ap, y, im->cache_entry.w);
}
static always_inline void
static EFL_ALWAYS_INLINE void
_soft16_convert_from_rgb_pt(const DATA32 *src, DATA16 *dst,
const int x, const int y)
{

View File

@ -1,6 +1,6 @@
#include "evas_common_soft16.h"
static always_inline void
static EFL_ALWAYS_INLINE void
_glyph_pt_mask_solid_solid(DATA16 *dst,
const DATA16 rgb565,
const DATA32 rgb565_unpack,
@ -49,7 +49,7 @@ _glyph_scanline_mask_solid_solid(DATA16 *dst,
_glyph_pt_mask_solid_solid(start, rgb565, rgb565_unpack, mask);
}
static always_inline void
static EFL_ALWAYS_INLINE void
_glyph_pt_mask_transp_solid(DATA16 *dst,
DATA32 rgb565_unpack,
DATA8 alpha,

View File

@ -281,7 +281,7 @@ _soft16_line_45deg(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int
}
}
static always_inline void
static EFL_ALWAYS_INLINE void
_soft16_line_aliased_pt(DATA16 *dst_itr, DATA16 rgb565, DATA32 rgb565_unpack, DATA8 alpha)
{
if (alpha == 32)

View File

@ -15,7 +15,7 @@
* Regular blend operations
*/
static always_inline void
static EFL_ALWAYS_INLINE void
_soft16_pt_blend_transp_solid(DATA16 *p_dst, DATA16 src, DATA8 alpha)
{
if (alpha == 31) *p_dst = src;
@ -30,7 +30,7 @@ _soft16_pt_blend_transp_solid(DATA16 *p_dst, DATA16 src, DATA8 alpha)
}
}
static always_inline void
static EFL_ALWAYS_INLINE void
_soft16_pt_blend_solid_solid(DATA16 *p_dst, DATA16 src)
{
*p_dst = src;
@ -40,7 +40,7 @@ _soft16_pt_blend_solid_solid(DATA16 *p_dst, DATA16 src)
* Blend operations taking an extra alpha (fade in, out)
*/
static always_inline void
static EFL_ALWAYS_INLINE void
_soft16_pt_blend_transp_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 rel_alpha)
{
DATA32 a, b;
@ -57,7 +57,7 @@ _soft16_pt_blend_transp_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 alpha,
*p_dst = RGB_565_PACK(b);
}
static always_inline void
static EFL_ALWAYS_INLINE void
_soft16_pt_blend_solid_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 rel_alpha)
{
DATA32 a, b;
@ -71,7 +71,7 @@ _soft16_pt_blend_solid_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 rel_alph
* Blend operations with extra alpha and multiply color
*/
static always_inline void
static EFL_ALWAYS_INLINE void
_soft16_pt_blend_transp_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b)
{
DATA32 rgb, d;
@ -93,7 +93,7 @@ _soft16_pt_blend_transp_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8
*p_dst = RGB_565_PACK(d);
}
static always_inline void
static EFL_ALWAYS_INLINE void
_soft16_pt_blend_solid_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b)
{
int r1, g1, b1;
@ -113,7 +113,7 @@ _soft16_pt_blend_solid_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8 r
* Blend operations with extra multiply color
*/
static always_inline void
static EFL_ALWAYS_INLINE void
_soft16_pt_blend_transp_solid_mul_color_solid(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 r, DATA8 g, DATA8 b)
{
int r1, g1, b1;
@ -136,7 +136,7 @@ _soft16_pt_blend_transp_solid_mul_color_solid(DATA16 *p_dst, DATA16 src, DATA8 a
}
}
static always_inline void
static EFL_ALWAYS_INLINE void
_soft16_pt_blend_solid_solid_mul_color_solid(DATA16 *p_dst, DATA16 src, DATA16 r, DATA16 g, DATA16 b)
{
int r1, g1, b1;

View File

@ -10,7 +10,7 @@
* _soft16_scanline_<description>_<src>_<dst>[_<modifier>]()
*
****************************************************************************/
static always_inline void
static EFL_ALWAYS_INLINE void
_soft16_pt_fill_solid_solid(DATA16 *dst, DATA16 rgb565)
{
*dst = rgb565;
@ -52,7 +52,7 @@ _soft16_scanline_fill_solid_solid(DATA16 *dst, int size, DATA16 rgb565)
*start = rgb565;
}
static always_inline void
static EFL_ALWAYS_INLINE void
_soft16_pt_fill_transp_solid(DATA16 *dst, DATA32 rgb565_unpack, DATA8 alpha)
{
DATA32 d;

View File

@ -1,6 +1,6 @@
#include "evas_common_soft8.h"
static always_inline void
static EFL_ALWAYS_INLINE void
_soft8_convert_from_rgba_pt(const DATA32 * src, DATA8 * dst, DATA8 * alpha)
{
if (A_VAL(src) == 0)
@ -56,7 +56,7 @@ evas_common_soft8_image_convert_from_rgba(Soft8_Image * im, const DATA32 * src)
_soft8_convert_from_rgba_scanline(sp, dp, ap, im->cache_entry.w);
}
static always_inline void
static EFL_ALWAYS_INLINE void
_soft8_convert_from_rgb_pt(const DATA32 * src, DATA8 * dst)
{
*dst = GRY_8_FROM_RGB(src);

View File

@ -1,7 +1,7 @@
#include "evas_common_soft8.h"
#include "evas_soft8_scanline_blend.c"
static always_inline void
static EFL_ALWAYS_INLINE void
_glyph_pt_mask_solid_solid(DATA8 * dst, const DATA8 gry8, const DATA8 * mask)
{
DATA8 alpha = *mask;
@ -41,7 +41,7 @@ _glyph_scanline_mask_solid_solid(DATA8 * dst,
_glyph_pt_mask_solid_solid(start, gry8, mask);
}
static always_inline void
static EFL_ALWAYS_INLINE void
_glyph_pt_mask_transp_solid(DATA8 * dst,
DATA8 gry8, DATA8 alpha, const DATA8 * mask)
{

View File

@ -265,7 +265,7 @@ _soft8_line_45deg(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0,
}
}
static always_inline void
static EFL_ALWAYS_INLINE void
_soft8_line_aliased_pt(DATA8 * dst_itr, DATA8 gry8, DATA8 alpha)
{
if (alpha == 32)

View File

@ -11,7 +11,7 @@
*
****************************************************************************/
static always_inline void
static EFL_ALWAYS_INLINE void
_soft8_pt_blend_transp_solid(DATA8 * p_dst, DATA8 src, DATA8 alpha)
{
if (alpha == 0xff)
@ -82,7 +82,7 @@ _soft8_scanline_blend_transp_solid(DATA8 * src, DATA8 * alpha, DATA8 * dst,
_soft8_pt_blend_transp_solid(start, *src, *alpha);
}
static always_inline void
static EFL_ALWAYS_INLINE void
_soft8_pt_blend_solid_solid(DATA8 * p_dst, DATA8 src)
{
*p_dst = src;
@ -173,7 +173,7 @@ _soft8_scanline_blend_transp_solid_mul_alpha(DATA8 * src, DATA8 * alpha,
_soft8_pt_blend_transp_solid_mul_alpha(start, *src, *alpha, rel_alpha);
}
static always_inline void
static EFL_ALWAYS_INLINE void
_soft8_pt_blend_solid_solid_mul_alpha(DATA8 * p_dst, DATA8 src, DATA8 rel_alpha)
{
*p_dst = GRY_8_BLEND_UNMUL(src, *p_dst, rel_alpha);
@ -209,7 +209,7 @@ _soft8_scanline_blend_solid_solid_mul_alpha(DATA8 * src, DATA8 * dst, int size,
* Blend operations with extra alpha and multiply color
*/
static always_inline void
static EFL_ALWAYS_INLINE void
_soft8_pt_blend_transp_solid_mul_color_transp(DATA8 * p_dst, DATA8 src,
DATA8 alpha, DATA8 rel_alpha,
DATA8 r, DATA8 g, DATA8 b)
@ -289,7 +289,7 @@ _soft8_scanline_blend_transp_solid_mul_color_transp(DATA8 * src, DATA8 * alpha,
(start, *src, *alpha, rel_alpha, r, g, b);
}
static always_inline void
static EFL_ALWAYS_INLINE void
_soft8_pt_blend_solid_solid_mul_color_transp(DATA8 * p_dst, DATA8 src,
DATA8 rel_alpha, DATA8 r, DATA8 g,
DATA8 b)
@ -329,7 +329,7 @@ _soft8_scanline_blend_solid_solid_mul_color_transp(DATA8 * src, DATA8 * dst,
/***********************************************************************
* Blend operations with extra multiply color
*/
static always_inline void
static EFL_ALWAYS_INLINE void
_soft8_pt_blend_transp_solid_mul_color_solid(DATA8 * p_dst, DATA8 src,
DATA8 alpha, DATA8 r, DATA8 g,
DATA8 b)
@ -411,7 +411,7 @@ _soft8_scanline_blend_transp_solid_mul_color_solid(DATA8 * src, DATA8 * alpha,
(start, *src, *alpha, r, g, b);
}
static always_inline void
static EFL_ALWAYS_INLINE void
_soft8_pt_blend_solid_solid_mul_color_solid(DATA8 * p_dst, DATA8 src, DATA8 r,
DATA8 g, DATA8 b)
{

View File

@ -10,19 +10,19 @@
* _soft8_scanline_<description>_<src>_<dst>[_<modifier>]()
*
****************************************************************************/
static always_inline void
static EFL_ALWAYS_INLINE void
_soft8_pt_fill_solid_solid(DATA8 * dst, DATA8 gry8)
{
*dst = gry8;
}
static always_inline void
static EFL_ALWAYS_INLINE void
_soft8_scanline_fill_solid_solid(DATA8 * dst, int size, DATA8 gry8)
{
memset(dst, gry8, size);
}
static always_inline void
static EFL_ALWAYS_INLINE void
_soft8_pt_fill_transp_solid(DATA8 * dst, DATA8 gry8, DATA8 alpha)
{
*dst = GRY_8_BLEND(gry8, *dst, alpha);

View File

@ -200,7 +200,7 @@ static __m128i RGB_MASK_SSE3;
static __m128i ALPHA_SSE3;
static always_inline __m128i
static EFL_ALWAYS_INLINE __m128i
mul_256_sse3(__m128i a, __m128i c) {
/* prepare alpha for word multiplication */
@ -228,7 +228,7 @@ mul_256_sse3(__m128i a, __m128i c) {
return _mm_add_epi32(c0, c1);
}
static always_inline __m128i
static EFL_ALWAYS_INLINE __m128i
sub4_alpha_sse3(__m128i c) {
__m128i c0 = c;
@ -237,7 +237,7 @@ sub4_alpha_sse3(__m128i c) {
return _mm_sub_epi32(ALPHA_SSE3, c0);
}
static always_inline __m128i
static EFL_ALWAYS_INLINE __m128i
interp4_256_sse3(__m128i a, __m128i c0, __m128i c1)
{
const __m128i zero = _mm_setzero_si128();
@ -289,7 +289,7 @@ interp4_256_sse3(__m128i a, __m128i c0, __m128i c1)
return (__m128i) _mm_shuffle_ps( (__m128)cl_sub, (__m128)ch_sub, 0x44);
}
static always_inline __m128i
static EFL_ALWAYS_INLINE __m128i
mul_sym_sse3(__m128i a, __m128i c) {
/* Prepare alpha for word mult */
@ -318,7 +318,7 @@ mul_sym_sse3(__m128i a, __m128i c) {
return _mm_add_epi32(c0, c1);
}
static always_inline __m128i
static EFL_ALWAYS_INLINE __m128i
mul4_sym_sse3(__m128i x, __m128i y) {
const __m128i zero = _mm_setzero_si128();
@ -341,7 +341,7 @@ mul4_sym_sse3(__m128i x, __m128i y) {
return _mm_packus_epi16(r_l, r_h);
}
static always_inline __m128i
static EFL_ALWAYS_INLINE __m128i
mul3_sym_sse3(__m128i x, __m128i y) {
__m128i res = mul4_sym_sse3(x, y);

View File

@ -8,14 +8,6 @@
extern "C" {
#endif
#ifndef always_inline
#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
# define always_inline __attribute__((always_inline)) inline
#else
# define always_inline inline
#endif
#endif
#define RGB_565_UNPACKED_MASK 0x07e0f81f
#define RGB_565_UNPACK(rgb) \
(((rgb) | ((rgb) << 16)) & RGB_565_UNPACKED_MASK)

View File

@ -8,14 +8,6 @@
extern "C" {
#endif
#ifndef always_inline
#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
# define always_inline __attribute__((always_inline)) inline
#else
# define always_inline inline
#endif
#endif
#define GRY_8_BLEND(a, b, alpha) \
((b) + (a) - ((((b) * ((alpha) + 1)) >> 8) & 0xff))