5 # include "config.h" /* so that EAPI in Evas.h is correctly defined */
14 //#include "Evas_GL.h"
20 #include <sys/types.h>
24 /* macros needed to log message through eina_log */
25 extern EAPI int _evas_log_dom_global;
26 #ifdef _EVAS_DEFAULT_LOG_DOM
27 # undef _EVAS_DEFAULT_LOG_DOM
29 #define _EVAS_DEFAULT_LOG_DOM _evas_log_dom_global
31 #ifdef EVAS_DEFAULT_LOG_COLOR
32 # undef EVAS_DEFAULT_LOG_COLOR
34 #define EVAS_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
39 #define ERR(...) EINA_LOG_DOM_ERR(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
44 #define DBG(...) EINA_LOG_DOM_DBG(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
49 #define INF(...) EINA_LOG_DOM_INFO(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
54 #define WRN(...) EINA_LOG_DOM_WARN(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
59 #define CRIT(...) EINA_LOG_DOM_CRIT(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
61 #include "evas_options.h"
63 #if defined(__ARM_ARCH_3M__)
64 # define __ARM_ARCH__ 40
66 #if defined(__ARM_ARCH_4__)
67 # define __ARM_ARCH__ 40
69 #if defined(__ARM_ARCH_4T__)
70 # define __ARM_ARCH__ 41
73 #if defined(__ARM_ARCH_5__)
74 # define __ARM_ARCH__ 50
76 #if defined(__ARM_ARCH_5T__)
77 # define __ARM_ARCH__ 51
79 #if defined(__ARM_ARCH_5E__)
80 # define __ARM_ARCH__ 52
82 #if defined(__ARM_ARCH_5TE__)
83 # define __ARM_ARCH__ 53
85 #if defined(__ARM_ARCH_5TEJ__)
86 # define __ARM_ARCH__ 54
89 #if defined(__ARM_ARCH_6__)
90 # define __ARM_ARCH__ 60
92 #if defined(__ARM_ARCH_6J__)
93 # define __ARM_ARCH__ 61
95 #if defined(__ARM_ARCH_6K__)
96 # define __ARM_ARCH__ 62
98 #if defined(__ARM_ARCH_6Z__)
99 # define __ARM_ARCH__ 63
101 #if defined(__ARM_ARCH_6ZK__)
102 # define __ARM_ARCH__ 64
104 #if defined(__ARM_ARCH_6T2__)
105 # define __ARM_ARCH__ 65
108 #if defined(__ARM_ARCH_7__)
109 # define __ARM_ARCH__ 70
111 #if defined(__ARM_ARCH_7A__)
112 # define __ARM_ARCH__ 71
114 #if defined(__ARM_ARCH_7R__)
115 # define __ARM_ARCH__ 72
117 #if defined(__ARM_ARCH_7M__)
118 # define __ARM_ARCH__ 73
121 #ifndef BUILD_PTHREAD
122 # undef BUILD_PIPE_RENDER
125 #if defined(BUILD_ASYNC_PRELOAD) && !defined(BUILD_PTHREAD)
126 # define BUILD_PTHREAD
131 #define LK(x) Eina_Lock x
132 #define LKI(x) eina_lock_new(&(x))
133 #define LKD(x) eina_lock_free(&(x))
134 #define LKL(x) eina_lock_take(&(x))
135 #define LKT(x) eina_lock_take_try(&(x))
136 #define LKU(x) eina_lock_release(&(x))
137 #define LKDBG(x) eina_lock_debug(&(x))
139 # define TH(x) pthread_t x
140 # define THI(x) int x
144 #define RWLK(x) pthread_rwlock_t x
145 #define RWLKI(x) pthread_rwlock_init(&(x), NULL)
146 #define RWLKD(x) pthread_rwlock_destroy(&(x))
147 #define RDLKL(x) pthread_rwlock_rdlock(&(x))
148 #define WRLKL(x) pthread_rwlock_wrlock(&(x))
149 #define RWLKU(x) pthread_rwlock_unlock(&(x))
152 // even though in theory having every Nth rendered line done by a different
153 // thread might even out load across threads - it actually slows things down.
180 #elif defined __GNUC__
181 # define alloca __builtin_alloca
183 # define alloca __alloca
184 #elif defined _MSC_VER
186 # define alloca _alloca
192 void *alloca (size_t);
198 #include <sys/types.h>
199 #include <sys/stat.h>
207 #include <ft2build.h>
208 #include FT_FREETYPE_H
215 // BROKEN in gcc 4 on amd64
216 //# pragma GCC visibility push(hidden)
218 #define LIKELY(x) __builtin_expect(!!(x), 1)
219 #define UNLIKELY(x) __builtin_expect(!!(x), 0)
221 #define LIKELY(x) (x)
222 #define UNLIKELY(x) (x)
225 /*****************************************************************************/
227 /* use exact rects for updates not tiles */
228 /* #define RECTUPDATE */
230 #define IMG_MAX_SIZE 65000
232 #define IMG_TOO_BIG(w, h) \
233 ((((unsigned long long)w) * ((unsigned long long)h)) >= \
234 ((1ULL << (29 * (sizeof(void *) / 4))) - 2048))
236 #ifdef BUILD_SMALL_DITHER_MASK
237 # define DM_TABLE _evas_dither_44
241 # define USE_DITHER_44 1
243 # define DM_TABLE _evas_dither_128128
247 # define USE_DITHER_128128 1
250 #define DM_MSK (DM_SIZE - 1)
251 #define DM_SHF(_b) (DM_BITS - (8 - _b))
252 /* Supports negative right shifts */
253 #define DM_SHR(x, _b) ((DM_SHF(_b) >= 0) ? \
254 ((x) >> DM_SHF(_b)) : ((x) << -DM_SHF(_b)))
256 /* if more than 1/ALPHA_SPARSE_INV_FRACTION is "alpha" (1-254) then sparse
257 * alpha flag gets set */
258 #define ALPHA_SPARSE_INV_FRACTION 3
260 /*****************************************************************************/
262 #if defined(__ARM_ARCH_3M__)
263 # define __ARM_ARCH__ 40
265 #if defined(__ARM_ARCH_4__)
266 # define __ARM_ARCH__ 40
268 #if defined(__ARM_ARCH_4T__)
269 # define __ARM_ARCH__ 41
272 #if defined(__ARM_ARCH_5__)
273 # define __ARM_ARCH__ 50
275 #if defined(__ARM_ARCH_5T__)
276 # define __ARM_ARCH__ 51
278 #if defined(__ARM_ARCH_5E__)
279 # define __ARM_ARCH__ 52
281 #if defined(__ARM_ARCH_5TE__)
282 # define __ARM_ARCH__ 53
284 #if defined(__ARM_ARCH_5TEJ__)
285 # define __ARM_ARCH__ 54
288 #if defined(__ARM_ARCH_6__)
289 # define __ARM_ARCH__ 60
291 #if defined(__ARM_ARCH_6J__)
292 # define __ARM_ARCH__ 61
294 #if defined(__ARM_ARCH_6K__)
295 # define __ARM_ARCH__ 62
297 #if defined(__ARM_ARCH_6Z__)
298 # define __ARM_ARCH__ 63
300 #if defined(__ARM_ARCH_6ZK__)
301 # define __ARM_ARCH__ 64
303 #if defined(__ARM_ARCH_6T2__)
304 # define __ARM_ARCH__ 65
307 #if defined(__ARM_ARCH_7__)
308 # define __ARM_ARCH__ 70
310 #if defined(__ARM_ARCH_7A__)
311 # define __ARM_ARCH__ 71
313 #if defined(__ARM_ARCH_7R__)
314 # define __ARM_ARCH__ 72
316 #if defined(__ARM_ARCH_7M__)
317 # define __ARM_ARCH__ 73
320 #if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52)
321 /* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */
322 #define pld(addr, off) \
323 __asm__("pld [%[address], %[offset]]":: \
324 [address] "r" (addr), [offset] "i" (off))
326 #define pld(addr, off)
327 #endif /* __ARMEL__ */
329 /*****************************************************************************/
331 #define UNROLL2(op...) op op
332 #define UNROLL4(op...) UNROLL2(op) UNROLL2(op)
333 #define UNROLL8(op...) UNROLL4(op) UNROLL4(op)
334 #define UNROLL16(op...) UNROLL8(op) UNROLL8(op)
336 #define UNROLL8_PLD_WHILE(start, size, end, op) \
338 end = start + (size & ~7); \
339 while (start < end) \
346 while (start < end) \
351 /*****************************************************************************/
353 typedef unsigned long long DATA64;
354 typedef unsigned int DATA32;
355 typedef unsigned short DATA16;
356 typedef unsigned char DATA8;
358 typedef struct _Image_Entry Image_Entry;
359 typedef struct _Image_Entry_Flags Image_Entry_Flags;
360 typedef struct _Image_Timestamp Image_Timestamp;
361 typedef struct _Engine_Image_Entry Engine_Image_Entry;
362 typedef struct _Evas_Cache_Target Evas_Cache_Target;
363 typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread;
365 typedef struct _RGBA_Image_Loadopts RGBA_Image_Loadopts;
366 #ifdef BUILD_PIPE_RENDER
367 typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op;
368 typedef struct _RGBA_Pipe RGBA_Pipe;
369 typedef struct _RGBA_Pipe_Thread_Info RGBA_Pipe_Thread_Info;
371 typedef struct _RGBA_Image RGBA_Image;
372 typedef struct _RGBA_Image_Span RGBA_Image_Span;
373 typedef struct _RGBA_Draw_Context RGBA_Draw_Context;
374 typedef struct _RGBA_Polygon_Point RGBA_Polygon_Point;
375 typedef struct _RGBA_Map_Point RGBA_Map_Point;
376 typedef struct _RGBA_Font RGBA_Font;
377 typedef struct _RGBA_Font_Int RGBA_Font_Int;
378 typedef struct _RGBA_Font_Source RGBA_Font_Source;
379 typedef struct _RGBA_Font_Glyph RGBA_Font_Glyph;
380 typedef struct _RGBA_Gfx_Compositor RGBA_Gfx_Compositor;
382 typedef struct _Cutout_Rect Cutout_Rect;
383 typedef struct _Cutout_Rects Cutout_Rects;
385 typedef struct _Convert_Pal Convert_Pal;
387 typedef struct _Tilebuf Tilebuf;
388 typedef struct _Tilebuf_Tile Tilebuf_Tile;
389 typedef struct _Tilebuf_Rect Tilebuf_Rect;
391 typedef struct _Evas_Common_Transform Evas_Common_Transform;
394 // all coords are 20.12
395 // fp type - an int for now
397 // fp # of bits of float accuracy
399 // fp half (half of an fp unit)
400 #define FPH (1 << (FP - 1))
402 #define FP1 (1 << (FP))
405 typedef struct _Regionbuf Regionbuf;
406 typedef struct _Regionspan Regionspan;
409 typedef void (*RGBA_Gfx_Func) (DATA32 *src, DATA8 *mask, DATA32 col, DATA32 *dst, int len);
410 typedef void (*RGBA_Gfx_Pt_Func) (DATA32 src, DATA8 mask, DATA32 col, DATA32 *dst);
411 typedef void (*Gfx_Func_Copy) (DATA32 *src, DATA32 *dst, int len);
413 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);
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 typedef enum _Font_Rend_Flags
472 FONT_REND_REGULAR = 0,
473 FONT_REND_ITALIC = (1 << 0),
474 FONT_REND_BOLD = (1 << 1),
477 /*****************************************************************************/
479 typedef struct _Filtered_Image Filtered_Image;
481 struct _RGBA_Image_Loadopts
483 int scale_down_by; // if > 1 then use this
484 double dpi; // if > 0.0 use this
485 unsigned int w, h; // if > 0 use this
487 unsigned int x, y, w, h;
491 struct _Image_Entry_Flags
493 Eina_Bool loaded : 1;
494 Eina_Bool in_progress : 1;
498 Eina_Bool need_data : 1;
499 Eina_Bool lru_nodata : 1;
500 Eina_Bool cached : 1;
504 Eina_Bool alpha_sparse : 1;
505 #ifdef BUILD_ASYNC_PRELOAD
506 Eina_Bool preload_done : 1;
507 Eina_Bool delete_me : 1;
508 Eina_Bool pending : 1;
512 struct _Evas_Cache_Target
519 struct _Image_Timestamp
524 #ifdef _STAT_VER_LINUX
525 unsigned long int mtime_nsec;
533 Evas_Cache_Image *cache;
535 const char *cache_key;
540 Evas_Cache_Target *targets;
541 Evas_Preload_Pthread *preload;
543 Image_Timestamp tstamp;
546 #ifdef EVAS_FRAME_QUEUING
547 LK(lock_references); // needed for accessing references
550 #ifdef BUILD_PIPE_RENDER
552 #ifdef EVAS_FRAME_QUEUING
555 Eina_Condition cond_fq_del;
556 int ref_fq[2]; // ref_fq[0] is for addition, ref_fq[1] is for deletion
562 RGBA_Image_Loadopts load_opts;
579 #ifdef BUILD_ASYNC_PRELOAD
582 Eina_Bool unload_cancel : 1;
585 Image_Entry_Flags flags;
586 Evas_Image_Scale_Hint scale_hint;
594 struct _Engine_Image_Entry
598 /* Upper Engine data. */
602 Evas_Cache_Engine_Image *cache;
603 const char *cache_key;
607 Eina_Bool cached : 1;
610 Eina_Bool loaded : 1;
611 Eina_Bool need_parent : 1;
631 struct _Evas_Common_Transform
638 struct _RGBA_Draw_Context
647 struct RGBA_Draw_Context_clip {
658 void *(*gl_new) (void *data, RGBA_Font_Glyph *fg);
659 void (*gl_free) (void *ext_dat);
660 void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
671 Eina_Bool anti_alias : 1;
674 #ifdef BUILD_PIPE_RENDER
675 #include "../engines/common/evas_map_image.h"
676 #include "../engines/common/evas_text_utils.h"
680 RGBA_Draw_Context context;
681 void (*op_func) (RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info);
682 void (*free_func) (RGBA_Pipe_Op *op);
692 RGBA_Polygon_Point *points;
697 Evas_Text_Props intl_props;
701 int sx, sy, sw, sh, dx, dy, dw, dh;
721 RGBA_Pipe_Op op[PIPE_LEN];
724 struct _RGBA_Pipe_Thread_Info
733 Image_Entry cache_entry;
735 RGBA_Image_Flags flags;
740 /* char *real_file; */
748 /* unsigned char scale; */
750 /* Colorspace stuff. */
753 Eina_Bool no_free : 1;
760 Eina_Bool no_free : 1;
773 unsigned long long orig_usage;
774 unsigned long long usage_count;
776 unsigned long long newest_usage;
777 unsigned long long newest_usage_count;
787 struct _RGBA_Polygon_Point
793 struct _RGBA_Map_Point
795 FPc x, y; // x, y screenspace
796 float fx, fy, fz; // x, y, z in floats
797 // FPc x3, y3; // x, y 3d space
798 FPc z; // z in world space. optional
799 FPc u, v; // u, v in tex coords
800 DATA32 col; // color at this point
801 // for perspective correctness - only point 0 has relevant info
805 struct _Filtered_Image
815 typedef struct _Fash_Item_Index_Map Fash_Item_Index_Map;
816 typedef struct _Fash_Int_Map Fash_Int_Map;
817 typedef struct _Fash_Int_Map2 Fash_Int_Map2;
818 typedef struct _Fash_Int Fash_Int;
819 struct _Fash_Item_Index_Map
826 Fash_Item_Index_Map item[256];
828 struct _Fash_Int_Map2
830 Fash_Int_Map *bucket[256];
834 Fash_Int_Map2 *bucket[256];
835 void (*freeme) (Fash_Int *fash);
839 typedef struct _Fash_Glyph_Map Fash_Glyph_Map;
840 typedef struct _Fash_Glyph_Map2 Fash_Glyph_Map2;
841 typedef struct _Fash_Glyph Fash_Glyph;
842 struct _Fash_Glyph_Map
844 RGBA_Font_Glyph *item[256];
846 struct _Fash_Glyph_Map2
848 Fash_Glyph_Map *bucket[256];
852 Fash_Glyph_Map2 *bucket[256];
853 void (*freeme) (Fash_Glyph *fash);
861 Font_Hint_Flags hinting;
863 #ifdef EVAS_FRAME_QUEUING
864 int ref_fq[2]; //ref_fq[0] is for addition, ref_fq[1] is for deletion
865 Eina_Condition cond_fq_del;
870 unsigned char sizeok : 1;
873 struct _RGBA_Font_Int
876 RGBA_Font_Source *src;
888 Font_Hint_Flags hinting;
889 Font_Rend_Flags wanted_rend; /* The wanted rendering style */
890 Font_Rend_Flags runtime_rend; /* The rendering we need to do on runtime
891 in order to comply with the wanted_rend. */
892 unsigned char sizeok : 1;
893 unsigned char inuse : 1;
896 #include "../engines/common/evas_font_ot.h"
898 struct _RGBA_Font_Source
903 unsigned int current_size;
912 struct _RGBA_Font_Glyph
916 FT_BitmapGlyph glyph_out;
917 /* this is a problem - only 1 engine at a time can extend such a font... grrr */
919 void (*ext_dat_free) (void *ext_dat);
923 struct _RGBA_Gfx_Compositor
928 void (*shutdown)(void);
930 RGBA_Gfx_Func (*composite_pixel_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
931 RGBA_Gfx_Func (*composite_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
932 RGBA_Gfx_Func (*composite_pixel_color_span_get)(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
933 RGBA_Gfx_Func (*composite_mask_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
934 RGBA_Gfx_Func (*composite_pixel_mask_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
936 RGBA_Gfx_Pt_Func (*composite_pixel_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
937 RGBA_Gfx_Pt_Func (*composite_color_pt_get)(DATA32 col, RGBA_Image *dst);
938 RGBA_Gfx_Pt_Func (*composite_pixel_color_pt_get)(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
939 RGBA_Gfx_Pt_Func (*composite_mask_color_pt_get)(DATA32 col, RGBA_Image *dst);
940 RGBA_Gfx_Pt_Func (*composite_pixel_mask_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
943 #define EVAS_RECT_SPLIT 1
944 #ifdef EVAS_RECT_SPLIT
945 typedef struct list_node list_node_t;
946 typedef struct list list_t;
947 typedef struct rect rect_t;
948 typedef struct rect_node rect_node_t;
952 struct list_node *next;
957 struct list_node *head;
958 struct list_node *tail;
974 struct list_node _lst;
978 void rect_list_node_pool_set_max(int max);
979 void rect_list_node_pool_flush(void);
980 list_node_t *rect_list_node_pool_get(void);
981 void rect_list_node_pool_put(list_node_t *node);
983 void rect_init(rect_t *r, int x, int y, int w, int h);
984 void rect_list_append_node(list_t *rects, list_node_t *node);
985 void rect_list_append(list_t *rects, const rect_t r);
986 void rect_list_append_xywh(list_t *rects, int x, int y, int w, int h);
987 void rect_list_concat(list_t *rects, list_t *other);
988 list_node_t *rect_list_unlink_next(list_t *rects, list_node_t *parent_node);
989 void rect_list_del_next(list_t *rects, list_node_t *parent_node);
990 void rect_list_clear(list_t *rects);
991 void rect_list_del_split_strict(list_t *rects, const rect_t del_r);
992 void rect_list_add_split_strict(list_t *rects, list_node_t *node);
993 list_node_t *rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error);
994 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);
996 void rect_print(const rect_t r);
997 void rect_list_print(const list_t rects);
998 #endif /* EVAS_RECT_SPLIT */
1011 #elif defined(EVAS_RECT_SPLIT)
1017 Tilebuf_Tile *tiles;
1022 struct _Tilebuf_Tile
1024 Eina_Bool redraw : 1;
1025 /* FIXME: need these flags later - but not now */
1037 struct _Tilebuf_Rect
1060 Convert_Pal_Mode colors;
1067 /*****************************************************************************/
1068 #include "evas_macros.h"
1070 #ifndef WORDS_BIGENDIAN
1072 #define A_VAL(p) (((DATA8 *)(p))[3])
1073 #define R_VAL(p) (((DATA8 *)(p))[2])
1074 #define G_VAL(p) (((DATA8 *)(p))[1])
1075 #define B_VAL(p) (((DATA8 *)(p))[0])
1076 #define AR_VAL(p) ((DATA16 *)(p)[1])
1077 #define GB_VAL(p) ((DATA16 *)(p)[0])
1080 #define A_VAL(p) (((DATA8 *)(p))[0])
1081 #define R_VAL(p) (((DATA8 *)(p))[1])
1082 #define G_VAL(p) (((DATA8 *)(p))[2])
1083 #define B_VAL(p) (((DATA8 *)(p))[3])
1084 #define AR_VAL(p) ((DATA16 *)(p)[0])
1085 #define GB_VAL(p) ((DATA16 *)(p)[1])
1088 #define RGB_JOIN(r,g,b) \
1089 (((r) << 16) + ((g) << 8) + (b))
1091 #define ARGB_JOIN(a,r,g,b) \
1092 (((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
1094 #include "evas_blend_ops.h"
1096 #define _EVAS_RENDER_FILL -1
1097 #define _EVAS_RENDER_BLEND 0
1098 #define _EVAS_RENDER_BLEND_REL 1
1099 #define _EVAS_RENDER_COPY 2
1100 #define _EVAS_RENDER_COPY_REL 3
1101 #define _EVAS_RENDER_ADD 4
1102 #define _EVAS_RENDER_ADD_REL 5
1103 #define _EVAS_RENDER_SUB 6
1104 #define _EVAS_RENDER_SUB_REL 7
1105 #define _EVAS_RENDER_TINT 8
1106 #define _EVAS_RENDER_TINT_REL 9
1107 #define _EVAS_RENDER_MASK 10
1108 #define _EVAS_RENDER_MUL 11
1109 #define _EVAS_RENDER_CLIP 12
1111 #define _EVAS_TEXTURE_REFLECT 0
1112 #define _EVAS_TEXTURE_REPEAT 1
1113 #define _EVAS_TEXTURE_RESTRICT 2
1114 #define _EVAS_TEXTURE_RESTRICT_REFLECT 3
1115 #define _EVAS_TEXTURE_RESTRICT_REPEAT 4
1116 #define _EVAS_TEXTURE_PAD 5
1118 #define _EVAS_COLOR_SPACE_ARGB 0
1119 #define _EVAS_COLOR_SPACE_AHSV 1
1121 /*****************************************************************************/
1128 void evas_common_init (void);
1129 void evas_common_shutdown (void);
1131 EAPI void evas_common_cpu_init (void);
1133 int evas_common_cpu_have_cpuid (void);
1134 int evas_common_cpu_has_feature (unsigned int feature);
1135 EAPI void evas_common_cpu_can_do (int *mmx, int *sse, int *sse2);
1136 EAPI void evas_common_cpu_end_opt (void);
1139 #include "../engines/common/evas_blend.h"
1141 EAPI Gfx_Func_Copy evas_common_draw_func_copy_get (int pixels, int reverse);
1144 #include "../engines/common/evas_convert_color.h"
1145 #include "../engines/common/evas_convert_colorspace.h"
1146 #include "../engines/common/evas_convert_main.h"
1147 #include "../engines/common/evas_convert_yuv.h"
1148 #include "../engines/common/evas_scale_main.h"
1149 #include "../engines/common/evas_scale_smooth.h"
1150 #include "../engines/common/evas_scale_span.h"
1153 #include "../engines/common/evas_image.h"
1156 #include "../engines/common/evas_line.h"
1157 #include "../engines/common/evas_polygon.h"
1158 #include "../engines/common/evas_rectangle.h"
1161 EAPI void evas_common_blit_init (void);
1163 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);
1166 #include "../engines/common/evas_font.h"
1169 EAPI void evas_common_tilebuf_init (void);
1171 EAPI Tilebuf *evas_common_tilebuf_new (int w, int h);
1172 EAPI void evas_common_tilebuf_free (Tilebuf *tb);
1173 EAPI void evas_common_tilebuf_set_tile_size (Tilebuf *tb, int tw, int th);
1174 EAPI void evas_common_tilebuf_get_tile_size (Tilebuf *tb, int *tw, int *th);
1175 EAPI int evas_common_tilebuf_add_redraw (Tilebuf *tb, int x, int y, int w, int h);
1176 EAPI int evas_common_tilebuf_del_redraw (Tilebuf *tb, int x, int y, int w, int h);
1177 EAPI int evas_common_tilebuf_add_motion_vector (Tilebuf *tb, int x, int y, int w, int h, int dx, int dy, int alpha);
1178 EAPI void evas_common_tilebuf_clear (Tilebuf *tb);
1179 EAPI Tilebuf_Rect *evas_common_tilebuf_get_render_rects (Tilebuf *tb);
1180 EAPI void evas_common_tilebuf_free_render_rects (Tilebuf_Rect *rects);
1183 Regionbuf *evas_common_regionbuf_new (int w, int h);
1184 void evas_common_regionbuf_free (Regionbuf *rb);
1185 void evas_common_regionbuf_clear (Regionbuf *rb);
1186 void evas_common_regionbuf_span_add (Regionbuf *rb, int x1, int x2, int y);
1187 void evas_common_regionbuf_span_del (Regionbuf *rb, int x1, int x2, int y);
1188 Tilebuf_Rect *evas_common_regionbuf_rects_get (Regionbuf *rb);
1192 #include "../engines/common/evas_draw.h"
1194 #include "../engines/common/evas_map_image.h"
1197 #ifdef BUILD_PIPE_RENDER
1198 # include "../engines/common/evas_pipe.h"
1201 void evas_font_dir_cache_free(void);
1205 /*****************************************************************************/