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 */
15 /* macros needed to log message through eina_log */
16 extern int _evas_log_dom_global;
17 #ifdef _EVAS_DEFAULT_MODULE_LOG_DOM
18 #undef _EVAS_DEFAULT_MODULE_LOG_DOM
20 #define _EVAS_DEFAULT_MODULE_LOG_DOM _evas_log_dom_global
22 #ifdef EVAS_DEFAULT_LOG_COLOR
23 #undef EVAS_DEFAULT_LOG_COLOR
25 #define EVAS_DEFAULT_LOG_COLOR "\033[36m"
29 #define ERROR(...) EINA_LOG_DOM_ERR(_evas_log_dom_global, __VA_ARGS__)
33 #define DEBUG(...) EINA_LOG_DOM_DBG(_evas_log_dom_global, __VA_ARGS__)
37 #define INFO(...) EINA_LOG_DOM_INFO(_evas_log_dom_global, __VA_ARGS__)
41 #define WARN(...) EINA_LOG_DOM_WARN(_evas_log_dom_global, __VA_ARGS__)
45 #define CRITICAL(...) EINA_LOG_DOM_CRIT(_evas_log_dom_global, __VA_ARGS__)
47 * macros that are used all around the code for message processing
48 * four macros are defined ERR, WRN, DGB, INF.
49 * EFREET_MODULE_LOG_DOM should be defined individually for each module
55 #define ERR(...) EINA_LOG_DOM_ERR(_EVAS_DEFAULT_MODULE_LOG_DOM, __VA_ARGS__)
59 #define DBG(...) EINA_LOG_DOM_DBG(_EVAS_DEFAULT_MODULE_LOG_DOM, __VA_ARGS__)
63 #define INF(...) EINA_LOG_DOM_INFO(_EVAS_DEFAULT__MODULE_LOG_DOM, __VA_ARGS__)
67 #define WRN(...) EINA_LOG_DOM_WARN(_EVAS_DEFAULT_MODULE_LOG_DOM, __VA_ARGS__)
71 #define CRIT(...) EINA_LOG_DOM_CRIT(_EVAS_DEFAULT_MODULE_LOG_DOM, __VA_ARGS__)
73 /*****************************************************************************/
75 #include "evas_options.h"
77 #if defined(__ARM_ARCH_3M__)
78 # define __ARM_ARCH__ 40
80 #if defined(__ARM_ARCH_4__)
81 # define __ARM_ARCH__ 40
83 #if defined(__ARM_ARCH_4T__)
84 # define __ARM_ARCH__ 41
87 #if defined(__ARM_ARCH_5__)
88 # define __ARM_ARCH__ 50
90 #if defined(__ARM_ARCH_5T__)
91 # define __ARM_ARCH__ 51
93 #if defined(__ARM_ARCH_5E__)
94 # define __ARM_ARCH__ 52
96 #if defined(__ARM_ARCH_5TE__)
97 # define __ARM_ARCH__ 53
99 #if defined(__ARM_ARCH_5TEJ__)
100 # define __ARM_ARCH__ 54
103 #if defined(__ARM_ARCH_6__)
104 # define __ARM_ARCH__ 60
106 #if defined(__ARM_ARCH_6J__)
107 # define __ARM_ARCH__ 61
109 #if defined(__ARM_ARCH_6K__)
110 # define __ARM_ARCH__ 62
112 #if defined(__ARM_ARCH_6Z__)
113 # define __ARM_ARCH__ 63
115 #if defined(__ARM_ARCH_6ZK__)
116 # define __ARM_ARCH__ 64
118 #if defined(__ARM_ARCH_6T2__)
119 # define __ARM_ARCH__ 65
122 #if defined(__ARM_ARCH_7__)
123 # define __ARM_ARCH__ 70
125 #if defined(__ARM_ARCH_7A__)
126 # define __ARM_ARCH__ 71
128 #if defined(__ARM_ARCH_7R__)
129 # define __ARM_ARCH__ 72
131 #if defined(__ARM_ARCH_7M__)
132 # define __ARM_ARCH__ 73
139 #ifndef BUILD_PTHREAD
140 #undef BUILD_PIPE_RENDER
149 # include <pthread.h>
151 # define LK(x) pthread_mutex_t x
152 # define LKI(x) pthread_mutex_init(&(x), NULL);
153 # define LKD(x) pthread_mutex_destroy(&(x));
154 # define LKL(x) pthread_mutex_lock(&(x));
155 # define LKT(x) pthread_mutex_trylock(&(x));
156 # define LKU(x) pthread_mutex_unlock(&(x));
157 # define TH(x) pthread_t x
158 # define THI(x) int x
161 // even though in theory having every Nth rendered line done by a different
162 // thread might even out load across threads - it actually slows things down.
180 #include <sys/types.h>
181 #include <sys/stat.h>
189 #elif defined __GNUC__
190 # define alloca __builtin_alloca
192 # define alloca __alloca
193 #elif defined _MSC_VER
195 # define alloca _alloca
201 void *alloca (size_t);
204 #include <ft2build.h>
205 #include FT_FREETYPE_H
212 // BROKEN in gcc 4 on amd64
213 //# pragma GCC visibility push(hidden)
215 #define LIKELY(x) __builtin_expect(!!(x), 1)
216 #define UNLIKELY(x) __builtin_expect(!!(x), 0)
218 #define LIKELY(x) (x)
219 #define UNLIKELY(x) (x)
222 /*****************************************************************************/
224 /* use exact rects for updates not tiles */
225 /* #define RECTUPDATE */
227 #define IMG_MAX_SIZE 65000
229 #define IMG_TOO_BIG(w, h) \
230 ((((unsigned long long)w) * ((unsigned long long)h)) > \
231 (1ULL << (29 * (sizeof(void *) / 4))))
233 #ifdef BUILD_SMALL_DITHER_MASK
234 # define DM_TABLE _evas_dither_44
238 # define USE_DITHER_44 1
239 # define DM_MSK (DM_SIZE - 1)
240 # define DM_SHF(_b) (DM_BITS - (8 - _b))
242 # define DM_TABLE _evas_dither_128128
246 # define USE_DITHER_128128 1
247 # define DM_MSK (DM_SIZE - 1)
248 # define DM_SHF(_b) (DM_BITS - (8 - _b))
251 /* if more than 1/ALPHA_SPARSE_INV_FRACTION is "alpha" (1-254) then sparse
252 * alpha flag gets set */
253 #define ALPHA_SPARSE_INV_FRACTION 3
255 /*****************************************************************************/
257 #if defined(__ARM_ARCH_3M__)
258 # define __ARM_ARCH__ 40
260 #if defined(__ARM_ARCH_4__)
261 # define __ARM_ARCH__ 40
263 #if defined(__ARM_ARCH_4T__)
264 # define __ARM_ARCH__ 41
267 #if defined(__ARM_ARCH_5__)
268 # define __ARM_ARCH__ 50
270 #if defined(__ARM_ARCH_5T__)
271 # define __ARM_ARCH__ 51
273 #if defined(__ARM_ARCH_5E__)
274 # define __ARM_ARCH__ 52
276 #if defined(__ARM_ARCH_5TE__)
277 # define __ARM_ARCH__ 53
279 #if defined(__ARM_ARCH_5TEJ__)
280 # define __ARM_ARCH__ 54
283 #if defined(__ARM_ARCH_6__)
284 # define __ARM_ARCH__ 60
286 #if defined(__ARM_ARCH_6J__)
287 # define __ARM_ARCH__ 61
289 #if defined(__ARM_ARCH_6K__)
290 # define __ARM_ARCH__ 62
292 #if defined(__ARM_ARCH_6Z__)
293 # define __ARM_ARCH__ 63
295 #if defined(__ARM_ARCH_6ZK__)
296 # define __ARM_ARCH__ 64
298 #if defined(__ARM_ARCH_6T2__)
299 # define __ARM_ARCH__ 65
302 #if defined(__ARM_ARCH_7__)
303 # define __ARM_ARCH__ 70
305 #if defined(__ARM_ARCH_7A__)
306 # define __ARM_ARCH__ 71
308 #if defined(__ARM_ARCH_7R__)
309 # define __ARM_ARCH__ 72
311 #if defined(__ARM_ARCH_7M__)
312 # define __ARM_ARCH__ 73
315 #if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52)
316 /* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */
317 #define pld(addr, off) \
318 __asm__("pld [%[address], %[offset]]":: \
319 [address] "r" (addr), [offset] "i" (off))
321 #define pld(addr, off)
322 #endif /* __ARMEL__ */
324 /*****************************************************************************/
326 #define UNROLL2(op...) op op
327 #define UNROLL4(op...) UNROLL2(op) UNROLL2(op)
328 #define UNROLL8(op...) UNROLL4(op) UNROLL4(op)
329 #define UNROLL16(op...) UNROLL8(op) UNROLL8(op)
331 #define UNROLL8_PLD_WHILE(start, size, end, op) \
333 end = start + (size & ~7); \
334 while (start < end) \
341 while (start < end) \
346 /*****************************************************************************/
348 typedef unsigned long long DATA64;
349 typedef unsigned int DATA32;
350 typedef unsigned short DATA16;
351 typedef unsigned char DATA8;
353 typedef struct _Image_Entry Image_Entry;
354 typedef struct _Image_Entry_Flags Image_Entry_Flags;
355 typedef struct _Engine_Image_Entry Engine_Image_Entry;
356 typedef struct _Evas_Cache_Target Evas_Cache_Target;
358 typedef struct _RGBA_Image_Loadopts RGBA_Image_Loadopts;
359 #ifdef BUILD_PIPE_RENDER
360 typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op;
361 typedef struct _RGBA_Pipe RGBA_Pipe;
362 typedef struct _RGBA_Pipe_Thread_Info RGBA_Pipe_Thread_Info;
364 typedef struct _RGBA_Image RGBA_Image;
365 typedef struct _RGBA_Image_Span RGBA_Image_Span;
366 typedef struct _RGBA_Draw_Context RGBA_Draw_Context;
367 typedef struct _RGBA_Gradient RGBA_Gradient;
368 typedef struct _RGBA_Gradient_Color_Stop RGBA_Gradient_Color_Stop;
369 typedef struct _RGBA_Gradient_Alpha_Stop RGBA_Gradient_Alpha_Stop;
370 typedef struct _RGBA_Gradient_Type RGBA_Gradient_Type;
371 typedef struct _RGBA_Gradient2 RGBA_Gradient2;
372 typedef struct _RGBA_Gradient2_Type RGBA_Gradient2_Type;
373 typedef struct _RGBA_Gradient2_Color_Np_Stop RGBA_Gradient2_Color_Np_Stop;
374 typedef struct _RGBA_Polygon_Point RGBA_Polygon_Point;
375 typedef struct _RGBA_Font RGBA_Font;
376 typedef struct _RGBA_Font_Int RGBA_Font_Int;
377 typedef struct _RGBA_Font_Source RGBA_Font_Source;
378 typedef struct _RGBA_Font_Glyph RGBA_Font_Glyph;
379 typedef struct _RGBA_Gfx_Compositor RGBA_Gfx_Compositor;
381 typedef struct _Cutout_Rect Cutout_Rect;
382 typedef struct _Cutout_Rects Cutout_Rects;
384 typedef struct _Convert_Pal Convert_Pal;
386 typedef struct _Tilebuf Tilebuf;
387 typedef struct _Tilebuf_Tile Tilebuf_Tile;
388 typedef struct _Tilebuf_Rect Tilebuf_Rect;
390 typedef struct _Evas_Common_Transform Evas_Common_Transform;
393 typedef struct _Regionbuf Regionbuf;
394 typedef struct _Regionspan Regionspan;
397 typedef void (*RGBA_Gfx_Func) (DATA32 *src, DATA8 *mask, DATA32 col, DATA32 *dst, int len);
398 typedef void (*RGBA_Gfx_Pt_Func) (DATA32 src, DATA8 mask, DATA32 col, DATA32 *dst);
399 typedef void (*Gfx_Func_Copy) (DATA32 *src, DATA32 *dst, int len);
401 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);
403 typedef void (*Gfx_Func_Gradient_Fill)(DATA32 *src, int src_len,
404 DATA32 *dst, DATA8 *mask, int len,
405 int x, int y, int axx, int axy, int ayx, int ayy,
408 typedef void (*Gfx_Func_Gradient2_Fill)(DATA32 *src, int src_len,
409 DATA32 *dst, DATA8 *mask, int len,
413 #include "../cache/evas_cache.h"
415 /*****************************************************************************/
417 typedef enum _RGBA_Image_Flags
419 RGBA_IMAGE_NOTHING = (0),
420 /* RGBA_IMAGE_HAS_ALPHA = (1 << 0), */
421 RGBA_IMAGE_IS_DIRTY = (1 << 1),
422 RGBA_IMAGE_INDEXED = (1 << 2),
423 RGBA_IMAGE_ALPHA_ONLY = (1 << 3),
424 RGBA_IMAGE_ALPHA_TILES = (1 << 4),
425 /* RGBA_IMAGE_ALPHA_SPARSE = (1 << 5), */
426 /* RGBA_IMAGE_LOADED = (1 << 6), */
427 /* RGBA_IMAGE_NEED_DATA = (1 << 7) */
430 typedef enum _Convert_Pal_Mode
448 typedef enum _CPU_Features
451 CPU_FEATURE_MMX = (1 << 0),
452 CPU_FEATURE_MMX2 = (1 << 1),
453 CPU_FEATURE_SSE = (1 << 2),
454 CPU_FEATURE_ALTIVEC = (1 << 3),
455 CPU_FEATURE_VIS = (1 << 4),
456 CPU_FEATURE_VIS2 = (1 << 5),
457 CPU_FEATURE_NEON = (1 << 6)
460 typedef enum _Font_Hint_Flags
467 /*****************************************************************************/
469 struct _RGBA_Image_Loadopts
471 int scale_down_by; // if > 1 then use this
472 double dpi; // if > 0.0 use this
473 int w, h; // if > 0 use this
479 struct _Image_Entry_Flags
481 Eina_Bool loaded : 1;
484 Eina_Bool need_data : 1;
485 Eina_Bool lru_nodata : 1;
486 Eina_Bool cached : 1;
488 Eina_Bool alpha_sparse : 1;
489 #ifdef BUILD_ASYNC_PRELOAD
490 Eina_Bool preload : 1;
494 struct _Evas_Cache_Target
504 Evas_Cache_Image *cache;
506 const char *cache_key;
511 Evas_Cache_Target *targets;
520 RGBA_Image_Loadopts load_opts;
537 #ifdef BUILD_ASYNC_PRELOAD
541 Image_Entry_Flags flags;
542 Evas_Image_Scale_Hint scale_hint;
549 struct _Engine_Image_Entry
553 /* Upper Engine data. */
557 Evas_Cache_Engine_Image *cache;
558 const char *cache_key;
562 Eina_Bool cached : 1;
565 Eina_Bool loaded : 1;
566 Eina_Bool need_parent : 1;
586 struct _Evas_Common_Transform
593 struct _RGBA_Draw_Context
602 struct RGBA_Draw_Context_clip {
609 void *(*gl_new) (void *data, RGBA_Font_Glyph *fg);
610 void (*gl_free) (void *ext_dat);
611 void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
622 Eina_Bool anti_alias : 1;
625 #ifdef BUILD_PIPE_RENDER
628 RGBA_Draw_Context context;
629 void (*op_func) (RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info);
630 void (*free_func) (RGBA_Pipe_Op *op);
640 RGBA_Polygon_Point *points;
647 RGBA_Gradient2 *grad;
657 int sx, sy, sw, sh, dx, dy, dw, dh;
670 RGBA_Pipe_Op op[PIPE_LEN];
673 struct _RGBA_Pipe_Thread_Info
682 Image_Entry cache_entry;
684 RGBA_Image_Flags flags;
689 /* char *real_file; */
695 #ifdef BUILD_PIPE_RENDER
700 /* unsigned char scale; */
702 /* Colorspace stuff. */
705 Eina_Bool no_free : 1;
712 Eina_Bool no_free : 1;
718 unsigned long long orig_usage;
719 unsigned long long usage_count;
721 unsigned long long newest_usage;
722 unsigned long long newest_usage_count;
726 struct _RGBA_Gradient_Color_Stop
733 struct _RGBA_Gradient_Alpha_Stop
740 struct _RGBA_Gradient
749 Eina_Bool has_alpha : 1;
775 RGBA_Gradient_Type *geometer;
781 Eina_Bool imported_data : 1;
782 Eina_Bool has_alpha : 1;
785 struct _RGBA_Gradient_Type
789 void (*shutdown)(void);
790 void (*geom_init)(RGBA_Gradient *gr);
791 void (*geom_set)(RGBA_Gradient *gr);
792 void (*geom_free)(void *gdata);
793 int (*has_alpha)(RGBA_Gradient *gr, int render_op);
794 int (*has_mask)(RGBA_Gradient *gr, int render_op);
795 int (*get_map_len)(RGBA_Gradient *gr);
796 Gfx_Func_Gradient_Fill (*get_fill_func)(RGBA_Gradient *gr, int render_op, unsigned char aa);
799 struct _RGBA_Gradient2_Color_Np_Stop
807 struct _RGBA_Gradient2
813 Eina_Bool has_alpha : 1;
826 Evas_Common_Transform transform;
832 RGBA_Gradient2_Type *geometer;
838 Eina_Bool has_alpha : 1;
841 struct _RGBA_Gradient2_Type
845 void (*shutdown)(void);
846 void (*geom_init)(RGBA_Gradient2 *gr);
847 void (*geom_update)(RGBA_Gradient2 *gr);
848 void (*geom_free)(void *gdata);
849 int (*has_alpha)(RGBA_Gradient2 *gr, int render_op);
850 int (*has_mask)(RGBA_Gradient2 *gr, int render_op);
851 int (*get_map_len)(RGBA_Gradient2 *gr);
852 Gfx_Func_Gradient2_Fill (*get_fill_func)(RGBA_Gradient2 *gr, int render_op);
856 struct _RGBA_Polygon_Point
865 Font_Hint_Flags hinting;
870 struct _RGBA_Font_Int
872 RGBA_Font_Source *src;
889 Font_Hint_Flags hinting;
895 struct _RGBA_Font_Source
903 #if 0 /* FIXME: charmap user is disabled and use a deprecated data type. */
904 Evas_Array_Hash *charmap;
915 struct _RGBA_Font_Glyph
919 FT_BitmapGlyph glyph_out;
920 /* this is a problem - only 1 engine at a time can extend such a font... grrr */
922 void (*ext_dat_free) (void *ext_dat);
925 struct _RGBA_Gfx_Compositor
930 void (*shutdown)(void);
932 RGBA_Gfx_Func (*composite_pixel_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
933 RGBA_Gfx_Func (*composite_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
934 RGBA_Gfx_Func (*composite_pixel_color_span_get)(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
935 RGBA_Gfx_Func (*composite_mask_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
936 RGBA_Gfx_Func (*composite_pixel_mask_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
938 RGBA_Gfx_Pt_Func (*composite_pixel_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
939 RGBA_Gfx_Pt_Func (*composite_color_pt_get)(DATA32 col, RGBA_Image *dst);
940 RGBA_Gfx_Pt_Func (*composite_pixel_color_pt_get)(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
941 RGBA_Gfx_Pt_Func (*composite_mask_color_pt_get)(DATA32 col, RGBA_Image *dst);
942 RGBA_Gfx_Pt_Func (*composite_pixel_mask_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
945 #define EVAS_RECT_SPLIT 1
946 #ifdef EVAS_RECT_SPLIT
947 typedef struct list_node list_node_t;
948 typedef struct list list_t;
949 typedef struct rect rect_t;
950 typedef struct rect_node rect_node_t;
954 struct list_node *next;
959 struct list_node *head;
960 struct list_node *tail;
976 struct list_node _lst;
980 void rect_list_node_pool_set_max(int max);
981 void rect_list_node_pool_flush(void);
982 list_node_t *rect_list_node_pool_get(void);
983 void rect_list_node_pool_put(list_node_t *node);
985 void rect_init(rect_t *r, int x, int y, int w, int h);
986 void rect_list_append_node(list_t *rects, list_node_t *node);
987 void rect_list_append(list_t *rects, const rect_t r);
988 void rect_list_append_xywh(list_t *rects, int x, int y, int w, int h);
989 void rect_list_concat(list_t *rects, list_t *other);
990 list_node_t *rect_list_unlink_next(list_t *rects, list_node_t *parent_node);
991 void rect_list_del_next(list_t *rects, list_node_t *parent_node);
992 void rect_list_clear(list_t *rects);
993 void rect_list_del_split_strict(list_t *rects, const rect_t del_r);
994 void rect_list_add_split_strict(list_t *rects, list_node_t *node);
995 list_node_t *rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error);
996 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);
998 void rect_print(const rect_t r);
999 void rect_list_print(const list_t rects);
1000 #endif /* EVAS_RECT_SPLIT */
1013 #elif defined(EVAS_RECT_SPLIT)
1019 Tilebuf_Tile *tiles;
1024 struct _Tilebuf_Tile
1026 Eina_Bool redraw : 1;
1027 /* FIXME: need these flags later - but not now */
1039 struct _Tilebuf_Rect
1062 Convert_Pal_Mode colors;
1069 /*****************************************************************************/
1070 #include "evas_macros.h"
1072 #ifndef WORDS_BIGENDIAN
1074 #define A_VAL(p) ((DATA8 *)(p))[3]
1075 #define R_VAL(p) ((DATA8 *)(p))[2]
1076 #define G_VAL(p) ((DATA8 *)(p))[1]
1077 #define B_VAL(p) ((DATA8 *)(p))[0]
1078 #define AR_VAL(p) ((DATA16 *)(p)[1])
1079 #define GB_VAL(p) ((DATA16 *)(p)[0])
1082 #define A_VAL(p) ((DATA8 *)(p))[0]
1083 #define R_VAL(p) ((DATA8 *)(p))[1]
1084 #define G_VAL(p) ((DATA8 *)(p))[2]
1085 #define B_VAL(p) ((DATA8 *)(p))[3]
1086 #define AR_VAL(p) ((DATA16 *)(p)[0])
1087 #define GB_VAL(p) ((DATA16 *)(p)[1])
1090 #define RGB_JOIN(r,g,b) \
1091 (((r) << 16) + ((g) << 8) + (b))
1093 #define ARGB_JOIN(a,r,g,b) \
1094 (((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
1096 #include "evas_blend_ops.h"
1098 #define _EVAS_RENDER_FILL -1
1099 #define _EVAS_RENDER_BLEND 0
1100 #define _EVAS_RENDER_BLEND_REL 1
1101 #define _EVAS_RENDER_COPY 2
1102 #define _EVAS_RENDER_COPY_REL 3
1103 #define _EVAS_RENDER_ADD 4
1104 #define _EVAS_RENDER_ADD_REL 5
1105 #define _EVAS_RENDER_SUB 6
1106 #define _EVAS_RENDER_SUB_REL 7
1107 #define _EVAS_RENDER_TINT 8
1108 #define _EVAS_RENDER_TINT_REL 9
1109 #define _EVAS_RENDER_MASK 10
1110 #define _EVAS_RENDER_MUL 11
1111 #define _EVAS_RENDER_CLIP 12
1113 #define _EVAS_TEXTURE_REFLECT 0
1114 #define _EVAS_TEXTURE_REPEAT 1
1115 #define _EVAS_TEXTURE_RESTRICT 2
1116 #define _EVAS_TEXTURE_RESTRICT_REFLECT 3
1117 #define _EVAS_TEXTURE_RESTRICT_REPEAT 4
1118 #define _EVAS_TEXTURE_PAD 5
1120 #define _EVAS_COLOR_SPACE_ARGB 0
1121 #define _EVAS_COLOR_SPACE_AHSV 1
1123 /*****************************************************************************/
1130 void evas_common_init (void);
1131 void evas_common_shutdown (void);
1133 EAPI void evas_common_cpu_init (void);
1135 int evas_common_cpu_have_cpuid (void);
1136 int evas_common_cpu_has_feature (unsigned int feature);
1137 EAPI void evas_common_cpu_can_do (int *mmx, int *sse, int *sse2);
1138 EAPI void evas_common_cpu_end_opt (void);
1141 #include "../engines/common/evas_blend.h"
1143 EAPI Gfx_Func_Copy evas_common_draw_func_copy_get (int pixels, int reverse);
1146 #include "../engines/common/evas_convert_color.h"
1147 #include "../engines/common/evas_convert_colorspace.h"
1148 #include "../engines/common/evas_convert_main.h"
1149 #include "../engines/common/evas_convert_yuv.h"
1150 #include "../engines/common/evas_scale_main.h"
1151 #include "../engines/common/evas_scale_smooth.h"
1152 #include "../engines/common/evas_scale_span.h"
1155 #include "../engines/common/evas_image.h"
1158 #include "../engines/common/evas_line.h"
1159 #include "../engines/common/evas_polygon.h"
1160 #include "../engines/common/evas_rectangle.h"
1163 EAPI void evas_common_blit_init (void);
1165 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);
1168 #include "../engines/common/evas_gradient.h"
1169 #include "../engines/common/evas_font.h"
1172 EAPI void evas_common_tilebuf_init (void);
1174 EAPI Tilebuf *evas_common_tilebuf_new (int w, int h);
1175 EAPI void evas_common_tilebuf_free (Tilebuf *tb);
1176 EAPI void evas_common_tilebuf_set_tile_size (Tilebuf *tb, int tw, int th);
1177 EAPI void evas_common_tilebuf_get_tile_size (Tilebuf *tb, int *tw, int *th);
1178 EAPI int evas_common_tilebuf_add_redraw (Tilebuf *tb, int x, int y, int w, int h);
1179 EAPI int evas_common_tilebuf_del_redraw (Tilebuf *tb, int x, int y, int w, int h);
1180 EAPI int evas_common_tilebuf_add_motion_vector (Tilebuf *tb, int x, int y, int w, int h, int dx, int dy, int alpha);
1181 EAPI void evas_common_tilebuf_clear (Tilebuf *tb);
1182 EAPI Tilebuf_Rect *evas_common_tilebuf_get_render_rects (Tilebuf *tb);
1183 EAPI void evas_common_tilebuf_free_render_rects (Tilebuf_Rect *rects);
1186 Regionbuf *evas_common_regionbuf_new (int w, int h);
1187 void evas_common_regionbuf_free (Regionbuf *rb);
1188 void evas_common_regionbuf_clear (Regionbuf *rb);
1189 void evas_common_regionbuf_span_add (Regionbuf *rb, int x1, int x2, int y);
1190 void evas_common_regionbuf_span_del (Regionbuf *rb, int x1, int x2, int y);
1191 Tilebuf_Rect *evas_common_regionbuf_rects_get (Regionbuf *rb);
1195 #include "../engines/common/evas_draw.h"
1198 #ifdef BUILD_PIPE_RENDER
1199 # include "../engines/common/evas_pipe.h"
1202 void evas_font_dir_cache_free(void);
1206 /*****************************************************************************/
1208 #if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 70)
1210 # include <arm_neon.h>