Be lighter on 'inline'

SVN revision: 32219
This commit is contained in:
Gustavo Sverzut Barbieri 2007-10-30 21:06:08 +00:00
parent a807f3805b
commit 46cf9a5921
6 changed files with 40 additions and 32 deletions

View File

@ -58,6 +58,14 @@
#define pld(addr, off)
#endif /* __ARMEL__ */
#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 IMG_BYTE_SIZE(stride, height, has_alpha) \
((stride) * (height) * (!(has_alpha) ? 2 : 3))

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 inline void
static 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 @@ soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src)
_soft16_convert_from_rgba_scanline(sp, dp, ap, y, im->w);
}
static inline void
static always_inline void
_soft16_convert_from_rgb_pt(const DATA32 *src, DATA16 *dst,
const int x, const int y)
{

View File

@ -1,7 +1,7 @@
#include "evas_soft16.h"
#include "evas_soft16_scanline_blend.c"
static inline void
static always_inline void
_glyph_pt_mask_solid_solid(DATA16 *dst,
const DATA16 rgb565,
const DATA32 rgb565_unpack,
@ -20,7 +20,7 @@ _glyph_pt_mask_solid_solid(DATA16 *dst,
}
}
static inline void
static void
_glyph_scanline_mask_solid_solid(DATA16 *dst,
int size,
const DATA16 rgb565,
@ -50,7 +50,7 @@ _glyph_scanline_mask_solid_solid(DATA16 *dst,
_glyph_pt_mask_solid_solid(start, rgb565, rgb565_unpack, mask);
}
static inline void
static always_inline void
_glyph_pt_mask_transp_solid(DATA16 *dst,
DATA32 rgb565_unpack,
DATA8 alpha,
@ -72,7 +72,7 @@ _glyph_pt_mask_transp_solid(DATA16 *dst,
*dst = RGB_565_PACK(b);
}
static inline void
static void
_glyph_scanline_mask_transp_solid(DATA16 *dst,
int size,
const DATA32 rgb565_unpack,
@ -183,7 +183,7 @@ _glyph_scanline(Soft16_Image *dst, const DATA8 *p_mask,
}
}
static inline void
static void
_soft16_font_glyph_draw_grayscale(Soft16_Image *dst,
RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg,
int x, int y, DATA8 alpha, DATA16 rgb565,
@ -222,7 +222,7 @@ _glyph_create_mask_line(DATA8 *mask, const DATA8 *bitmap, int w)
}
}
static inline void
static void
_soft16_font_glyph_draw_mono(Soft16_Image *dst,
RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg,
int x, int y, DATA8 alpha, DATA16 rgb565,

View File

@ -56,7 +56,7 @@ _is_empty_clip(const struct RGBA_Draw_Context_clip clip)
return clip.w < 1 || clip.h < 1;
}
static inline void
static void
_soft16_line_point(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y)
{
DATA16 rgb565, *dst_itr;
@ -86,7 +86,7 @@ _soft16_line_point(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y)
}
}
static inline void
static void
_soft16_line_horiz(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int x1, int y)
{
DATA16 rgb565, *dst_itr;
@ -124,7 +124,7 @@ _soft16_line_horiz(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int x1, int
}
}
static inline void
static void
_soft16_line_vert(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y0, int y1)
{
DATA16 rgb565, *dst_itr;
@ -281,7 +281,7 @@ _soft16_line_45deg(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int
}
}
static inline void
static always_inline void
_soft16_line_aliased_pt(DATA16 *dst_itr, DATA16 rgb565, DATA32 rgb565_unpack, DATA8 alpha)
{
if (alpha == 32)
@ -290,7 +290,7 @@ _soft16_line_aliased_pt(DATA16 *dst_itr, DATA16 rgb565, DATA32 rgb565_unpack, DA
_soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha);
}
static inline void
static void
_soft16_line_aliased(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
{
int dx, dy, step_y, step_dst_itr;

View File

@ -11,7 +11,7 @@
*
****************************************************************************/
static inline void
static always_inline void
_soft16_pt_blend_transp_solid(DATA16 *p_dst, DATA16 src, DATA8 alpha)
{
if (alpha == 31) *p_dst = src;
@ -29,7 +29,7 @@ _soft16_pt_blend_transp_solid(DATA16 *p_dst, DATA16 src, DATA8 alpha)
/***********************************************************************
* Regular blend operations
*/
static inline void
static void
_soft16_scanline_blend_transp_solid(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size)
{
DATA16 *start, *end;
@ -85,7 +85,7 @@ _soft16_scanline_blend_transp_solid(DATA16 *src, DATA8 *alpha, DATA16 *dst, int
_soft16_pt_blend_transp_solid(start, *src, *alpha);
}
static inline void
static always_inline void
_soft16_pt_blend_solid_solid(DATA16 *p_dst, DATA16 src)
{
*p_dst = src;
@ -101,7 +101,7 @@ _soft16_scanline_blend_solid_solid(DATA16 *src, DATA16 *dst, int size)
* Blend operations taking an extra alpha (fade in, out)
*/
static inline void
static always_inline void
_soft16_pt_blend_transp_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 rel_alpha)
{
DATA32 a, b;
@ -118,7 +118,7 @@ _soft16_pt_blend_transp_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 alpha,
*p_dst = RGB_565_PACK(b);
}
static inline void
static void
_soft16_scanline_blend_transp_solid_mul_alpha(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size, const DATA8 rel_alpha)
{
DATA16 *start, *end;
@ -179,7 +179,7 @@ _soft16_scanline_blend_transp_solid_mul_alpha(DATA16 *src, DATA8 *alpha, DATA16
_soft16_pt_blend_transp_solid_mul_alpha(start, *src, *alpha, rel_alpha);
}
static inline void
static always_inline void
_soft16_pt_blend_solid_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 rel_alpha)
{
DATA32 a, b;
@ -189,7 +189,7 @@ _soft16_pt_blend_solid_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 rel_alph
*p_dst = RGB_565_PACK(b);
}
static inline void
static void
_soft16_scanline_blend_solid_solid_mul_alpha(DATA16 *src, DATA16 *dst, int size, DATA8 rel_alpha)
{
DATA16 *start, *end;
@ -218,7 +218,7 @@ _soft16_scanline_blend_solid_solid_mul_alpha(DATA16 *src, DATA16 *dst, int size,
* Blend operations with extra alpha and multiply color
*/
static inline void
static 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;
@ -240,7 +240,7 @@ _soft16_pt_blend_transp_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8
*p_dst = RGB_565_PACK(d);
}
static inline void
static void
_soft16_scanline_blend_transp_solid_mul_color_transp(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b)
{
DATA16 *start, *end;
@ -302,7 +302,7 @@ _soft16_scanline_blend_transp_solid_mul_color_transp(DATA16 *src, DATA8 *alpha,
(start, *src, *alpha, rel_alpha, r, g, b);
}
static inline void
static 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;
@ -318,7 +318,7 @@ _soft16_pt_blend_solid_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8 r
*p_dst = RGB_565_PACK(d);
}
static inline void
static void
_soft16_scanline_blend_solid_solid_mul_color_transp(DATA16 *src, DATA16 *dst, int size, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b)
{
DATA16 *start, *end;
@ -348,7 +348,7 @@ _soft16_scanline_blend_solid_solid_mul_color_transp(DATA16 *src, DATA16 *dst, in
/***********************************************************************
* Blend operations with extra multiply color
*/
static inline void
static 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;
@ -371,7 +371,7 @@ _soft16_pt_blend_transp_solid_mul_color_solid(DATA16 *p_dst, DATA16 src, DATA8 a
}
}
static inline void
static void
_soft16_scanline_blend_transp_solid_mul_color_solid(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size, DATA16 r, DATA16 g, DATA16 b)
{
DATA16 *start, *end;
@ -433,7 +433,7 @@ _soft16_scanline_blend_transp_solid_mul_color_solid(DATA16 *src, DATA8 *alpha, D
(start, *src, *alpha, r, g, b);
}
static inline void
static 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;
@ -445,7 +445,7 @@ _soft16_pt_blend_solid_solid_mul_color_solid(DATA16 *p_dst, DATA16 src, DATA16 r
*p_dst = (r1 << 11) | (g1 << 5) | b1;
}
static inline void
static void
_soft16_scanline_blend_solid_solid_mul_color_solid(DATA16 *src, DATA16 *dst, int size, DATA8 r, DATA8 g, DATA8 b)
{
DATA16 *start, *end;

View File

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