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 #ifndef EVAS_FRAME_QUEUING
140 # define LKI(x) pthread_mutex_init(&(x), NULL);
142 # define LKI(x) {pthread_mutexattr_t attr;\
143 pthread_mutexattr_init(&attr); \
144 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); \
145 pthread_mutex_init(&(x), &attr);}
147 # define LKD(x) pthread_mutex_destroy(&(x));
148 # define LKL(x) pthread_mutex_lock(&(x));
149 # define LKT(x) pthread_mutex_trylock(&(x));
150 # define LKU(x) pthread_mutex_unlock(&(x));
151 # define TH(x) pthread_t x
152 # define THI(x) int x
156 #define RWLK(x) pthread_rwlock_t x
157 #define RWLKI(x) pthread_rwlock_init(&(x), NULL);
158 #define RWLKD(x) pthread_rwlock_destroy(&(x));
159 #define RDLKL(x) pthread_rwlock_rdlock(&(x));
160 #define WRLKL(x) pthread_rwlock_wrlock(&(x));
161 #define RWLKU(x) pthread_rwlock_unlock(&(x));
164 // even though in theory having every Nth rendered line done by a different
165 // thread might even out load across threads - it actually slows things down.
191 #elif defined __GNUC__
192 # define alloca __builtin_alloca
194 # define alloca __alloca
195 #elif defined _MSC_VER
197 # define alloca _alloca
203 void *alloca (size_t);
209 #include <sys/types.h>
210 #include <sys/stat.h>
218 #include <ft2build.h>
219 #include FT_FREETYPE_H
226 // BROKEN in gcc 4 on amd64
227 //# pragma GCC visibility push(hidden)
229 #define LIKELY(x) __builtin_expect(!!(x), 1)
230 #define UNLIKELY(x) __builtin_expect(!!(x), 0)
232 #define LIKELY(x) (x)
233 #define UNLIKELY(x) (x)
236 /*****************************************************************************/
238 /* use exact rects for updates not tiles */
239 /* #define RECTUPDATE */
241 #define IMG_MAX_SIZE 65000
243 #define IMG_TOO_BIG(w, h) \
244 ((((unsigned long long)w) * ((unsigned long long)h)) >= \
245 ((1ULL << (29 * (sizeof(void *) / 4))) - 2048))
247 #ifdef BUILD_SMALL_DITHER_MASK
248 # define DM_TABLE _evas_dither_44
252 # define USE_DITHER_44 1
253 # define DM_MSK (DM_SIZE - 1)
254 # define DM_SHF(_b) (DM_BITS - (8 - _b))
256 # define DM_TABLE _evas_dither_128128
260 # define USE_DITHER_128128 1
261 # define DM_MSK (DM_SIZE - 1)
262 # define DM_SHF(_b) (DM_BITS - (8 - _b))
265 /* if more than 1/ALPHA_SPARSE_INV_FRACTION is "alpha" (1-254) then sparse
266 * alpha flag gets set */
267 #define ALPHA_SPARSE_INV_FRACTION 3
269 /*****************************************************************************/
271 #if defined(__ARM_ARCH_3M__)
272 # define __ARM_ARCH__ 40
274 #if defined(__ARM_ARCH_4__)
275 # define __ARM_ARCH__ 40
277 #if defined(__ARM_ARCH_4T__)
278 # define __ARM_ARCH__ 41
281 #if defined(__ARM_ARCH_5__)
282 # define __ARM_ARCH__ 50
284 #if defined(__ARM_ARCH_5T__)
285 # define __ARM_ARCH__ 51
287 #if defined(__ARM_ARCH_5E__)
288 # define __ARM_ARCH__ 52
290 #if defined(__ARM_ARCH_5TE__)
291 # define __ARM_ARCH__ 53
293 #if defined(__ARM_ARCH_5TEJ__)
294 # define __ARM_ARCH__ 54
297 #if defined(__ARM_ARCH_6__)
298 # define __ARM_ARCH__ 60
300 #if defined(__ARM_ARCH_6J__)
301 # define __ARM_ARCH__ 61
303 #if defined(__ARM_ARCH_6K__)
304 # define __ARM_ARCH__ 62
306 #if defined(__ARM_ARCH_6Z__)
307 # define __ARM_ARCH__ 63
309 #if defined(__ARM_ARCH_6ZK__)
310 # define __ARM_ARCH__ 64
312 #if defined(__ARM_ARCH_6T2__)
313 # define __ARM_ARCH__ 65
316 #if defined(__ARM_ARCH_7__)
317 # define __ARM_ARCH__ 70
319 #if defined(__ARM_ARCH_7A__)
320 # define __ARM_ARCH__ 71
322 #if defined(__ARM_ARCH_7R__)
323 # define __ARM_ARCH__ 72
325 #if defined(__ARM_ARCH_7M__)
326 # define __ARM_ARCH__ 73
329 #if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52)
330 /* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */
331 #define pld(addr, off) \
332 __asm__("pld [%[address], %[offset]]":: \
333 [address] "r" (addr), [offset] "i" (off))
335 #define pld(addr, off)
336 #endif /* __ARMEL__ */
338 /*****************************************************************************/
340 #define UNROLL2(op...) op op
341 #define UNROLL4(op...) UNROLL2(op) UNROLL2(op)
342 #define UNROLL8(op...) UNROLL4(op) UNROLL4(op)
343 #define UNROLL16(op...) UNROLL8(op) UNROLL8(op)
345 #define UNROLL8_PLD_WHILE(start, size, end, op) \
347 end = start + (size & ~7); \
348 while (start < end) \
355 while (start < end) \
360 /*****************************************************************************/
362 typedef unsigned long long DATA64;
363 typedef unsigned int DATA32;
364 typedef unsigned short DATA16;
365 typedef unsigned char DATA8;
367 typedef struct _Image_Entry Image_Entry;
368 typedef struct _Image_Entry_Flags Image_Entry_Flags;
369 typedef struct _Engine_Image_Entry Engine_Image_Entry;
370 typedef struct _Evas_Cache_Target Evas_Cache_Target;
371 typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread;
373 typedef struct _RGBA_Image_Loadopts RGBA_Image_Loadopts;
374 #ifdef BUILD_PIPE_RENDER
375 typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op;
376 typedef struct _RGBA_Pipe RGBA_Pipe;
377 typedef struct _RGBA_Pipe_Thread_Info RGBA_Pipe_Thread_Info;
379 typedef struct _RGBA_Image RGBA_Image;
380 typedef struct _RGBA_Image_Span RGBA_Image_Span;
381 typedef struct _RGBA_Draw_Context RGBA_Draw_Context;
382 typedef struct _RGBA_Gradient RGBA_Gradient;
383 typedef struct _RGBA_Gradient_Color_Stop RGBA_Gradient_Color_Stop;
384 typedef struct _RGBA_Gradient_Alpha_Stop RGBA_Gradient_Alpha_Stop;
385 typedef struct _RGBA_Gradient_Type RGBA_Gradient_Type;
386 typedef struct _RGBA_Gradient2 RGBA_Gradient2;
387 typedef struct _RGBA_Gradient2_Type RGBA_Gradient2_Type;
388 typedef struct _RGBA_Gradient2_Color_Np_Stop RGBA_Gradient2_Color_Np_Stop;
389 typedef struct _RGBA_Polygon_Point RGBA_Polygon_Point;
390 typedef struct _RGBA_Map_Point RGBA_Map_Point;
391 typedef struct _RGBA_Font RGBA_Font;
392 typedef struct _RGBA_Font_Int RGBA_Font_Int;
393 typedef struct _RGBA_Font_Source RGBA_Font_Source;
394 typedef struct _RGBA_Font_Glyph RGBA_Font_Glyph;
395 typedef struct _RGBA_Gfx_Compositor RGBA_Gfx_Compositor;
397 typedef struct _Cutout_Rect Cutout_Rect;
398 typedef struct _Cutout_Rects Cutout_Rects;
400 typedef struct _Convert_Pal Convert_Pal;
402 typedef struct _Tilebuf Tilebuf;
403 typedef struct _Tilebuf_Tile Tilebuf_Tile;
404 typedef struct _Tilebuf_Rect Tilebuf_Rect;
406 typedef struct _Evas_Common_Transform Evas_Common_Transform;
409 // all coords are 20.12
410 // fp type - an int for now
412 // fp # of bits of float accuracy
414 // fp half (half of an fp unit)
415 #define FPH (1 << (FP - 1))
417 #define FP1 (1 << (FP))
420 typedef struct _Regionbuf Regionbuf;
421 typedef struct _Regionspan Regionspan;
424 typedef void (*RGBA_Gfx_Func) (DATA32 *src, DATA8 *mask, DATA32 col, DATA32 *dst, int len);
425 typedef void (*RGBA_Gfx_Pt_Func) (DATA32 src, DATA8 mask, DATA32 col, DATA32 *dst);
426 typedef void (*Gfx_Func_Copy) (DATA32 *src, DATA32 *dst, int len);
428 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);
430 typedef void (*Gfx_Func_Gradient_Fill)(DATA32 *src, int src_len,
431 DATA32 *dst, DATA8 *mask, int len,
432 int x, int y, int axx, int axy, int ayx, int ayy,
435 typedef void (*Gfx_Func_Gradient2_Fill)(DATA32 *src, int src_len,
436 DATA32 *dst, DATA8 *mask, int len,
440 #include "../cache/evas_cache.h"
442 /*****************************************************************************/
444 typedef enum _RGBA_Image_Flags
446 RGBA_IMAGE_NOTHING = (0),
447 /* RGBA_IMAGE_HAS_ALPHA = (1 << 0), */
448 RGBA_IMAGE_IS_DIRTY = (1 << 1),
449 RGBA_IMAGE_INDEXED = (1 << 2),
450 RGBA_IMAGE_ALPHA_ONLY = (1 << 3),
451 RGBA_IMAGE_ALPHA_TILES = (1 << 4),
452 /* RGBA_IMAGE_ALPHA_SPARSE = (1 << 5), */
453 /* RGBA_IMAGE_LOADED = (1 << 6), */
454 /* RGBA_IMAGE_NEED_DATA = (1 << 7) */
455 RGBA_IMAGE_TODO_LOAD = (1 << 8),
458 typedef enum _Convert_Pal_Mode
476 typedef enum _CPU_Features
479 CPU_FEATURE_MMX = (1 << 0),
480 CPU_FEATURE_MMX2 = (1 << 1),
481 CPU_FEATURE_SSE = (1 << 2),
482 CPU_FEATURE_ALTIVEC = (1 << 3),
483 CPU_FEATURE_VIS = (1 << 4),
484 CPU_FEATURE_VIS2 = (1 << 5),
485 CPU_FEATURE_NEON = (1 << 6)
488 typedef enum _Font_Hint_Flags
495 /*****************************************************************************/
497 struct _RGBA_Image_Loadopts
499 int scale_down_by; // if > 1 then use this
500 double dpi; // if > 0.0 use this
501 int w, h; // if > 0 use this
507 struct _Image_Entry_Flags
509 Eina_Bool loaded : 1;
512 Eina_Bool need_data : 1;
513 Eina_Bool lru_nodata : 1;
514 Eina_Bool cached : 1;
516 Eina_Bool alpha_sparse : 1;
517 #ifdef BUILD_ASYNC_PRELOAD
518 Eina_Bool preload_done : 1;
519 Eina_Bool delete_me : 1;
520 Eina_Bool pending : 1;
524 struct _Evas_Cache_Target
535 Evas_Cache_Image *cache;
537 const char *cache_key;
542 Evas_Cache_Target *targets;
543 Evas_Preload_Pthread *preload;
549 #ifdef EVAS_FRAME_QUEUING
550 LK(lock_references); // needed for accessing references
555 RGBA_Image_Loadopts load_opts;
572 #ifdef BUILD_ASYNC_PRELOAD
576 Image_Entry_Flags flags;
577 Evas_Image_Scale_Hint scale_hint;
584 struct _Engine_Image_Entry
588 /* Upper Engine data. */
592 Evas_Cache_Engine_Image *cache;
593 const char *cache_key;
597 Eina_Bool cached : 1;
600 Eina_Bool loaded : 1;
601 Eina_Bool need_parent : 1;
621 struct _Evas_Common_Transform
628 struct _RGBA_Draw_Context
637 struct RGBA_Draw_Context_clip {
644 void *(*gl_new) (void *data, RGBA_Font_Glyph *fg);
645 void (*gl_free) (void *ext_dat);
646 void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
657 Eina_Bool anti_alias : 1;
660 #ifdef BUILD_PIPE_RENDER
661 #include "../engines/common/evas_map_image.h"
665 RGBA_Draw_Context context;
666 void (*op_func) (RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info);
667 void (*free_func) (RGBA_Pipe_Op *op);
677 RGBA_Polygon_Point *points;
684 RGBA_Gradient2 *grad;
694 int sx, sy, sw, sh, dx, dy, dw, dh;
713 RGBA_Pipe_Op op[PIPE_LEN];
716 struct _RGBA_Pipe_Thread_Info
725 Image_Entry cache_entry;
727 RGBA_Image_Flags flags;
732 /* char *real_file; */
738 #ifdef BUILD_PIPE_RENDER
740 #ifdef EVAS_FRAME_QUEUING
743 pthread_cond_t cond_fq_del;
744 int ref_fq[2]; // ref_fq[0] is for addition, ref_fq[1] is for deletion
749 /* unsigned char scale; */
751 /* Colorspace stuff. */
754 Eina_Bool no_free : 1;
761 Eina_Bool no_free : 1;
767 unsigned long long orig_usage;
768 unsigned long long usage_count;
770 unsigned long long newest_usage;
771 unsigned long long newest_usage_count;
775 struct _RGBA_Gradient_Color_Stop
782 struct _RGBA_Gradient_Alpha_Stop
789 struct _RGBA_Gradient
798 Eina_Bool has_alpha : 1;
824 RGBA_Gradient_Type *geometer;
829 #ifdef EVAS_FRAME_QUEUING
832 pthread_cond_t cond_fq_del;
833 int ref_fq[2]; //ref_fq[0] is for addition,
834 //ref_fq[1] is for deletion
837 Eina_Bool imported_data : 1;
838 Eina_Bool has_alpha : 1;
841 struct _RGBA_Gradient_Type
845 void (*shutdown)(void);
846 void (*geom_init)(RGBA_Gradient *gr);
847 void (*geom_set)(RGBA_Gradient *gr);
848 void (*geom_free)(void *gdata);
849 int (*has_alpha)(RGBA_Gradient *gr, int render_op);
850 int (*has_mask)(RGBA_Gradient *gr, int render_op);
851 int (*get_map_len)(RGBA_Gradient *gr);
852 Gfx_Func_Gradient_Fill (*get_fill_func)(RGBA_Gradient *gr, int render_op, unsigned char aa);
855 struct _RGBA_Gradient2_Color_Np_Stop
863 struct _RGBA_Gradient2
869 Eina_Bool has_alpha : 1;
882 Evas_Common_Transform transform;
888 RGBA_Gradient2_Type *geometer;
893 #ifdef EVAS_FRAME_QUEUING
896 pthread_cond_t cond_fq_del;
897 int ref_fq[2]; //ref_fq[0] is for addition,
898 //ref_fq[1] is for deletion
901 Eina_Bool has_alpha : 1;
904 struct _RGBA_Gradient2_Type
908 void (*shutdown)(void);
909 void (*geom_init)(RGBA_Gradient2 *gr);
910 void (*geom_update)(RGBA_Gradient2 *gr);
911 void (*geom_free)(void *gdata);
912 int (*has_alpha)(RGBA_Gradient2 *gr, int render_op);
913 int (*has_mask)(RGBA_Gradient2 *gr, int render_op);
914 int (*get_map_len)(RGBA_Gradient2 *gr);
915 Gfx_Func_Gradient2_Fill (*get_fill_func)(RGBA_Gradient2 *gr, int render_op);
919 struct _RGBA_Polygon_Point
925 struct _RGBA_Map_Point
927 FPc x, y; // x, y screenspace
928 FPc z; // z in world space. optional
929 FPc u, v; // u, v in tex coords
930 DATA32 col; // color at this point
935 typedef struct _Fash_Item_Index_Map Fash_Item_Index_Map;
936 typedef struct _Fash_Int_Map Fash_Int_Map;
937 typedef struct _Fash_Int Fash_Int;
938 struct _Fash_Item_Index_Map
945 Fash_Item_Index_Map item[256];
949 Fash_Int_Map *bucket[256];
950 void (*freeme) (Fash_Int *fash);
954 typedef struct _Fash_Glyph_Map Fash_Glyph_Map;
955 typedef struct _Fash_Glyph Fash_Glyph;
956 struct _Fash_Glyph_Map
958 RGBA_Font_Glyph *item[256];
962 Fash_Glyph_Map *bucket[256];
963 void (*freeme) (Fash_Glyph *fash);
970 Font_Hint_Flags hinting;
973 unsigned char sizeok : 1;
975 #ifdef EVAS_FRAME_QUEUING
978 pthread_cond_t cond_fq_del;
979 int ref_fq[2]; //ref_fq[0] is for addition, ref_fq[1] is for deletion
983 struct _RGBA_Font_Int
985 RGBA_Font_Source *src;
995 // Eina_Hash *glyphs;
1000 // Eina_Hash *indexes;
1003 Font_Hint_Flags hinting;
1008 unsigned char sizeok : 1;
1011 struct _RGBA_Font_Source
1028 struct _RGBA_Font_Glyph
1032 FT_BitmapGlyph glyph_out;
1033 /* this is a problem - only 1 engine at a time can extend such a font... grrr */
1035 void (*ext_dat_free) (void *ext_dat);
1039 struct _RGBA_Gfx_Compositor
1044 void (*shutdown)(void);
1046 RGBA_Gfx_Func (*composite_pixel_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
1047 RGBA_Gfx_Func (*composite_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
1048 RGBA_Gfx_Func (*composite_pixel_color_span_get)(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
1049 RGBA_Gfx_Func (*composite_mask_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
1050 RGBA_Gfx_Func (*composite_pixel_mask_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
1052 RGBA_Gfx_Pt_Func (*composite_pixel_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
1053 RGBA_Gfx_Pt_Func (*composite_color_pt_get)(DATA32 col, RGBA_Image *dst);
1054 RGBA_Gfx_Pt_Func (*composite_pixel_color_pt_get)(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
1055 RGBA_Gfx_Pt_Func (*composite_mask_color_pt_get)(DATA32 col, RGBA_Image *dst);
1056 RGBA_Gfx_Pt_Func (*composite_pixel_mask_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
1059 #define EVAS_RECT_SPLIT 1
1060 #ifdef EVAS_RECT_SPLIT
1061 typedef struct list_node list_node_t;
1062 typedef struct list list_t;
1063 typedef struct rect rect_t;
1064 typedef struct rect_node rect_node_t;
1068 struct list_node *next;
1073 struct list_node *head;
1074 struct list_node *tail;
1090 struct list_node _lst;
1094 void rect_list_node_pool_set_max(int max);
1095 void rect_list_node_pool_flush(void);
1096 list_node_t *rect_list_node_pool_get(void);
1097 void rect_list_node_pool_put(list_node_t *node);
1099 void rect_init(rect_t *r, int x, int y, int w, int h);
1100 void rect_list_append_node(list_t *rects, list_node_t *node);
1101 void rect_list_append(list_t *rects, const rect_t r);
1102 void rect_list_append_xywh(list_t *rects, int x, int y, int w, int h);
1103 void rect_list_concat(list_t *rects, list_t *other);
1104 list_node_t *rect_list_unlink_next(list_t *rects, list_node_t *parent_node);
1105 void rect_list_del_next(list_t *rects, list_node_t *parent_node);
1106 void rect_list_clear(list_t *rects);
1107 void rect_list_del_split_strict(list_t *rects, const rect_t del_r);
1108 void rect_list_add_split_strict(list_t *rects, list_node_t *node);
1109 list_node_t *rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error);
1110 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);
1112 void rect_print(const rect_t r);
1113 void rect_list_print(const list_t rects);
1114 #endif /* EVAS_RECT_SPLIT */
1127 #elif defined(EVAS_RECT_SPLIT)
1133 Tilebuf_Tile *tiles;
1138 struct _Tilebuf_Tile
1140 Eina_Bool redraw : 1;
1141 /* FIXME: need these flags later - but not now */
1153 struct _Tilebuf_Rect
1176 Convert_Pal_Mode colors;
1183 /*****************************************************************************/
1184 #include "evas_macros.h"
1186 #ifndef WORDS_BIGENDIAN
1188 #define A_VAL(p) ((DATA8 *)(p))[3]
1189 #define R_VAL(p) ((DATA8 *)(p))[2]
1190 #define G_VAL(p) ((DATA8 *)(p))[1]
1191 #define B_VAL(p) ((DATA8 *)(p))[0]
1192 #define AR_VAL(p) ((DATA16 *)(p)[1])
1193 #define GB_VAL(p) ((DATA16 *)(p)[0])
1196 #define A_VAL(p) ((DATA8 *)(p))[0]
1197 #define R_VAL(p) ((DATA8 *)(p))[1]
1198 #define G_VAL(p) ((DATA8 *)(p))[2]
1199 #define B_VAL(p) ((DATA8 *)(p))[3]
1200 #define AR_VAL(p) ((DATA16 *)(p)[0])
1201 #define GB_VAL(p) ((DATA16 *)(p)[1])
1204 #define RGB_JOIN(r,g,b) \
1205 (((r) << 16) + ((g) << 8) + (b))
1207 #define ARGB_JOIN(a,r,g,b) \
1208 (((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
1210 #include "evas_blend_ops.h"
1212 #define _EVAS_RENDER_FILL -1
1213 #define _EVAS_RENDER_BLEND 0
1214 #define _EVAS_RENDER_BLEND_REL 1
1215 #define _EVAS_RENDER_COPY 2
1216 #define _EVAS_RENDER_COPY_REL 3
1217 #define _EVAS_RENDER_ADD 4
1218 #define _EVAS_RENDER_ADD_REL 5
1219 #define _EVAS_RENDER_SUB 6
1220 #define _EVAS_RENDER_SUB_REL 7
1221 #define _EVAS_RENDER_TINT 8
1222 #define _EVAS_RENDER_TINT_REL 9
1223 #define _EVAS_RENDER_MASK 10
1224 #define _EVAS_RENDER_MUL 11
1225 #define _EVAS_RENDER_CLIP 12
1227 #define _EVAS_TEXTURE_REFLECT 0
1228 #define _EVAS_TEXTURE_REPEAT 1
1229 #define _EVAS_TEXTURE_RESTRICT 2
1230 #define _EVAS_TEXTURE_RESTRICT_REFLECT 3
1231 #define _EVAS_TEXTURE_RESTRICT_REPEAT 4
1232 #define _EVAS_TEXTURE_PAD 5
1234 #define _EVAS_COLOR_SPACE_ARGB 0
1235 #define _EVAS_COLOR_SPACE_AHSV 1
1237 /*****************************************************************************/
1244 void evas_common_init (void);
1245 void evas_common_shutdown (void);
1247 EAPI void evas_common_cpu_init (void);
1249 int evas_common_cpu_have_cpuid (void);
1250 int evas_common_cpu_has_feature (unsigned int feature);
1251 EAPI void evas_common_cpu_can_do (int *mmx, int *sse, int *sse2);
1252 EAPI void evas_common_cpu_end_opt (void);
1255 #include "../engines/common/evas_blend.h"
1257 EAPI Gfx_Func_Copy evas_common_draw_func_copy_get (int pixels, int reverse);
1260 #include "../engines/common/evas_convert_color.h"
1261 #include "../engines/common/evas_convert_colorspace.h"
1262 #include "../engines/common/evas_convert_main.h"
1263 #include "../engines/common/evas_convert_yuv.h"
1264 #include "../engines/common/evas_scale_main.h"
1265 #include "../engines/common/evas_scale_smooth.h"
1266 #include "../engines/common/evas_scale_span.h"
1269 #include "../engines/common/evas_image.h"
1272 #include "../engines/common/evas_line.h"
1273 #include "../engines/common/evas_polygon.h"
1274 #include "../engines/common/evas_rectangle.h"
1277 EAPI void evas_common_blit_init (void);
1279 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);
1282 #include "../engines/common/evas_gradient.h"
1283 #include "../engines/common/evas_font.h"
1286 EAPI void evas_common_tilebuf_init (void);
1288 EAPI Tilebuf *evas_common_tilebuf_new (int w, int h);
1289 EAPI void evas_common_tilebuf_free (Tilebuf *tb);
1290 EAPI void evas_common_tilebuf_set_tile_size (Tilebuf *tb, int tw, int th);
1291 EAPI void evas_common_tilebuf_get_tile_size (Tilebuf *tb, int *tw, int *th);
1292 EAPI int evas_common_tilebuf_add_redraw (Tilebuf *tb, int x, int y, int w, int h);
1293 EAPI int evas_common_tilebuf_del_redraw (Tilebuf *tb, int x, int y, int w, int h);
1294 EAPI int evas_common_tilebuf_add_motion_vector (Tilebuf *tb, int x, int y, int w, int h, int dx, int dy, int alpha);
1295 EAPI void evas_common_tilebuf_clear (Tilebuf *tb);
1296 EAPI Tilebuf_Rect *evas_common_tilebuf_get_render_rects (Tilebuf *tb);
1297 EAPI void evas_common_tilebuf_free_render_rects (Tilebuf_Rect *rects);
1300 Regionbuf *evas_common_regionbuf_new (int w, int h);
1301 void evas_common_regionbuf_free (Regionbuf *rb);
1302 void evas_common_regionbuf_clear (Regionbuf *rb);
1303 void evas_common_regionbuf_span_add (Regionbuf *rb, int x1, int x2, int y);
1304 void evas_common_regionbuf_span_del (Regionbuf *rb, int x1, int x2, int y);
1305 Tilebuf_Rect *evas_common_regionbuf_rects_get (Regionbuf *rb);
1309 #include "../engines/common/evas_draw.h"
1311 #include "../engines/common/evas_map_image.h"
1314 #ifdef BUILD_PIPE_RENDER
1315 # include "../engines/common/evas_pipe.h"
1318 void evas_font_dir_cache_free(void);
1322 /*****************************************************************************/
1324 //#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 70)
1326 # include <arm_neon.h>