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>
253 #include <ft2build.h>
254 #include FT_FREETYPE_H
261 // BROKEN in gcc 4 on amd64
262 //# pragma GCC visibility push(hidden)
264 #define LIKELY(x) __builtin_expect(!!(x), 1)
265 #define UNLIKELY(x) __builtin_expect(!!(x), 0)
267 #define LIKELY(x) (x)
268 #define UNLIKELY(x) (x)
271 /*****************************************************************************/
273 /* use exact rects for updates not tiles */
274 /* #define RECTUPDATE */
276 #define IMG_MAX_SIZE 65000
278 #define IMG_TOO_BIG(w, h) \
279 ((((unsigned long long)w) * ((unsigned long long)h)) >= \
280 ((1ULL << (29 * (sizeof(void *) / 4))) - 2048))
282 #ifdef BUILD_SMALL_DITHER_MASK
283 # define DM_TABLE _evas_dither_44
287 # define USE_DITHER_44 1
289 # define DM_TABLE _evas_dither_128128
293 # define USE_DITHER_128128 1
296 #define DM_MSK (DM_SIZE - 1)
297 #define DM_SHF(_b) (DM_BITS - (8 - _b))
298 /* Supports negative right shifts */
299 #define DM_SHR(x, _b) ((DM_SHF(_b) >= 0) ? \
300 ((x) >> DM_SHF(_b)) : ((x) << -DM_SHF(_b)))
302 /* if more than 1/ALPHA_SPARSE_INV_FRACTION is "alpha" (1-254) then sparse
303 * alpha flag gets set */
304 #define ALPHA_SPARSE_INV_FRACTION 3
306 /*****************************************************************************/
308 #if defined(__ARM_ARCH_3M__)
309 # define __ARM_ARCH__ 40
311 #if defined(__ARM_ARCH_4__)
312 # define __ARM_ARCH__ 40
314 #if defined(__ARM_ARCH_4T__)
315 # define __ARM_ARCH__ 41
318 #if defined(__ARM_ARCH_5__)
319 # define __ARM_ARCH__ 50
321 #if defined(__ARM_ARCH_5T__)
322 # define __ARM_ARCH__ 51
324 #if defined(__ARM_ARCH_5E__)
325 # define __ARM_ARCH__ 52
327 #if defined(__ARM_ARCH_5TE__)
328 # define __ARM_ARCH__ 53
330 #if defined(__ARM_ARCH_5TEJ__)
331 # define __ARM_ARCH__ 54
334 #if defined(__ARM_ARCH_6__)
335 # define __ARM_ARCH__ 60
337 #if defined(__ARM_ARCH_6J__)
338 # define __ARM_ARCH__ 61
340 #if defined(__ARM_ARCH_6K__)
341 # define __ARM_ARCH__ 62
343 #if defined(__ARM_ARCH_6Z__)
344 # define __ARM_ARCH__ 63
346 #if defined(__ARM_ARCH_6ZK__)
347 # define __ARM_ARCH__ 64
349 #if defined(__ARM_ARCH_6T2__)
350 # define __ARM_ARCH__ 65
353 #if defined(__ARM_ARCH_7__)
354 # define __ARM_ARCH__ 70
356 #if defined(__ARM_ARCH_7A__)
357 # define __ARM_ARCH__ 71
359 #if defined(__ARM_ARCH_7R__)
360 # define __ARM_ARCH__ 72
362 #if defined(__ARM_ARCH_7M__)
363 # define __ARM_ARCH__ 73
366 #if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52)
367 /* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */
368 #define pld(addr, off) \
369 __asm__("pld [%[address], %[offset]]":: \
370 [address] "r" (addr), [offset] "i" (off))
372 #define pld(addr, off)
373 #endif /* __ARMEL__ */
375 /*****************************************************************************/
377 #define UNROLL2(op...) op op
378 #define UNROLL4(op...) UNROLL2(op) UNROLL2(op)
379 #define UNROLL8(op...) UNROLL4(op) UNROLL4(op)
380 #define UNROLL16(op...) UNROLL8(op) UNROLL8(op)
382 #define UNROLL8_PLD_WHILE(start, size, end, op) \
384 end = start + (size & ~7); \
385 while (start < end) \
392 while (start < end) \
397 /*****************************************************************************/
399 typedef unsigned long long DATA64;
400 typedef unsigned int DATA32;
401 typedef unsigned short DATA16;
402 typedef unsigned char DATA8;
404 typedef struct _Image_Entry Image_Entry;
405 typedef struct _Image_Entry_Flags Image_Entry_Flags;
406 typedef struct _Engine_Image_Entry Engine_Image_Entry;
407 typedef struct _Evas_Cache_Target Evas_Cache_Target;
408 typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread;
410 typedef struct _RGBA_Image_Loadopts RGBA_Image_Loadopts;
411 #ifdef BUILD_PIPE_RENDER
412 typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op;
413 typedef struct _RGBA_Pipe RGBA_Pipe;
414 typedef struct _RGBA_Pipe_Thread_Info RGBA_Pipe_Thread_Info;
416 typedef struct _RGBA_Image RGBA_Image;
417 typedef struct _RGBA_Image_Span RGBA_Image_Span;
418 typedef struct _RGBA_Draw_Context RGBA_Draw_Context;
419 typedef struct _RGBA_Polygon_Point RGBA_Polygon_Point;
420 typedef struct _RGBA_Map_Point RGBA_Map_Point;
421 typedef struct _RGBA_Font RGBA_Font;
422 typedef struct _RGBA_Font_Int RGBA_Font_Int;
423 typedef struct _RGBA_Font_Source RGBA_Font_Source;
424 typedef struct _RGBA_Font_Glyph RGBA_Font_Glyph;
425 typedef struct _RGBA_Gfx_Compositor RGBA_Gfx_Compositor;
427 typedef struct _Cutout_Rect Cutout_Rect;
428 typedef struct _Cutout_Rects Cutout_Rects;
430 typedef struct _Convert_Pal Convert_Pal;
432 typedef struct _Tilebuf Tilebuf;
433 typedef struct _Tilebuf_Tile Tilebuf_Tile;
434 typedef struct _Tilebuf_Rect Tilebuf_Rect;
436 typedef struct _Evas_Common_Transform Evas_Common_Transform;
439 // all coords are 20.12
440 // fp type - an int for now
442 // fp # of bits of float accuracy
444 // fp half (half of an fp unit)
445 #define FPH (1 << (FP - 1))
447 #define FP1 (1 << (FP))
450 typedef struct _Regionbuf Regionbuf;
451 typedef struct _Regionspan Regionspan;
454 typedef void (*RGBA_Gfx_Func) (DATA32 *src, DATA8 *mask, DATA32 col, DATA32 *dst, int len);
455 typedef void (*RGBA_Gfx_Pt_Func) (DATA32 src, DATA8 mask, DATA32 col, DATA32 *dst);
456 typedef void (*Gfx_Func_Copy) (DATA32 *src, DATA32 *dst, int len);
458 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);
460 #include "../cache/evas_cache.h"
462 /*****************************************************************************/
464 typedef enum _RGBA_Image_Flags
466 RGBA_IMAGE_NOTHING = (0),
467 /* RGBA_IMAGE_HAS_ALPHA = (1 << 0), */
468 RGBA_IMAGE_IS_DIRTY = (1 << 1),
469 RGBA_IMAGE_INDEXED = (1 << 2),
470 RGBA_IMAGE_ALPHA_ONLY = (1 << 3),
471 RGBA_IMAGE_ALPHA_TILES = (1 << 4),
472 /* RGBA_IMAGE_ALPHA_SPARSE = (1 << 5), */
473 /* RGBA_IMAGE_LOADED = (1 << 6), */
474 /* RGBA_IMAGE_NEED_DATA = (1 << 7) */
475 RGBA_IMAGE_TODO_LOAD = (1 << 8),
478 typedef enum _Convert_Pal_Mode
496 typedef enum _CPU_Features
499 CPU_FEATURE_MMX = (1 << 0),
500 CPU_FEATURE_MMX2 = (1 << 1),
501 CPU_FEATURE_SSE = (1 << 2),
502 CPU_FEATURE_ALTIVEC = (1 << 3),
503 CPU_FEATURE_VIS = (1 << 4),
504 CPU_FEATURE_VIS2 = (1 << 5),
505 CPU_FEATURE_NEON = (1 << 6)
508 typedef enum _Font_Hint_Flags
515 /*****************************************************************************/
517 struct _RGBA_Image_Loadopts
519 int scale_down_by; // if > 1 then use this
520 double dpi; // if > 0.0 use this
521 unsigned int w, h; // if > 0 use this
523 unsigned int x, y, w, h;
527 struct _Image_Entry_Flags
529 Eina_Bool loaded : 1;
530 Eina_Bool in_progress : 1;
533 Eina_Bool need_data : 1;
534 Eina_Bool lru_nodata : 1;
535 Eina_Bool cached : 1;
537 Eina_Bool alpha_sparse : 1;
538 #ifdef BUILD_ASYNC_PRELOAD
539 Eina_Bool preload_done : 1;
540 Eina_Bool delete_me : 1;
541 Eina_Bool pending : 1;
545 struct _Evas_Cache_Target
556 Evas_Cache_Image *cache;
558 const char *cache_key;
563 Evas_Cache_Target *targets;
564 Evas_Preload_Pthread *preload;
570 #ifdef EVAS_FRAME_QUEUING
571 LK(lock_references); // needed for accessing references
574 #ifdef BUILD_PIPE_RENDER
576 #ifdef EVAS_FRAME_QUEUING
579 pthread_cond_t cond_fq_del;
580 int ref_fq[2]; // ref_fq[0] is for addition, ref_fq[1] is for deletion
586 RGBA_Image_Loadopts load_opts;
603 #ifdef BUILD_ASYNC_PRELOAD
606 Eina_Bool unload_cancel : 1;
609 Image_Entry_Flags flags;
610 Evas_Image_Scale_Hint scale_hint;
617 struct _Engine_Image_Entry
621 /* Upper Engine data. */
625 Evas_Cache_Engine_Image *cache;
626 const char *cache_key;
630 Eina_Bool cached : 1;
633 Eina_Bool loaded : 1;
634 Eina_Bool need_parent : 1;
654 struct _Evas_Common_Transform
661 struct _RGBA_Draw_Context
670 struct RGBA_Draw_Context_clip {
677 void *(*gl_new) (void *data, RGBA_Font_Glyph *fg);
678 void (*gl_free) (void *ext_dat);
679 void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
690 Eina_Bool anti_alias : 1;
693 #ifdef BUILD_PIPE_RENDER
694 #include "../engines/common/evas_map_image.h"
695 #include "../engines/common/evas_bidi_utils.h"
699 RGBA_Draw_Context context;
700 void (*op_func) (RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info);
701 void (*free_func) (RGBA_Pipe_Op *op);
711 RGBA_Polygon_Point *points;
717 Evas_BiDi_Props intl_props;
721 int sx, sy, sw, sh, dx, dy, dw, dh;
740 RGBA_Pipe_Op op[PIPE_LEN];
743 struct _RGBA_Pipe_Thread_Info
752 Image_Entry cache_entry;
754 RGBA_Image_Flags flags;
759 /* char *real_file; */
767 /* unsigned char scale; */
769 /* Colorspace stuff. */
772 Eina_Bool no_free : 1;
779 Eina_Bool no_free : 1;
785 unsigned long long orig_usage;
786 unsigned long long usage_count;
788 unsigned long long newest_usage;
789 unsigned long long newest_usage_count;
793 struct _RGBA_Polygon_Point
799 struct _RGBA_Map_Point
801 FPc x, y; // x, y screenspace
802 FPc x3, y3; // x, y 3d space
803 FPc z; // z in world space. optional
804 FPc u, v; // u, v in tex coords
805 DATA32 col; // color at this point
806 // for perspective correctness - only point 0 has relevant info
812 typedef struct _Fash_Item_Index_Map Fash_Item_Index_Map;
813 typedef struct _Fash_Int_Map Fash_Int_Map;
814 typedef struct _Fash_Int_Map2 Fash_Int_Map2;
815 typedef struct _Fash_Int Fash_Int;
816 struct _Fash_Item_Index_Map
823 Fash_Item_Index_Map item[256];
825 struct _Fash_Int_Map2
827 Fash_Int_Map *bucket[256];
831 Fash_Int_Map2 *bucket[256];
832 void (*freeme) (Fash_Int *fash);
836 typedef struct _Fash_Glyph_Map Fash_Glyph_Map;
837 typedef struct _Fash_Glyph_Map2 Fash_Glyph_Map2;
838 typedef struct _Fash_Glyph Fash_Glyph;
839 struct _Fash_Glyph_Map
841 RGBA_Font_Glyph *item[256];
843 struct _Fash_Glyph_Map2
845 Fash_Glyph_Map *bucket[256];
849 Fash_Glyph_Map2 *bucket[256];
850 void (*freeme) (Fash_Glyph *fash);
858 Font_Hint_Flags hinting;
860 #ifdef EVAS_FRAME_QUEUING
861 int ref_fq[2]; //ref_fq[0] is for addition, ref_fq[1] is for deletion
862 pthread_cond_t cond_fq_del;
867 unsigned char sizeok : 1;
870 struct _RGBA_Font_Int
873 RGBA_Font_Source *src;
885 Font_Hint_Flags hinting;
886 unsigned char sizeok : 1;
887 unsigned char inuse : 1;
890 struct _RGBA_Font_Source
895 unsigned int current_size;
904 struct _RGBA_Font_Glyph
908 FT_BitmapGlyph glyph_out;
909 /* this is a problem - only 1 engine at a time can extend such a font... grrr */
911 void (*ext_dat_free) (void *ext_dat);
915 struct _RGBA_Gfx_Compositor
920 void (*shutdown)(void);
922 RGBA_Gfx_Func (*composite_pixel_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
923 RGBA_Gfx_Func (*composite_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
924 RGBA_Gfx_Func (*composite_pixel_color_span_get)(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
925 RGBA_Gfx_Func (*composite_mask_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
926 RGBA_Gfx_Func (*composite_pixel_mask_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
928 RGBA_Gfx_Pt_Func (*composite_pixel_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
929 RGBA_Gfx_Pt_Func (*composite_color_pt_get)(DATA32 col, RGBA_Image *dst);
930 RGBA_Gfx_Pt_Func (*composite_pixel_color_pt_get)(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
931 RGBA_Gfx_Pt_Func (*composite_mask_color_pt_get)(DATA32 col, RGBA_Image *dst);
932 RGBA_Gfx_Pt_Func (*composite_pixel_mask_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
935 #define EVAS_RECT_SPLIT 1
936 #ifdef EVAS_RECT_SPLIT
937 typedef struct list_node list_node_t;
938 typedef struct list list_t;
939 typedef struct rect rect_t;
940 typedef struct rect_node rect_node_t;
944 struct list_node *next;
949 struct list_node *head;
950 struct list_node *tail;
966 struct list_node _lst;
970 void rect_list_node_pool_set_max(int max);
971 void rect_list_node_pool_flush(void);
972 list_node_t *rect_list_node_pool_get(void);
973 void rect_list_node_pool_put(list_node_t *node);
975 void rect_init(rect_t *r, int x, int y, int w, int h);
976 void rect_list_append_node(list_t *rects, list_node_t *node);
977 void rect_list_append(list_t *rects, const rect_t r);
978 void rect_list_append_xywh(list_t *rects, int x, int y, int w, int h);
979 void rect_list_concat(list_t *rects, list_t *other);
980 list_node_t *rect_list_unlink_next(list_t *rects, list_node_t *parent_node);
981 void rect_list_del_next(list_t *rects, list_node_t *parent_node);
982 void rect_list_clear(list_t *rects);
983 void rect_list_del_split_strict(list_t *rects, const rect_t del_r);
984 void rect_list_add_split_strict(list_t *rects, list_node_t *node);
985 list_node_t *rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error);
986 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);
988 void rect_print(const rect_t r);
989 void rect_list_print(const list_t rects);
990 #endif /* EVAS_RECT_SPLIT */
1003 #elif defined(EVAS_RECT_SPLIT)
1009 Tilebuf_Tile *tiles;
1014 struct _Tilebuf_Tile
1016 Eina_Bool redraw : 1;
1017 /* FIXME: need these flags later - but not now */
1029 struct _Tilebuf_Rect
1052 Convert_Pal_Mode colors;
1059 /*****************************************************************************/
1060 #include "evas_macros.h"
1062 #ifndef WORDS_BIGENDIAN
1064 #define A_VAL(p) ((DATA8 *)(p))[3]
1065 #define R_VAL(p) ((DATA8 *)(p))[2]
1066 #define G_VAL(p) ((DATA8 *)(p))[1]
1067 #define B_VAL(p) ((DATA8 *)(p))[0]
1068 #define AR_VAL(p) ((DATA16 *)(p)[1])
1069 #define GB_VAL(p) ((DATA16 *)(p)[0])
1072 #define A_VAL(p) ((DATA8 *)(p))[0]
1073 #define R_VAL(p) ((DATA8 *)(p))[1]
1074 #define G_VAL(p) ((DATA8 *)(p))[2]
1075 #define B_VAL(p) ((DATA8 *)(p))[3]
1076 #define AR_VAL(p) ((DATA16 *)(p)[0])
1077 #define GB_VAL(p) ((DATA16 *)(p)[1])
1080 #define RGB_JOIN(r,g,b) \
1081 (((r) << 16) + ((g) << 8) + (b))
1083 #define ARGB_JOIN(a,r,g,b) \
1084 (((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
1086 #include "evas_blend_ops.h"
1088 #define _EVAS_RENDER_FILL -1
1089 #define _EVAS_RENDER_BLEND 0
1090 #define _EVAS_RENDER_BLEND_REL 1
1091 #define _EVAS_RENDER_COPY 2
1092 #define _EVAS_RENDER_COPY_REL 3
1093 #define _EVAS_RENDER_ADD 4
1094 #define _EVAS_RENDER_ADD_REL 5
1095 #define _EVAS_RENDER_SUB 6
1096 #define _EVAS_RENDER_SUB_REL 7
1097 #define _EVAS_RENDER_TINT 8
1098 #define _EVAS_RENDER_TINT_REL 9
1099 #define _EVAS_RENDER_MASK 10
1100 #define _EVAS_RENDER_MUL 11
1101 #define _EVAS_RENDER_CLIP 12
1103 #define _EVAS_TEXTURE_REFLECT 0
1104 #define _EVAS_TEXTURE_REPEAT 1
1105 #define _EVAS_TEXTURE_RESTRICT 2
1106 #define _EVAS_TEXTURE_RESTRICT_REFLECT 3
1107 #define _EVAS_TEXTURE_RESTRICT_REPEAT 4
1108 #define _EVAS_TEXTURE_PAD 5
1110 #define _EVAS_COLOR_SPACE_ARGB 0
1111 #define _EVAS_COLOR_SPACE_AHSV 1
1113 /*****************************************************************************/
1120 void evas_common_init (void);
1121 void evas_common_shutdown (void);
1123 EAPI void evas_common_cpu_init (void);
1125 int evas_common_cpu_have_cpuid (void);
1126 int evas_common_cpu_has_feature (unsigned int feature);
1127 EAPI void evas_common_cpu_can_do (int *mmx, int *sse, int *sse2);
1128 EAPI void evas_common_cpu_end_opt (void);
1131 #include "../engines/common/evas_blend.h"
1133 EAPI Gfx_Func_Copy evas_common_draw_func_copy_get (int pixels, int reverse);
1136 #include "../engines/common/evas_convert_color.h"
1137 #include "../engines/common/evas_convert_colorspace.h"
1138 #include "../engines/common/evas_convert_main.h"
1139 #include "../engines/common/evas_convert_yuv.h"
1140 #include "../engines/common/evas_scale_main.h"
1141 #include "../engines/common/evas_scale_smooth.h"
1142 #include "../engines/common/evas_scale_span.h"
1145 #include "../engines/common/evas_image.h"
1148 #include "../engines/common/evas_line.h"
1149 #include "../engines/common/evas_polygon.h"
1150 #include "../engines/common/evas_rectangle.h"
1153 EAPI void evas_common_blit_init (void);
1155 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);
1158 #include "../engines/common/evas_font.h"
1161 EAPI void evas_common_tilebuf_init (void);
1163 EAPI Tilebuf *evas_common_tilebuf_new (int w, int h);
1164 EAPI void evas_common_tilebuf_free (Tilebuf *tb);
1165 EAPI void evas_common_tilebuf_set_tile_size (Tilebuf *tb, int tw, int th);
1166 EAPI void evas_common_tilebuf_get_tile_size (Tilebuf *tb, int *tw, int *th);
1167 EAPI int evas_common_tilebuf_add_redraw (Tilebuf *tb, int x, int y, int w, int h);
1168 EAPI int evas_common_tilebuf_del_redraw (Tilebuf *tb, int x, int y, int w, int h);
1169 EAPI int evas_common_tilebuf_add_motion_vector (Tilebuf *tb, int x, int y, int w, int h, int dx, int dy, int alpha);
1170 EAPI void evas_common_tilebuf_clear (Tilebuf *tb);
1171 EAPI Tilebuf_Rect *evas_common_tilebuf_get_render_rects (Tilebuf *tb);
1172 EAPI void evas_common_tilebuf_free_render_rects (Tilebuf_Rect *rects);
1175 Regionbuf *evas_common_regionbuf_new (int w, int h);
1176 void evas_common_regionbuf_free (Regionbuf *rb);
1177 void evas_common_regionbuf_clear (Regionbuf *rb);
1178 void evas_common_regionbuf_span_add (Regionbuf *rb, int x1, int x2, int y);
1179 void evas_common_regionbuf_span_del (Regionbuf *rb, int x1, int x2, int y);
1180 Tilebuf_Rect *evas_common_regionbuf_rects_get (Regionbuf *rb);
1184 #include "../engines/common/evas_draw.h"
1186 #include "../engines/common/evas_map_image.h"
1189 #ifdef BUILD_PIPE_RENDER
1190 # include "../engines/common/evas_pipe.h"
1193 void evas_font_dir_cache_free(void);
1197 /*****************************************************************************/