5 # include "config.h" /* so that EAPI in Evas.h is correctly defined */
15 /* macros needed to log message through eina_log */
16 extern EAPI int _evas_log_dom_global;
17 #ifdef _EVAS_DEFAULT_LOG_DOM
18 # undef _EVAS_DEFAULT_LOG_DOM
20 #define _EVAS_DEFAULT_LOG_DOM _evas_log_dom_global
22 #ifdef EVAS_DEFAULT_LOG_COLOR
23 # undef EVAS_DEFAULT_LOG_COLOR
25 #define EVAS_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
30 #define ERR(...) EINA_LOG_DOM_ERR(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
35 #define DBG(...) EINA_LOG_DOM_DBG(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
40 #define INF(...) EINA_LOG_DOM_INFO(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
45 #define WRN(...) EINA_LOG_DOM_WARN(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
50 #define CRIT(...) EINA_LOG_DOM_CRIT(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
52 /************************ Unicode stuff **************************/
53 #include "../engines/common/evas_encoding.h"
54 /*****************************************************************/
56 #include "evas_options.h"
58 #if defined(__ARM_ARCH_3M__)
59 # define __ARM_ARCH__ 40
61 #if defined(__ARM_ARCH_4__)
62 # define __ARM_ARCH__ 40
64 #if defined(__ARM_ARCH_4T__)
65 # define __ARM_ARCH__ 41
68 #if defined(__ARM_ARCH_5__)
69 # define __ARM_ARCH__ 50
71 #if defined(__ARM_ARCH_5T__)
72 # define __ARM_ARCH__ 51
74 #if defined(__ARM_ARCH_5E__)
75 # define __ARM_ARCH__ 52
77 #if defined(__ARM_ARCH_5TE__)
78 # define __ARM_ARCH__ 53
80 #if defined(__ARM_ARCH_5TEJ__)
81 # define __ARM_ARCH__ 54
84 #if defined(__ARM_ARCH_6__)
85 # define __ARM_ARCH__ 60
87 #if defined(__ARM_ARCH_6J__)
88 # define __ARM_ARCH__ 61
90 #if defined(__ARM_ARCH_6K__)
91 # define __ARM_ARCH__ 62
93 #if defined(__ARM_ARCH_6Z__)
94 # define __ARM_ARCH__ 63
96 #if defined(__ARM_ARCH_6ZK__)
97 # define __ARM_ARCH__ 64
99 #if defined(__ARM_ARCH_6T2__)
100 # define __ARM_ARCH__ 65
103 #if defined(__ARM_ARCH_7__)
104 # define __ARM_ARCH__ 70
106 #if defined(__ARM_ARCH_7A__)
107 # define __ARM_ARCH__ 71
109 #if defined(__ARM_ARCH_7R__)
110 # define __ARM_ARCH__ 72
112 #if defined(__ARM_ARCH_7M__)
113 # define __ARM_ARCH__ 73
116 #ifndef BUILD_PTHREAD
117 # undef BUILD_PIPE_RENDER
120 #if defined(BUILD_ASYNC_PRELOAD) && !defined(BUILD_PTHREAD)
121 # define BUILD_PTHREAD
130 # include <pthread.h>
133 # include <sys/time.h>
134 # include <sys/resource.h>
141 EAPI Eina_Bool lockdebug;
145 #define LK(x) pthread_mutex_t x
146 #ifndef EVAS_FRAME_QUEUING
147 # define LKI(x) pthread_mutex_init(&(x), NULL)
149 # define LKI(x) do {pthread_mutexattr_t __attr;\
150 pthread_mutexattr_init(&__attr); \
151 pthread_mutexattr_settype(&__attr, PTHREAD_MUTEX_RECURSIVE); \
152 pthread_mutex_init(&(x), &__attr);} while (0)
154 # define LKD(x) pthread_mutex_destroy(&(x))
159 struct timeval t0, t1; \
161 gettimeofday(&t0, NULL); \
162 pthread_mutex_lock(&(x)); \
163 gettimeofday(&t1, NULL); \
164 dt = (t1.tv_sec - t0.tv_sec) * 1000000; \
165 if (t1.tv_usec > t0.tv_usec) dt += (t1.tv_usec - t0.tv_usec); \
166 else dt -= t0.tv_usec - t1.tv_usec; \
168 if (dt > lockmax) { \
169 fprintf(stderr, "HANG %ims - %s:%i - %s()\n", \
170 dt, __FILE__, __LINE__, __FUNCTION__); \
174 pthread_mutex_lock(&(x)); \
178 # define LKL(x) pthread_mutex_lock(&(x))
180 # define LKT(x) pthread_mutex_trylock(&(x))
181 # define LKU(x) pthread_mutex_unlock(&(x))
182 # define TH(x) pthread_t x
183 # define THI(x) int x
187 #define RWLK(x) pthread_rwlock_t x
188 #define RWLKI(x) pthread_rwlock_init(&(x), NULL);
189 #define RWLKD(x) pthread_rwlock_destroy(&(x));
190 #define RDLKL(x) pthread_rwlock_rdlock(&(x));
191 #define WRLKL(x) pthread_rwlock_wrlock(&(x));
192 #define RWLKU(x) pthread_rwlock_unlock(&(x));
195 // even though in theory having every Nth rendered line done by a different
196 // thread might even out load across threads - it actually slows things down.
222 #elif defined __GNUC__
223 # define alloca __builtin_alloca
225 # define alloca __alloca
226 #elif defined _MSC_VER
228 # define alloca _alloca
234 void *alloca (size_t);
240 #include <sys/types.h>
241 #include <sys/stat.h>
249 #include <ft2build.h>
250 #include FT_FREETYPE_H
257 // BROKEN in gcc 4 on amd64
258 //# pragma GCC visibility push(hidden)
260 #define LIKELY(x) __builtin_expect(!!(x), 1)
261 #define UNLIKELY(x) __builtin_expect(!!(x), 0)
263 #define LIKELY(x) (x)
264 #define UNLIKELY(x) (x)
267 /*****************************************************************************/
269 /* use exact rects for updates not tiles */
270 /* #define RECTUPDATE */
272 #define IMG_MAX_SIZE 65000
274 #define IMG_TOO_BIG(w, h) \
275 ((((unsigned long long)w) * ((unsigned long long)h)) >= \
276 ((1ULL << (29 * (sizeof(void *) / 4))) - 2048))
278 #ifdef BUILD_SMALL_DITHER_MASK
279 # define DM_TABLE _evas_dither_44
283 # define USE_DITHER_44 1
285 # define DM_TABLE _evas_dither_128128
289 # define USE_DITHER_128128 1
292 #define DM_MSK (DM_SIZE - 1)
293 #define DM_SHF(_b) (DM_BITS - (8 - _b))
294 /* Supports negative right shifts */
295 #define DM_SHR(x, _b) ((DM_SHF(_b) >= 0) ? \
296 ((x) >> DM_SHF(_b)) : ((x) << -DM_SHF(_b)))
298 /* if more than 1/ALPHA_SPARSE_INV_FRACTION is "alpha" (1-254) then sparse
299 * alpha flag gets set */
300 #define ALPHA_SPARSE_INV_FRACTION 3
302 /*****************************************************************************/
304 #if defined(__ARM_ARCH_3M__)
305 # define __ARM_ARCH__ 40
307 #if defined(__ARM_ARCH_4__)
308 # define __ARM_ARCH__ 40
310 #if defined(__ARM_ARCH_4T__)
311 # define __ARM_ARCH__ 41
314 #if defined(__ARM_ARCH_5__)
315 # define __ARM_ARCH__ 50
317 #if defined(__ARM_ARCH_5T__)
318 # define __ARM_ARCH__ 51
320 #if defined(__ARM_ARCH_5E__)
321 # define __ARM_ARCH__ 52
323 #if defined(__ARM_ARCH_5TE__)
324 # define __ARM_ARCH__ 53
326 #if defined(__ARM_ARCH_5TEJ__)
327 # define __ARM_ARCH__ 54
330 #if defined(__ARM_ARCH_6__)
331 # define __ARM_ARCH__ 60
333 #if defined(__ARM_ARCH_6J__)
334 # define __ARM_ARCH__ 61
336 #if defined(__ARM_ARCH_6K__)
337 # define __ARM_ARCH__ 62
339 #if defined(__ARM_ARCH_6Z__)
340 # define __ARM_ARCH__ 63
342 #if defined(__ARM_ARCH_6ZK__)
343 # define __ARM_ARCH__ 64
345 #if defined(__ARM_ARCH_6T2__)
346 # define __ARM_ARCH__ 65
349 #if defined(__ARM_ARCH_7__)
350 # define __ARM_ARCH__ 70
352 #if defined(__ARM_ARCH_7A__)
353 # define __ARM_ARCH__ 71
355 #if defined(__ARM_ARCH_7R__)
356 # define __ARM_ARCH__ 72
358 #if defined(__ARM_ARCH_7M__)
359 # define __ARM_ARCH__ 73
362 #if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52)
363 /* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */
364 #define pld(addr, off) \
365 __asm__("pld [%[address], %[offset]]":: \
366 [address] "r" (addr), [offset] "i" (off))
368 #define pld(addr, off)
369 #endif /* __ARMEL__ */
371 /*****************************************************************************/
373 #define UNROLL2(op...) op op
374 #define UNROLL4(op...) UNROLL2(op) UNROLL2(op)
375 #define UNROLL8(op...) UNROLL4(op) UNROLL4(op)
376 #define UNROLL16(op...) UNROLL8(op) UNROLL8(op)
378 #define UNROLL8_PLD_WHILE(start, size, end, op) \
380 end = start + (size & ~7); \
381 while (start < end) \
388 while (start < end) \
393 /*****************************************************************************/
395 typedef unsigned long long DATA64;
396 typedef unsigned int DATA32;
397 typedef unsigned short DATA16;
398 typedef unsigned char DATA8;
400 typedef struct _Image_Entry Image_Entry;
401 typedef struct _Image_Entry_Flags Image_Entry_Flags;
402 typedef struct _Engine_Image_Entry Engine_Image_Entry;
403 typedef struct _Evas_Cache_Target Evas_Cache_Target;
404 typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread;
406 typedef struct _RGBA_Image_Loadopts RGBA_Image_Loadopts;
407 #ifdef BUILD_PIPE_RENDER
408 typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op;
409 typedef struct _RGBA_Pipe RGBA_Pipe;
410 typedef struct _RGBA_Pipe_Thread_Info RGBA_Pipe_Thread_Info;
412 typedef struct _RGBA_Image RGBA_Image;
413 typedef struct _RGBA_Image_Span RGBA_Image_Span;
414 typedef struct _RGBA_Draw_Context RGBA_Draw_Context;
415 typedef struct _RGBA_Polygon_Point RGBA_Polygon_Point;
416 typedef struct _RGBA_Map_Point RGBA_Map_Point;
417 typedef struct _RGBA_Font RGBA_Font;
418 typedef struct _RGBA_Font_Int RGBA_Font_Int;
419 typedef struct _RGBA_Font_Source RGBA_Font_Source;
420 typedef struct _RGBA_Font_Glyph RGBA_Font_Glyph;
421 typedef struct _RGBA_Gfx_Compositor RGBA_Gfx_Compositor;
423 typedef struct _Cutout_Rect Cutout_Rect;
424 typedef struct _Cutout_Rects Cutout_Rects;
426 typedef struct _Convert_Pal Convert_Pal;
428 typedef struct _Tilebuf Tilebuf;
429 typedef struct _Tilebuf_Tile Tilebuf_Tile;
430 typedef struct _Tilebuf_Rect Tilebuf_Rect;
432 typedef struct _Evas_Common_Transform Evas_Common_Transform;
435 // all coords are 20.12
436 // fp type - an int for now
438 // fp # of bits of float accuracy
440 // fp half (half of an fp unit)
441 #define FPH (1 << (FP - 1))
443 #define FP1 (1 << (FP))
446 typedef struct _Regionbuf Regionbuf;
447 typedef struct _Regionspan Regionspan;
450 typedef void (*RGBA_Gfx_Func) (DATA32 *src, DATA8 *mask, DATA32 col, DATA32 *dst, int len);
451 typedef void (*RGBA_Gfx_Pt_Func) (DATA32 src, DATA8 mask, DATA32 col, DATA32 *dst);
452 typedef void (*Gfx_Func_Copy) (DATA32 *src, DATA32 *dst, int len);
454 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);
456 #include "../cache/evas_cache.h"
458 /*****************************************************************************/
460 typedef enum _RGBA_Image_Flags
462 RGBA_IMAGE_NOTHING = (0),
463 /* RGBA_IMAGE_HAS_ALPHA = (1 << 0), */
464 RGBA_IMAGE_IS_DIRTY = (1 << 1),
465 RGBA_IMAGE_INDEXED = (1 << 2),
466 RGBA_IMAGE_ALPHA_ONLY = (1 << 3),
467 RGBA_IMAGE_ALPHA_TILES = (1 << 4),
468 /* RGBA_IMAGE_ALPHA_SPARSE = (1 << 5), */
469 /* RGBA_IMAGE_LOADED = (1 << 6), */
470 /* RGBA_IMAGE_NEED_DATA = (1 << 7) */
471 RGBA_IMAGE_TODO_LOAD = (1 << 8),
474 typedef enum _Convert_Pal_Mode
492 typedef enum _CPU_Features
495 CPU_FEATURE_MMX = (1 << 0),
496 CPU_FEATURE_MMX2 = (1 << 1),
497 CPU_FEATURE_SSE = (1 << 2),
498 CPU_FEATURE_ALTIVEC = (1 << 3),
499 CPU_FEATURE_VIS = (1 << 4),
500 CPU_FEATURE_VIS2 = (1 << 5),
501 CPU_FEATURE_NEON = (1 << 6)
504 typedef enum _Font_Hint_Flags
511 /*****************************************************************************/
513 struct _RGBA_Image_Loadopts
515 int scale_down_by; // if > 1 then use this
516 double dpi; // if > 0.0 use this
517 unsigned int w, h; // if > 0 use this
519 unsigned int x, y, w, h;
523 struct _Image_Entry_Flags
525 Eina_Bool loaded : 1;
526 Eina_Bool in_progress : 1;
529 Eina_Bool need_data : 1;
530 Eina_Bool lru_nodata : 1;
531 Eina_Bool cached : 1;
533 Eina_Bool alpha_sparse : 1;
534 #ifdef BUILD_ASYNC_PRELOAD
535 Eina_Bool preload_done : 1;
536 Eina_Bool delete_me : 1;
537 Eina_Bool pending : 1;
541 struct _Evas_Cache_Target
552 Evas_Cache_Image *cache;
554 const char *cache_key;
559 Evas_Cache_Target *targets;
560 Evas_Preload_Pthread *preload;
566 #ifdef EVAS_FRAME_QUEUING
567 LK(lock_references); // needed for accessing references
570 #ifdef BUILD_PIPE_RENDER
572 #ifdef EVAS_FRAME_QUEUING
575 pthread_cond_t cond_fq_del;
576 int ref_fq[2]; // ref_fq[0] is for addition, ref_fq[1] is for deletion
582 RGBA_Image_Loadopts load_opts;
599 #ifdef BUILD_ASYNC_PRELOAD
602 Eina_Bool unload_cancel : 1;
605 Image_Entry_Flags flags;
606 Evas_Image_Scale_Hint scale_hint;
613 struct _Engine_Image_Entry
617 /* Upper Engine data. */
621 Evas_Cache_Engine_Image *cache;
622 const char *cache_key;
626 Eina_Bool cached : 1;
629 Eina_Bool loaded : 1;
630 Eina_Bool need_parent : 1;
650 struct _Evas_Common_Transform
657 struct _RGBA_Draw_Context
666 struct RGBA_Draw_Context_clip {
674 void *(*gl_new) (void *data, RGBA_Font_Glyph *fg);
675 void (*gl_free) (void *ext_dat);
676 void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
687 Eina_Bool anti_alias : 1;
690 #ifdef BUILD_PIPE_RENDER
691 #include "../engines/common/evas_map_image.h"
692 #include "../engines/common/evas_text_utils.h"
696 RGBA_Draw_Context context;
697 void (*op_func) (RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info);
698 void (*free_func) (RGBA_Pipe_Op *op);
708 RGBA_Polygon_Point *points;
714 Evas_Text_Props intl_props;
718 int sx, sy, sw, sh, dx, dy, dw, dh;
737 RGBA_Pipe_Op op[PIPE_LEN];
740 struct _RGBA_Pipe_Thread_Info
749 Image_Entry cache_entry;
751 RGBA_Image_Flags flags;
756 /* char *real_file; */
764 /* unsigned char scale; */
766 /* Colorspace stuff. */
769 Eina_Bool no_free : 1;
776 Eina_Bool no_free : 1;
782 unsigned long long orig_usage;
783 unsigned long long usage_count;
785 unsigned long long newest_usage;
786 unsigned long long newest_usage_count;
790 struct _RGBA_Polygon_Point
796 struct _RGBA_Map_Point
798 FPc x, y; // x, y screenspace
799 float fx, fy, fz; // x, y, z in floats
800 // FPc x3, y3; // x, y 3d space
801 FPc z; // z in world space. optional
802 FPc u, v; // u, v in tex coords
803 DATA32 col; // color at this point
804 // for perspective correctness - only point 0 has relevant info
810 typedef struct _Fash_Item_Index_Map Fash_Item_Index_Map;
811 typedef struct _Fash_Int_Map Fash_Int_Map;
812 typedef struct _Fash_Int_Map2 Fash_Int_Map2;
813 typedef struct _Fash_Int Fash_Int;
814 struct _Fash_Item_Index_Map
821 Fash_Item_Index_Map item[256];
823 struct _Fash_Int_Map2
825 Fash_Int_Map *bucket[256];
829 Fash_Int_Map2 *bucket[256];
830 void (*freeme) (Fash_Int *fash);
834 typedef struct _Fash_Glyph_Map Fash_Glyph_Map;
835 typedef struct _Fash_Glyph_Map2 Fash_Glyph_Map2;
836 typedef struct _Fash_Glyph Fash_Glyph;
837 struct _Fash_Glyph_Map
839 RGBA_Font_Glyph *item[256];
841 struct _Fash_Glyph_Map2
843 Fash_Glyph_Map *bucket[256];
847 Fash_Glyph_Map2 *bucket[256];
848 void (*freeme) (Fash_Glyph *fash);
856 Font_Hint_Flags hinting;
858 #ifdef EVAS_FRAME_QUEUING
859 int ref_fq[2]; //ref_fq[0] is for addition, ref_fq[1] is for deletion
860 pthread_cond_t cond_fq_del;
865 unsigned char sizeok : 1;
868 struct _RGBA_Font_Int
871 RGBA_Font_Source *src;
883 Font_Hint_Flags hinting;
884 unsigned char sizeok : 1;
885 unsigned char inuse : 1;
888 #include "../engines/common/evas_font_ot.h"
890 struct _RGBA_Font_Source
895 unsigned int current_size;
909 struct _RGBA_Font_Glyph
913 FT_BitmapGlyph glyph_out;
914 /* this is a problem - only 1 engine at a time can extend such a font... grrr */
916 void (*ext_dat_free) (void *ext_dat);
920 struct _RGBA_Gfx_Compositor
925 void (*shutdown)(void);
927 RGBA_Gfx_Func (*composite_pixel_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
928 RGBA_Gfx_Func (*composite_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
929 RGBA_Gfx_Func (*composite_pixel_color_span_get)(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
930 RGBA_Gfx_Func (*composite_mask_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
931 RGBA_Gfx_Func (*composite_pixel_mask_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
933 RGBA_Gfx_Pt_Func (*composite_pixel_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
934 RGBA_Gfx_Pt_Func (*composite_color_pt_get)(DATA32 col, RGBA_Image *dst);
935 RGBA_Gfx_Pt_Func (*composite_pixel_color_pt_get)(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
936 RGBA_Gfx_Pt_Func (*composite_mask_color_pt_get)(DATA32 col, RGBA_Image *dst);
937 RGBA_Gfx_Pt_Func (*composite_pixel_mask_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
940 #define EVAS_RECT_SPLIT 1
941 #ifdef EVAS_RECT_SPLIT
942 typedef struct list_node list_node_t;
943 typedef struct list list_t;
944 typedef struct rect rect_t;
945 typedef struct rect_node rect_node_t;
949 struct list_node *next;
954 struct list_node *head;
955 struct list_node *tail;
971 struct list_node _lst;
975 void rect_list_node_pool_set_max(int max);
976 void rect_list_node_pool_flush(void);
977 list_node_t *rect_list_node_pool_get(void);
978 void rect_list_node_pool_put(list_node_t *node);
980 void rect_init(rect_t *r, int x, int y, int w, int h);
981 void rect_list_append_node(list_t *rects, list_node_t *node);
982 void rect_list_append(list_t *rects, const rect_t r);
983 void rect_list_append_xywh(list_t *rects, int x, int y, int w, int h);
984 void rect_list_concat(list_t *rects, list_t *other);
985 list_node_t *rect_list_unlink_next(list_t *rects, list_node_t *parent_node);
986 void rect_list_del_next(list_t *rects, list_node_t *parent_node);
987 void rect_list_clear(list_t *rects);
988 void rect_list_del_split_strict(list_t *rects, const rect_t del_r);
989 void rect_list_add_split_strict(list_t *rects, list_node_t *node);
990 list_node_t *rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error);
991 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);
993 void rect_print(const rect_t r);
994 void rect_list_print(const list_t rects);
995 #endif /* EVAS_RECT_SPLIT */
1008 #elif defined(EVAS_RECT_SPLIT)
1014 Tilebuf_Tile *tiles;
1019 struct _Tilebuf_Tile
1021 Eina_Bool redraw : 1;
1022 /* FIXME: need these flags later - but not now */
1034 struct _Tilebuf_Rect
1057 Convert_Pal_Mode colors;
1064 /*****************************************************************************/
1065 #include "evas_macros.h"
1067 #ifndef WORDS_BIGENDIAN
1069 #define A_VAL(p) ((DATA8 *)(p))[3]
1070 #define R_VAL(p) ((DATA8 *)(p))[2]
1071 #define G_VAL(p) ((DATA8 *)(p))[1]
1072 #define B_VAL(p) ((DATA8 *)(p))[0]
1073 #define AR_VAL(p) ((DATA16 *)(p)[1])
1074 #define GB_VAL(p) ((DATA16 *)(p)[0])
1077 #define A_VAL(p) ((DATA8 *)(p))[0]
1078 #define R_VAL(p) ((DATA8 *)(p))[1]
1079 #define G_VAL(p) ((DATA8 *)(p))[2]
1080 #define B_VAL(p) ((DATA8 *)(p))[3]
1081 #define AR_VAL(p) ((DATA16 *)(p)[0])
1082 #define GB_VAL(p) ((DATA16 *)(p)[1])
1085 #define RGB_JOIN(r,g,b) \
1086 (((r) << 16) + ((g) << 8) + (b))
1088 #define ARGB_JOIN(a,r,g,b) \
1089 (((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
1091 #include "evas_blend_ops.h"
1093 #define _EVAS_RENDER_FILL -1
1094 #define _EVAS_RENDER_BLEND 0
1095 #define _EVAS_RENDER_BLEND_REL 1
1096 #define _EVAS_RENDER_COPY 2
1097 #define _EVAS_RENDER_COPY_REL 3
1098 #define _EVAS_RENDER_ADD 4
1099 #define _EVAS_RENDER_ADD_REL 5
1100 #define _EVAS_RENDER_SUB 6
1101 #define _EVAS_RENDER_SUB_REL 7
1102 #define _EVAS_RENDER_TINT 8
1103 #define _EVAS_RENDER_TINT_REL 9
1104 #define _EVAS_RENDER_MASK 10
1105 #define _EVAS_RENDER_MUL 11
1106 #define _EVAS_RENDER_CLIP 12
1108 #define _EVAS_TEXTURE_REFLECT 0
1109 #define _EVAS_TEXTURE_REPEAT 1
1110 #define _EVAS_TEXTURE_RESTRICT 2
1111 #define _EVAS_TEXTURE_RESTRICT_REFLECT 3
1112 #define _EVAS_TEXTURE_RESTRICT_REPEAT 4
1113 #define _EVAS_TEXTURE_PAD 5
1115 #define _EVAS_COLOR_SPACE_ARGB 0
1116 #define _EVAS_COLOR_SPACE_AHSV 1
1118 /*****************************************************************************/
1125 void evas_common_init (void);
1126 void evas_common_shutdown (void);
1128 EAPI void evas_common_cpu_init (void);
1130 int evas_common_cpu_have_cpuid (void);
1131 int evas_common_cpu_has_feature (unsigned int feature);
1132 EAPI void evas_common_cpu_can_do (int *mmx, int *sse, int *sse2);
1133 EAPI void evas_common_cpu_end_opt (void);
1136 #include "../engines/common/evas_blend.h"
1138 EAPI Gfx_Func_Copy evas_common_draw_func_copy_get (int pixels, int reverse);
1141 #include "../engines/common/evas_convert_color.h"
1142 #include "../engines/common/evas_convert_colorspace.h"
1143 #include "../engines/common/evas_convert_main.h"
1144 #include "../engines/common/evas_convert_yuv.h"
1145 #include "../engines/common/evas_scale_main.h"
1146 #include "../engines/common/evas_scale_smooth.h"
1147 #include "../engines/common/evas_scale_span.h"
1150 #include "../engines/common/evas_image.h"
1153 #include "../engines/common/evas_line.h"
1154 #include "../engines/common/evas_polygon.h"
1155 #include "../engines/common/evas_rectangle.h"
1158 EAPI void evas_common_blit_init (void);
1160 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);
1163 #include "../engines/common/evas_font.h"
1166 EAPI void evas_common_tilebuf_init (void);
1168 EAPI Tilebuf *evas_common_tilebuf_new (int w, int h);
1169 EAPI void evas_common_tilebuf_free (Tilebuf *tb);
1170 EAPI void evas_common_tilebuf_set_tile_size (Tilebuf *tb, int tw, int th);
1171 EAPI void evas_common_tilebuf_get_tile_size (Tilebuf *tb, int *tw, int *th);
1172 EAPI int evas_common_tilebuf_add_redraw (Tilebuf *tb, int x, int y, int w, int h);
1173 EAPI int evas_common_tilebuf_del_redraw (Tilebuf *tb, int x, int y, int w, int h);
1174 EAPI int evas_common_tilebuf_add_motion_vector (Tilebuf *tb, int x, int y, int w, int h, int dx, int dy, int alpha);
1175 EAPI void evas_common_tilebuf_clear (Tilebuf *tb);
1176 EAPI Tilebuf_Rect *evas_common_tilebuf_get_render_rects (Tilebuf *tb);
1177 EAPI void evas_common_tilebuf_free_render_rects (Tilebuf_Rect *rects);
1180 Regionbuf *evas_common_regionbuf_new (int w, int h);
1181 void evas_common_regionbuf_free (Regionbuf *rb);
1182 void evas_common_regionbuf_clear (Regionbuf *rb);
1183 void evas_common_regionbuf_span_add (Regionbuf *rb, int x1, int x2, int y);
1184 void evas_common_regionbuf_span_del (Regionbuf *rb, int x1, int x2, int y);
1185 Tilebuf_Rect *evas_common_regionbuf_rects_get (Regionbuf *rb);
1189 #include "../engines/common/evas_draw.h"
1191 #include "../engines/common/evas_map_image.h"
1194 #ifdef BUILD_PIPE_RENDER
1195 # include "../engines/common/evas_pipe.h"
1198 void evas_font_dir_cache_free(void);
1202 /*****************************************************************************/