2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
9 # include "config.h" /* so that EAPI in Evas.h is correctly defined */
19 /* macros needed to log message through eina_log */
20 extern EAPI int _evas_log_dom_global;
21 #ifdef _EVAS_DEFAULT_LOG_DOM
22 # undef _EVAS_DEFAULT_LOG_DOM
24 #define _EVAS_DEFAULT_LOG_DOM _evas_log_dom_global
26 #ifdef EVAS_DEFAULT_LOG_COLOR
27 # undef EVAS_DEFAULT_LOG_COLOR
29 #define EVAS_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
34 #define ERR(...) EINA_LOG_DOM_ERR(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
39 #define DBG(...) EINA_LOG_DOM_DBG(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
44 #define INF(...) EINA_LOG_DOM_INFO(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
49 #define WRN(...) EINA_LOG_DOM_WARN(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
54 #define CRIT(...) EINA_LOG_DOM_CRIT(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
56 /*****************************************************************************/
58 #include "evas_options.h"
60 #if defined(__ARM_ARCH_3M__)
61 # define __ARM_ARCH__ 40
63 #if defined(__ARM_ARCH_4__)
64 # define __ARM_ARCH__ 40
66 #if defined(__ARM_ARCH_4T__)
67 # define __ARM_ARCH__ 41
70 #if defined(__ARM_ARCH_5__)
71 # define __ARM_ARCH__ 50
73 #if defined(__ARM_ARCH_5T__)
74 # define __ARM_ARCH__ 51
76 #if defined(__ARM_ARCH_5E__)
77 # define __ARM_ARCH__ 52
79 #if defined(__ARM_ARCH_5TE__)
80 # define __ARM_ARCH__ 53
82 #if defined(__ARM_ARCH_5TEJ__)
83 # define __ARM_ARCH__ 54
86 #if defined(__ARM_ARCH_6__)
87 # define __ARM_ARCH__ 60
89 #if defined(__ARM_ARCH_6J__)
90 # define __ARM_ARCH__ 61
92 #if defined(__ARM_ARCH_6K__)
93 # define __ARM_ARCH__ 62
95 #if defined(__ARM_ARCH_6Z__)
96 # define __ARM_ARCH__ 63
98 #if defined(__ARM_ARCH_6ZK__)
99 # define __ARM_ARCH__ 64
101 #if defined(__ARM_ARCH_6T2__)
102 # define __ARM_ARCH__ 65
105 #if defined(__ARM_ARCH_7__)
106 # define __ARM_ARCH__ 70
108 #if defined(__ARM_ARCH_7A__)
109 # define __ARM_ARCH__ 71
111 #if defined(__ARM_ARCH_7R__)
112 # define __ARM_ARCH__ 72
114 #if defined(__ARM_ARCH_7M__)
115 # define __ARM_ARCH__ 73
122 #ifndef BUILD_PTHREAD
123 # undef BUILD_PIPE_RENDER
126 #if defined(BUILD_ASYNC_PRELOAD) && !defined(BUILD_PTHREAD)
127 # define BUILD_PTHREAD
136 # include <pthread.h>
138 # define LK(x) pthread_mutex_t x
139 # define LKI(x) pthread_mutex_init(&(x), NULL);
140 # define LKD(x) pthread_mutex_destroy(&(x));
141 # define LKL(x) pthread_mutex_lock(&(x));
142 # define LKT(x) pthread_mutex_trylock(&(x));
143 # define LKU(x) pthread_mutex_unlock(&(x));
144 # define TH(x) pthread_t x
145 # define THI(x) int x
148 // even though in theory having every Nth rendered line done by a different
149 // thread might even out load across threads - it actually slows things down.
166 #elif defined __GNUC__
167 # define alloca __builtin_alloca
169 # define alloca __alloca
170 #elif defined _MSC_VER
172 # define alloca _alloca
178 void *alloca (size_t);
184 #include <sys/types.h>
185 #include <sys/stat.h>
193 #include <ft2build.h>
194 #include FT_FREETYPE_H
201 // BROKEN in gcc 4 on amd64
202 //# pragma GCC visibility push(hidden)
204 #define LIKELY(x) __builtin_expect(!!(x), 1)
205 #define UNLIKELY(x) __builtin_expect(!!(x), 0)
207 #define LIKELY(x) (x)
208 #define UNLIKELY(x) (x)
211 /*****************************************************************************/
213 /* use exact rects for updates not tiles */
214 /* #define RECTUPDATE */
216 #define IMG_MAX_SIZE 65000
218 #define IMG_TOO_BIG(w, h) \
219 ((((unsigned long long)w) * ((unsigned long long)h)) >= \
220 ((1ULL << (29 * (sizeof(void *) / 4))) - 2048))
222 #ifdef BUILD_SMALL_DITHER_MASK
223 # define DM_TABLE _evas_dither_44
227 # define USE_DITHER_44 1
228 # define DM_MSK (DM_SIZE - 1)
229 # define DM_SHF(_b) (DM_BITS - (8 - _b))
231 # define DM_TABLE _evas_dither_128128
235 # define USE_DITHER_128128 1
236 # define DM_MSK (DM_SIZE - 1)
237 # define DM_SHF(_b) (DM_BITS - (8 - _b))
240 /* if more than 1/ALPHA_SPARSE_INV_FRACTION is "alpha" (1-254) then sparse
241 * alpha flag gets set */
242 #define ALPHA_SPARSE_INV_FRACTION 3
244 /*****************************************************************************/
246 #if defined(__ARM_ARCH_3M__)
247 # define __ARM_ARCH__ 40
249 #if defined(__ARM_ARCH_4__)
250 # define __ARM_ARCH__ 40
252 #if defined(__ARM_ARCH_4T__)
253 # define __ARM_ARCH__ 41
256 #if defined(__ARM_ARCH_5__)
257 # define __ARM_ARCH__ 50
259 #if defined(__ARM_ARCH_5T__)
260 # define __ARM_ARCH__ 51
262 #if defined(__ARM_ARCH_5E__)
263 # define __ARM_ARCH__ 52
265 #if defined(__ARM_ARCH_5TE__)
266 # define __ARM_ARCH__ 53
268 #if defined(__ARM_ARCH_5TEJ__)
269 # define __ARM_ARCH__ 54
272 #if defined(__ARM_ARCH_6__)
273 # define __ARM_ARCH__ 60
275 #if defined(__ARM_ARCH_6J__)
276 # define __ARM_ARCH__ 61
278 #if defined(__ARM_ARCH_6K__)
279 # define __ARM_ARCH__ 62
281 #if defined(__ARM_ARCH_6Z__)
282 # define __ARM_ARCH__ 63
284 #if defined(__ARM_ARCH_6ZK__)
285 # define __ARM_ARCH__ 64
287 #if defined(__ARM_ARCH_6T2__)
288 # define __ARM_ARCH__ 65
291 #if defined(__ARM_ARCH_7__)
292 # define __ARM_ARCH__ 70
294 #if defined(__ARM_ARCH_7A__)
295 # define __ARM_ARCH__ 71
297 #if defined(__ARM_ARCH_7R__)
298 # define __ARM_ARCH__ 72
300 #if defined(__ARM_ARCH_7M__)
301 # define __ARM_ARCH__ 73
304 #if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52)
305 /* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */
306 #define pld(addr, off) \
307 __asm__("pld [%[address], %[offset]]":: \
308 [address] "r" (addr), [offset] "i" (off))
310 #define pld(addr, off)
311 #endif /* __ARMEL__ */
313 /*****************************************************************************/
315 #define UNROLL2(op...) op op
316 #define UNROLL4(op...) UNROLL2(op) UNROLL2(op)
317 #define UNROLL8(op...) UNROLL4(op) UNROLL4(op)
318 #define UNROLL16(op...) UNROLL8(op) UNROLL8(op)
320 #define UNROLL8_PLD_WHILE(start, size, end, op) \
322 end = start + (size & ~7); \
323 while (start < end) \
330 while (start < end) \
335 /*****************************************************************************/
337 typedef unsigned long long DATA64;
338 typedef unsigned int DATA32;
339 typedef unsigned short DATA16;
340 typedef unsigned char DATA8;
342 typedef struct _Image_Entry Image_Entry;
343 typedef struct _Image_Entry_Flags Image_Entry_Flags;
344 typedef struct _Engine_Image_Entry Engine_Image_Entry;
345 typedef struct _Evas_Cache_Target Evas_Cache_Target;
346 typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread;
348 typedef struct _RGBA_Image_Loadopts RGBA_Image_Loadopts;
349 #ifdef BUILD_PIPE_RENDER
350 typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op;
351 typedef struct _RGBA_Pipe RGBA_Pipe;
352 typedef struct _RGBA_Pipe_Thread_Info RGBA_Pipe_Thread_Info;
354 typedef struct _RGBA_Image RGBA_Image;
355 typedef struct _RGBA_Image_Span RGBA_Image_Span;
356 typedef struct _RGBA_Draw_Context RGBA_Draw_Context;
357 typedef struct _RGBA_Gradient RGBA_Gradient;
358 typedef struct _RGBA_Gradient_Color_Stop RGBA_Gradient_Color_Stop;
359 typedef struct _RGBA_Gradient_Alpha_Stop RGBA_Gradient_Alpha_Stop;
360 typedef struct _RGBA_Gradient_Type RGBA_Gradient_Type;
361 typedef struct _RGBA_Gradient2 RGBA_Gradient2;
362 typedef struct _RGBA_Gradient2_Type RGBA_Gradient2_Type;
363 typedef struct _RGBA_Gradient2_Color_Np_Stop RGBA_Gradient2_Color_Np_Stop;
364 typedef struct _RGBA_Polygon_Point RGBA_Polygon_Point;
365 typedef struct _RGBA_Map_Point RGBA_Map_Point;
366 typedef struct _RGBA_Font RGBA_Font;
367 typedef struct _RGBA_Font_Int RGBA_Font_Int;
368 typedef struct _RGBA_Font_Source RGBA_Font_Source;
369 typedef struct _RGBA_Font_Glyph RGBA_Font_Glyph;
370 typedef struct _RGBA_Gfx_Compositor RGBA_Gfx_Compositor;
372 typedef struct _Cutout_Rect Cutout_Rect;
373 typedef struct _Cutout_Rects Cutout_Rects;
375 typedef struct _Convert_Pal Convert_Pal;
377 typedef struct _Tilebuf Tilebuf;
378 typedef struct _Tilebuf_Tile Tilebuf_Tile;
379 typedef struct _Tilebuf_Rect Tilebuf_Rect;
381 typedef struct _Evas_Common_Transform Evas_Common_Transform;
384 // all coords are 20.12
385 // fp type - an int for now
387 // fp # of bits of float accuracy
389 // fp half (half of an fp unit)
390 #define FPH (1 << (FP - 1))
392 #define FP1 (1 << (FP))
395 typedef struct _Regionbuf Regionbuf;
396 typedef struct _Regionspan Regionspan;
399 typedef void (*RGBA_Gfx_Func) (DATA32 *src, DATA8 *mask, DATA32 col, DATA32 *dst, int len);
400 typedef void (*RGBA_Gfx_Pt_Func) (DATA32 src, DATA8 mask, DATA32 col, DATA32 *dst);
401 typedef void (*Gfx_Func_Copy) (DATA32 *src, DATA32 *dst, int len);
403 typedef void (*Gfx_Func_Convert) (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
405 typedef void (*Gfx_Func_Gradient_Fill)(DATA32 *src, int src_len,
406 DATA32 *dst, DATA8 *mask, int len,
407 int x, int y, int axx, int axy, int ayx, int ayy,
410 typedef void (*Gfx_Func_Gradient2_Fill)(DATA32 *src, int src_len,
411 DATA32 *dst, DATA8 *mask, int len,
415 #include "../cache/evas_cache.h"
417 /*****************************************************************************/
419 typedef enum _RGBA_Image_Flags
421 RGBA_IMAGE_NOTHING = (0),
422 /* RGBA_IMAGE_HAS_ALPHA = (1 << 0), */
423 RGBA_IMAGE_IS_DIRTY = (1 << 1),
424 RGBA_IMAGE_INDEXED = (1 << 2),
425 RGBA_IMAGE_ALPHA_ONLY = (1 << 3),
426 RGBA_IMAGE_ALPHA_TILES = (1 << 4),
427 /* RGBA_IMAGE_ALPHA_SPARSE = (1 << 5), */
428 /* RGBA_IMAGE_LOADED = (1 << 6), */
429 /* RGBA_IMAGE_NEED_DATA = (1 << 7) */
430 RGBA_IMAGE_TODO_LOAD = (1 << 8),
433 typedef enum _Convert_Pal_Mode
451 typedef enum _CPU_Features
454 CPU_FEATURE_MMX = (1 << 0),
455 CPU_FEATURE_MMX2 = (1 << 1),
456 CPU_FEATURE_SSE = (1 << 2),
457 CPU_FEATURE_ALTIVEC = (1 << 3),
458 CPU_FEATURE_VIS = (1 << 4),
459 CPU_FEATURE_VIS2 = (1 << 5),
460 CPU_FEATURE_NEON = (1 << 6)
463 typedef enum _Font_Hint_Flags
470 /*****************************************************************************/
472 struct _RGBA_Image_Loadopts
474 int scale_down_by; // if > 1 then use this
475 double dpi; // if > 0.0 use this
476 int w, h; // if > 0 use this
482 struct _Image_Entry_Flags
484 Eina_Bool loaded : 1;
487 Eina_Bool need_data : 1;
488 Eina_Bool lru_nodata : 1;
489 Eina_Bool cached : 1;
491 Eina_Bool alpha_sparse : 1;
492 #ifdef BUILD_ASYNC_PRELOAD
493 Eina_Bool preload_done : 1;
494 Eina_Bool delete_me : 1;
495 Eina_Bool pending : 1;
499 struct _Evas_Cache_Target
510 Evas_Cache_Image *cache;
512 const char *cache_key;
517 Evas_Cache_Target *targets;
518 Evas_Preload_Pthread *preload;
527 RGBA_Image_Loadopts load_opts;
544 #ifdef BUILD_ASYNC_PRELOAD
548 Image_Entry_Flags flags;
549 Evas_Image_Scale_Hint scale_hint;
556 struct _Engine_Image_Entry
560 /* Upper Engine data. */
564 Evas_Cache_Engine_Image *cache;
565 const char *cache_key;
569 Eina_Bool cached : 1;
572 Eina_Bool loaded : 1;
573 Eina_Bool need_parent : 1;
593 struct _Evas_Common_Transform
600 struct _RGBA_Draw_Context
609 struct RGBA_Draw_Context_clip {
616 void *(*gl_new) (void *data, RGBA_Font_Glyph *fg);
617 void (*gl_free) (void *ext_dat);
618 void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
629 Eina_Bool anti_alias : 1;
632 #ifdef BUILD_PIPE_RENDER
635 RGBA_Draw_Context context;
636 void (*op_func) (RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info);
637 void (*free_func) (RGBA_Pipe_Op *op);
647 RGBA_Polygon_Point *points;
654 RGBA_Gradient2 *grad;
664 int sx, sy, sw, sh, dx, dy, dw, dh;
683 RGBA_Pipe_Op op[PIPE_LEN];
686 struct _RGBA_Pipe_Thread_Info
695 Image_Entry cache_entry;
697 RGBA_Image_Flags flags;
702 /* char *real_file; */
708 #ifdef BUILD_PIPE_RENDER
713 /* unsigned char scale; */
715 /* Colorspace stuff. */
718 Eina_Bool no_free : 1;
725 Eina_Bool no_free : 1;
731 unsigned long long orig_usage;
732 unsigned long long usage_count;
734 unsigned long long newest_usage;
735 unsigned long long newest_usage_count;
739 struct _RGBA_Gradient_Color_Stop
746 struct _RGBA_Gradient_Alpha_Stop
753 struct _RGBA_Gradient
762 Eina_Bool has_alpha : 1;
788 RGBA_Gradient_Type *geometer;
794 Eina_Bool imported_data : 1;
795 Eina_Bool has_alpha : 1;
798 struct _RGBA_Gradient_Type
802 void (*shutdown)(void);
803 void (*geom_init)(RGBA_Gradient *gr);
804 void (*geom_set)(RGBA_Gradient *gr);
805 void (*geom_free)(void *gdata);
806 int (*has_alpha)(RGBA_Gradient *gr, int render_op);
807 int (*has_mask)(RGBA_Gradient *gr, int render_op);
808 int (*get_map_len)(RGBA_Gradient *gr);
809 Gfx_Func_Gradient_Fill (*get_fill_func)(RGBA_Gradient *gr, int render_op, unsigned char aa);
812 struct _RGBA_Gradient2_Color_Np_Stop
820 struct _RGBA_Gradient2
826 Eina_Bool has_alpha : 1;
839 Evas_Common_Transform transform;
845 RGBA_Gradient2_Type *geometer;
851 Eina_Bool has_alpha : 1;
854 struct _RGBA_Gradient2_Type
858 void (*shutdown)(void);
859 void (*geom_init)(RGBA_Gradient2 *gr);
860 void (*geom_update)(RGBA_Gradient2 *gr);
861 void (*geom_free)(void *gdata);
862 int (*has_alpha)(RGBA_Gradient2 *gr, int render_op);
863 int (*has_mask)(RGBA_Gradient2 *gr, int render_op);
864 int (*get_map_len)(RGBA_Gradient2 *gr);
865 Gfx_Func_Gradient2_Fill (*get_fill_func)(RGBA_Gradient2 *gr, int render_op);
869 struct _RGBA_Polygon_Point
875 struct _RGBA_Map_Point
877 FPc x, y; // x, y screenspace
878 FPc z; // z in world space. optional
879 FPc u, v; // u, v in tex coords
880 DATA32 col; // color at this point
885 typedef struct _Fash_Item_Index_Map Fash_Item_Index_Map;
886 typedef struct _Fash_Int_Map Fash_Int_Map;
887 typedef struct _Fash_Int Fash_Int;
888 struct _Fash_Item_Index_Map
895 Fash_Item_Index_Map item[256];
899 Fash_Int_Map *bucket[256];
900 void (*freeme) (Fash_Int *fash);
904 typedef struct _Fash_Glyph_Map Fash_Glyph_Map;
905 typedef struct _Fash_Glyph Fash_Glyph;
906 struct _Fash_Glyph_Map
908 RGBA_Font_Glyph *item[256];
912 Fash_Glyph_Map *bucket[256];
913 void (*freeme) (Fash_Glyph *fash);
920 Font_Hint_Flags hinting;
923 unsigned char sizeok : 1;
927 struct _RGBA_Font_Int
929 RGBA_Font_Source *src;
939 // Eina_Hash *glyphs;
944 // Eina_Hash *indexes;
947 Font_Hint_Flags hinting;
952 unsigned char sizeok : 1;
955 struct _RGBA_Font_Source
972 struct _RGBA_Font_Glyph
976 FT_BitmapGlyph glyph_out;
977 /* this is a problem - only 1 engine at a time can extend such a font... grrr */
979 void (*ext_dat_free) (void *ext_dat);
983 struct _RGBA_Gfx_Compositor
988 void (*shutdown)(void);
990 RGBA_Gfx_Func (*composite_pixel_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
991 RGBA_Gfx_Func (*composite_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
992 RGBA_Gfx_Func (*composite_pixel_color_span_get)(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
993 RGBA_Gfx_Func (*composite_mask_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
994 RGBA_Gfx_Func (*composite_pixel_mask_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
996 RGBA_Gfx_Pt_Func (*composite_pixel_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
997 RGBA_Gfx_Pt_Func (*composite_color_pt_get)(DATA32 col, RGBA_Image *dst);
998 RGBA_Gfx_Pt_Func (*composite_pixel_color_pt_get)(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
999 RGBA_Gfx_Pt_Func (*composite_mask_color_pt_get)(DATA32 col, RGBA_Image *dst);
1000 RGBA_Gfx_Pt_Func (*composite_pixel_mask_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
1003 #define EVAS_RECT_SPLIT 1
1004 #ifdef EVAS_RECT_SPLIT
1005 typedef struct list_node list_node_t;
1006 typedef struct list list_t;
1007 typedef struct rect rect_t;
1008 typedef struct rect_node rect_node_t;
1012 struct list_node *next;
1017 struct list_node *head;
1018 struct list_node *tail;
1034 struct list_node _lst;
1038 void rect_list_node_pool_set_max(int max);
1039 void rect_list_node_pool_flush(void);
1040 list_node_t *rect_list_node_pool_get(void);
1041 void rect_list_node_pool_put(list_node_t *node);
1043 void rect_init(rect_t *r, int x, int y, int w, int h);
1044 void rect_list_append_node(list_t *rects, list_node_t *node);
1045 void rect_list_append(list_t *rects, const rect_t r);
1046 void rect_list_append_xywh(list_t *rects, int x, int y, int w, int h);
1047 void rect_list_concat(list_t *rects, list_t *other);
1048 list_node_t *rect_list_unlink_next(list_t *rects, list_node_t *parent_node);
1049 void rect_list_del_next(list_t *rects, list_node_t *parent_node);
1050 void rect_list_clear(list_t *rects);
1051 void rect_list_del_split_strict(list_t *rects, const rect_t del_r);
1052 void rect_list_add_split_strict(list_t *rects, list_node_t *node);
1053 list_node_t *rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error);
1054 void rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error);void rect_list_add_split_fuzzy_and_merge(list_t *rects, list_node_t *node, int split_accepted_error, int merge_accepted_error);
1056 void rect_print(const rect_t r);
1057 void rect_list_print(const list_t rects);
1058 #endif /* EVAS_RECT_SPLIT */
1071 #elif defined(EVAS_RECT_SPLIT)
1077 Tilebuf_Tile *tiles;
1082 struct _Tilebuf_Tile
1084 Eina_Bool redraw : 1;
1085 /* FIXME: need these flags later - but not now */
1097 struct _Tilebuf_Rect
1120 Convert_Pal_Mode colors;
1127 /*****************************************************************************/
1128 #include "evas_macros.h"
1130 #ifndef WORDS_BIGENDIAN
1132 #define A_VAL(p) ((DATA8 *)(p))[3]
1133 #define R_VAL(p) ((DATA8 *)(p))[2]
1134 #define G_VAL(p) ((DATA8 *)(p))[1]
1135 #define B_VAL(p) ((DATA8 *)(p))[0]
1136 #define AR_VAL(p) ((DATA16 *)(p)[1])
1137 #define GB_VAL(p) ((DATA16 *)(p)[0])
1140 #define A_VAL(p) ((DATA8 *)(p))[0]
1141 #define R_VAL(p) ((DATA8 *)(p))[1]
1142 #define G_VAL(p) ((DATA8 *)(p))[2]
1143 #define B_VAL(p) ((DATA8 *)(p))[3]
1144 #define AR_VAL(p) ((DATA16 *)(p)[0])
1145 #define GB_VAL(p) ((DATA16 *)(p)[1])
1148 #define RGB_JOIN(r,g,b) \
1149 (((r) << 16) + ((g) << 8) + (b))
1151 #define ARGB_JOIN(a,r,g,b) \
1152 (((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
1154 #include "evas_blend_ops.h"
1156 #define _EVAS_RENDER_FILL -1
1157 #define _EVAS_RENDER_BLEND 0
1158 #define _EVAS_RENDER_BLEND_REL 1
1159 #define _EVAS_RENDER_COPY 2
1160 #define _EVAS_RENDER_COPY_REL 3
1161 #define _EVAS_RENDER_ADD 4
1162 #define _EVAS_RENDER_ADD_REL 5
1163 #define _EVAS_RENDER_SUB 6
1164 #define _EVAS_RENDER_SUB_REL 7
1165 #define _EVAS_RENDER_TINT 8
1166 #define _EVAS_RENDER_TINT_REL 9
1167 #define _EVAS_RENDER_MASK 10
1168 #define _EVAS_RENDER_MUL 11
1169 #define _EVAS_RENDER_CLIP 12
1171 #define _EVAS_TEXTURE_REFLECT 0
1172 #define _EVAS_TEXTURE_REPEAT 1
1173 #define _EVAS_TEXTURE_RESTRICT 2
1174 #define _EVAS_TEXTURE_RESTRICT_REFLECT 3
1175 #define _EVAS_TEXTURE_RESTRICT_REPEAT 4
1176 #define _EVAS_TEXTURE_PAD 5
1178 #define _EVAS_COLOR_SPACE_ARGB 0
1179 #define _EVAS_COLOR_SPACE_AHSV 1
1181 /*****************************************************************************/
1188 void evas_common_init (void);
1189 void evas_common_shutdown (void);
1191 EAPI void evas_common_cpu_init (void);
1193 int evas_common_cpu_have_cpuid (void);
1194 int evas_common_cpu_has_feature (unsigned int feature);
1195 EAPI void evas_common_cpu_can_do (int *mmx, int *sse, int *sse2);
1196 EAPI void evas_common_cpu_end_opt (void);
1199 #include "../engines/common/evas_blend.h"
1201 EAPI Gfx_Func_Copy evas_common_draw_func_copy_get (int pixels, int reverse);
1204 #include "../engines/common/evas_convert_color.h"
1205 #include "../engines/common/evas_convert_colorspace.h"
1206 #include "../engines/common/evas_convert_main.h"
1207 #include "../engines/common/evas_convert_yuv.h"
1208 #include "../engines/common/evas_scale_main.h"
1209 #include "../engines/common/evas_scale_smooth.h"
1210 #include "../engines/common/evas_scale_span.h"
1213 #include "../engines/common/evas_image.h"
1216 #include "../engines/common/evas_line.h"
1217 #include "../engines/common/evas_polygon.h"
1218 #include "../engines/common/evas_rectangle.h"
1221 EAPI void evas_common_blit_init (void);
1223 EAPI void evas_common_blit_rectangle (const RGBA_Image *src, RGBA_Image *dst, int src_x, int src_y, int w, int h, int dst_x, int dst_y);
1226 #include "../engines/common/evas_gradient.h"
1227 #include "../engines/common/evas_font.h"
1230 EAPI void evas_common_tilebuf_init (void);
1232 EAPI Tilebuf *evas_common_tilebuf_new (int w, int h);
1233 EAPI void evas_common_tilebuf_free (Tilebuf *tb);
1234 EAPI void evas_common_tilebuf_set_tile_size (Tilebuf *tb, int tw, int th);
1235 EAPI void evas_common_tilebuf_get_tile_size (Tilebuf *tb, int *tw, int *th);
1236 EAPI int evas_common_tilebuf_add_redraw (Tilebuf *tb, int x, int y, int w, int h);
1237 EAPI int evas_common_tilebuf_del_redraw (Tilebuf *tb, int x, int y, int w, int h);
1238 EAPI int evas_common_tilebuf_add_motion_vector (Tilebuf *tb, int x, int y, int w, int h, int dx, int dy, int alpha);
1239 EAPI void evas_common_tilebuf_clear (Tilebuf *tb);
1240 EAPI Tilebuf_Rect *evas_common_tilebuf_get_render_rects (Tilebuf *tb);
1241 EAPI void evas_common_tilebuf_free_render_rects (Tilebuf_Rect *rects);
1244 Regionbuf *evas_common_regionbuf_new (int w, int h);
1245 void evas_common_regionbuf_free (Regionbuf *rb);
1246 void evas_common_regionbuf_clear (Regionbuf *rb);
1247 void evas_common_regionbuf_span_add (Regionbuf *rb, int x1, int x2, int y);
1248 void evas_common_regionbuf_span_del (Regionbuf *rb, int x1, int x2, int y);
1249 Tilebuf_Rect *evas_common_regionbuf_rects_get (Regionbuf *rb);
1253 #include "../engines/common/evas_draw.h"
1255 #include "../engines/common/evas_map_image.h"
1258 #ifdef BUILD_PIPE_RENDER
1259 # include "../engines/common/evas_pipe.h"
1262 void evas_font_dir_cache_free(void);
1266 /*****************************************************************************/
1268 //#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 70)
1270 # include <arm_neon.h>