5 #include "config.h" /* so that EAPI in Evas.h is correctly defined */
20 # define alloca __builtin_alloca
22 # define alloca __alloca
23 # elif defined _MSC_VER
25 # define alloca _alloca
26 # elif !defined HAVE_ALLOCA
30 void *alloca (size_t);
37 #include <sys/types.h>
59 #include <sys/types.h>
69 //#include "Evas_GL.h"
72 /* right now i dont care about rendering bugs on platforms without lround
73 (e.g. windows/vc++... yay!)
74 FIXME: http://cgit.freedesktop.org/cairo/tree/src/cairo-misc.c#n487
76 #define lround(x) (((x) < 0) ? (long int)ceil((x) - 0.5) : (long int)floor((x) + 0.5))
79 /* macros needed to log message through eina_log */
80 extern EAPI int _evas_log_dom_global;
81 #ifdef _EVAS_DEFAULT_LOG_DOM
82 # undef _EVAS_DEFAULT_LOG_DOM
84 #define _EVAS_DEFAULT_LOG_DOM _evas_log_dom_global
86 #ifdef EVAS_DEFAULT_LOG_COLOR
87 # undef EVAS_DEFAULT_LOG_COLOR
89 #define EVAS_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
94 #define ERR(...) EINA_LOG_DOM_ERR(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
99 #define DBG(...) EINA_LOG_DOM_DBG(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
104 #define INF(...) EINA_LOG_DOM_INFO(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
109 #define WRN(...) EINA_LOG_DOM_WARN(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
114 #define CRIT(...) EINA_LOG_DOM_CRIT(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
116 #include "evas_options.h"
118 #if defined(__ARM_ARCH_3M__)
119 # define __ARM_ARCH__ 40
121 #if defined(__ARM_ARCH_4__)
122 # define __ARM_ARCH__ 40
124 #if defined(__ARM_ARCH_4T__)
125 # define __ARM_ARCH__ 41
128 #if defined(__ARM_ARCH_5__)
129 # define __ARM_ARCH__ 50
131 #if defined(__ARM_ARCH_5T__)
132 # define __ARM_ARCH__ 51
134 #if defined(__ARM_ARCH_5E__)
135 # define __ARM_ARCH__ 52
137 #if defined(__ARM_ARCH_5TE__)
138 # define __ARM_ARCH__ 53
140 #if defined(__ARM_ARCH_5TEJ__)
141 # define __ARM_ARCH__ 54
144 #if defined(__ARM_ARCH_6__)
145 # define __ARM_ARCH__ 60
147 #if defined(__ARM_ARCH_6J__)
148 # define __ARM_ARCH__ 61
150 #if defined(__ARM_ARCH_6K__)
151 # define __ARM_ARCH__ 62
153 #if defined(__ARM_ARCH_6Z__)
154 # define __ARM_ARCH__ 63
156 #if defined(__ARM_ARCH_6ZK__)
157 # define __ARM_ARCH__ 64
159 #if defined(__ARM_ARCH_6T2__)
160 # define __ARM_ARCH__ 65
163 #if defined(__ARM_ARCH_7__)
164 # define __ARM_ARCH__ 70
166 #if defined(__ARM_ARCH_7A__)
167 # define __ARM_ARCH__ 71
169 #if defined(__ARM_ARCH_7R__)
170 # define __ARM_ARCH__ 72
172 #if defined(__ARM_ARCH_7M__)
173 # define __ARM_ARCH__ 73
176 #ifndef BUILD_PTHREAD
177 # undef BUILD_PIPE_RENDER
180 #if defined(BUILD_ASYNC_PRELOAD) && !defined(BUILD_PTHREAD)
181 # define BUILD_PTHREAD
184 #define LK(x) Eina_Lock x
185 #define LKI(x) eina_lock_new(&(x))
186 #define LKD(x) eina_lock_free(&(x))
187 #define LKL(x) eina_lock_take(&(x))
188 #define LKT(x) eina_lock_take_try(&(x))
189 #define LKU(x) eina_lock_release(&(x))
190 #define LKDBG(x) eina_lock_debug(&(x))
193 #define RWLK(x) Eina_RWLock x
194 #define RWLKI(x) eina_rwlock_new(&(x))
195 #define RWLKD(x) eina_rwlock_free(&(x))
196 #define RDLKL(x) eina_rwlock_take_read(&(x))
197 #define WRLKL(x) eina_rwlock_take_write(&(x))
198 #define RWLKU(x) eina_rwlock_release(&(x))
202 # define TH(x) pthread_t x
203 # define THI(x) int x
213 #include <ft2build.h>
214 #include FT_FREETYPE_H
221 // BROKEN in gcc 4 on amd64
222 //# pragma GCC visibility push(hidden)
224 #define LIKELY(x) __builtin_expect(!!(x), 1)
225 #define UNLIKELY(x) __builtin_expect(!!(x), 0)
227 #define LIKELY(x) (x)
228 #define UNLIKELY(x) (x)
231 /*****************************************************************************/
233 /* use exact rects for updates not tiles */
234 /* #define RECTUPDATE */
236 #define IMG_MAX_SIZE 65000
238 #define IMG_TOO_BIG(w, h) \
239 ((((unsigned long long)w) * ((unsigned long long)h)) >= \
240 ((1ULL << (29 * (sizeof(void *) / 4))) - 2048))
242 #ifdef BUILD_SMALL_DITHER_MASK
243 # define DM_TABLE _evas_dither_44
247 # define USE_DITHER_44 1
249 # define DM_TABLE _evas_dither_128128
253 # define USE_DITHER_128128 1
256 #define DM_MSK (DM_SIZE - 1)
257 #define DM_SHF(_b) (DM_BITS - (8 - _b))
258 /* Supports negative right shifts */
259 #define DM_SHR(x, _b) ((DM_SHF(_b) >= 0) ? \
260 ((x) >> DM_SHF(_b)) : ((x) << -DM_SHF(_b)))
262 /* if more than 1/ALPHA_SPARSE_INV_FRACTION is "alpha" (1-254) then sparse
263 * alpha flag gets set */
264 #define ALPHA_SPARSE_INV_FRACTION 3
266 /*****************************************************************************/
268 #if defined(__ARM_ARCH_3M__)
269 # define __ARM_ARCH__ 40
271 #if defined(__ARM_ARCH_4__)
272 # define __ARM_ARCH__ 40
274 #if defined(__ARM_ARCH_4T__)
275 # define __ARM_ARCH__ 41
278 #if defined(__ARM_ARCH_5__)
279 # define __ARM_ARCH__ 50
281 #if defined(__ARM_ARCH_5T__)
282 # define __ARM_ARCH__ 51
284 #if defined(__ARM_ARCH_5E__)
285 # define __ARM_ARCH__ 52
287 #if defined(__ARM_ARCH_5TE__)
288 # define __ARM_ARCH__ 53
290 #if defined(__ARM_ARCH_5TEJ__)
291 # define __ARM_ARCH__ 54
294 #if defined(__ARM_ARCH_6__)
295 # define __ARM_ARCH__ 60
297 #if defined(__ARM_ARCH_6J__)
298 # define __ARM_ARCH__ 61
300 #if defined(__ARM_ARCH_6K__)
301 # define __ARM_ARCH__ 62
303 #if defined(__ARM_ARCH_6Z__)
304 # define __ARM_ARCH__ 63
306 #if defined(__ARM_ARCH_6ZK__)
307 # define __ARM_ARCH__ 64
309 #if defined(__ARM_ARCH_6T2__)
310 # define __ARM_ARCH__ 65
313 #if defined(__ARM_ARCH_7__)
314 # define __ARM_ARCH__ 70
316 #if defined(__ARM_ARCH_7A__)
317 # define __ARM_ARCH__ 71
319 #if defined(__ARM_ARCH_7R__)
320 # define __ARM_ARCH__ 72
322 #if defined(__ARM_ARCH_7M__)
323 # define __ARM_ARCH__ 73
326 #if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52)
327 /* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */
328 #define pld(addr, off) \
329 __asm__("pld [%[address], %[offset]]":: \
330 [address] "r" (addr), [offset] "i" (off))
332 #define pld(addr, off)
333 #endif /* __ARMEL__ */
335 // these here are in config.h - just here for documentation
336 //#ifdef __ARM_ARCH__
337 // *IF* you enable pixman, this determines which things pixman will do
338 ////#define PIXMAN_FONT 1
339 ////#define PIXMAN_RECT 1
340 ////#define PIXMAN_LINE 1
341 ////#define PIXMAN_POLY 1
342 //#define PIXMAN_IMAGE 1
343 //#define PIXMAN_IMAGE_SCALE_SAMPLE 1
345 // not related to pixman but an alternate rotate code
346 //#define TILE_ROTATE 1
348 #define TILE_CACHE_LINE_SIZE 64
350 /*****************************************************************************/
352 #define UNROLL2(op...) op op
353 #define UNROLL4(op...) UNROLL2(op) UNROLL2(op)
354 #define UNROLL8(op...) UNROLL4(op) UNROLL4(op)
355 #define UNROLL16(op...) UNROLL8(op) UNROLL8(op)
357 #define UNROLL8_PLD_WHILE(start, size, end, op) \
359 end = start + (size & ~7); \
360 while (start < end) \
367 while (start < end) \
372 /*****************************************************************************/
374 typedef unsigned long long DATA64;
375 typedef unsigned int DATA32;
376 typedef unsigned short DATA16;
377 typedef unsigned char DATA8;
379 typedef struct _Image_Entry Image_Entry;
380 typedef struct _Image_Entry_Flags Image_Entry_Flags;
381 typedef struct _Image_Entry_Frame Image_Entry_Frame;
382 typedef struct _Image_Timestamp Image_Timestamp;
383 typedef struct _Engine_Image_Entry Engine_Image_Entry;
384 typedef struct _Evas_Cache_Target Evas_Cache_Target;
385 typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread;
387 typedef struct _RGBA_Image_Loadopts RGBA_Image_Loadopts;
388 #ifdef BUILD_PIPE_RENDER
389 typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op;
390 typedef struct _RGBA_Pipe RGBA_Pipe;
391 typedef struct _RGBA_Pipe_Thread_Info RGBA_Pipe_Thread_Info;
393 typedef struct _RGBA_Image RGBA_Image;
394 typedef struct _RGBA_Image_Span RGBA_Image_Span;
395 typedef struct _RGBA_Draw_Context RGBA_Draw_Context;
396 typedef struct _RGBA_Polygon_Point RGBA_Polygon_Point;
397 typedef struct _RGBA_Map_Point RGBA_Map_Point;
398 typedef struct _RGBA_Font RGBA_Font;
399 typedef struct _RGBA_Font_Int RGBA_Font_Int;
400 typedef struct _RGBA_Font_Source RGBA_Font_Source;
401 typedef struct _RGBA_Font_Glyph RGBA_Font_Glyph;
402 typedef struct _RGBA_Gfx_Compositor RGBA_Gfx_Compositor;
404 typedef struct _Cutout_Rect Cutout_Rect;
405 typedef struct _Cutout_Rects Cutout_Rects;
407 typedef struct _Convert_Pal Convert_Pal;
409 typedef struct _Tilebuf Tilebuf;
410 typedef struct _Tilebuf_Tile Tilebuf_Tile;
411 typedef struct _Tilebuf_Rect Tilebuf_Rect;
413 typedef struct _Evas_Common_Transform Evas_Common_Transform;
416 // all coords are 20.12
417 // fp type - an int for now
419 // fp # of bits of float accuracy
421 // fp half (half of an fp unit)
422 #define FPH (1 << (FP - 1))
424 #define FP1 (1 << (FP))
427 typedef struct _Regionbuf Regionbuf;
428 typedef struct _Regionspan Regionspan;
431 typedef void (*RGBA_Gfx_Func) (DATA32 *src, DATA8 *mask, DATA32 col, DATA32 *dst, int len);
432 typedef void (*RGBA_Gfx_Pt_Func) (DATA32 src, DATA8 mask, DATA32 col, DATA32 *dst);
433 typedef void (*Gfx_Func_Copy) (DATA32 *src, DATA32 *dst, int len);
435 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);
437 #include "../cache/evas_cache.h"
439 #include "../cache2/evas_cache2.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),
486 CPU_FEATURE_SSE3 = (1 << 7)
489 typedef enum _Font_Hint_Flags
496 typedef enum _Font_Rend_Flags
498 FONT_REND_REGULAR = 0,
499 FONT_REND_SLANT = (1 << 0),
500 FONT_REND_WEIGHT = (1 << 1),
503 /*****************************************************************************/
505 #if 0 // filtering disabled
506 typedef struct _Filtered_Image Filtered_Image;
509 struct _RGBA_Image_Loadopts
511 int scale_down_by; // if > 1 then use this
512 double dpi; // if > 0.0 use this
513 unsigned int w, h; // if > 0 use this
514 unsigned int degree;//if>0 there is some info related with rotation
516 unsigned int x, y, w, h;
519 Eina_Bool orientation; // if EINA_TRUE => should honor orientation information provided by file (like jpeg exif info)
522 struct _Image_Entry_Flags
524 Eina_Bool loaded : 1;
525 Eina_Bool in_progress : 1;
529 Eina_Bool need_data : 1;
530 Eina_Bool lru_nodata : 1;
531 Eina_Bool cached : 1;
535 Eina_Bool alpha_sparse : 1;
536 #ifdef BUILD_ASYNC_PRELOAD
537 Eina_Bool preload_done : 1;
538 Eina_Bool delete_me : 1;
539 Eina_Bool pending : 1;
541 Eina_Bool animated : 1;
542 Eina_Bool rotated : 1;
545 struct _Image_Entry_Frame
548 DATA32 *data; /* frame decoding data */
549 void *info; /* special image type info */
550 Eina_Bool loaded : 1;
553 struct _Evas_Cache_Target
560 struct _Image_Timestamp
565 #ifdef _STAT_VER_LINUX
566 unsigned long int mtime_nsec;
574 Evas_Cache_Image *cache;
579 const char *cache_key;
584 Evas_Cache_Target *targets;
585 Evas_Preload_Pthread *preload;
587 Image_Timestamp tstamp;
591 #ifdef BUILD_PIPE_RENDER
597 RGBA_Image_Loadopts load_opts;
614 #ifdef BUILD_ASYNC_PRELOAD
617 Eina_Bool unload_cancel : 1;
620 Image_Entry_Flags flags;
621 Evas_Image_Scale_Hint scale_hint;
624 unsigned int open_rid, load_rid, preload_rid;
631 /* for animation feature */
633 Evas_Image_Animated_Loop_Hint loop_hint;
639 struct _Engine_Image_Entry
643 /* Upper Engine data. */
647 Evas_Cache_Engine_Image *cache;
648 const char *cache_key;
652 Eina_Bool cached : 1;
655 Eina_Bool loaded : 1;
656 Eina_Bool need_parent : 1;
676 struct _Evas_Common_Transform
683 struct _RGBA_Draw_Context
691 pixman_image_t *pixman_color_image;
695 struct RGBA_Draw_Context_clip {
706 void *(*gl_new) (void *data, RGBA_Font_Glyph *fg);
707 void (*gl_free) (void *ext_dat);
708 void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
719 Eina_Bool anti_alias : 1;
722 #ifdef BUILD_PIPE_RENDER
723 #include "../engines/common/evas_map_image.h"
724 #include "../engines/common/evas_text_utils.h"
728 RGBA_Draw_Context context;
729 void (*op_func) (RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info);
730 void (*free_func) (RGBA_Pipe_Op *op);
740 RGBA_Polygon_Point *points;
744 Evas_Text_Props intl_props;
748 int sx, sy, sw, sh, dx, dy, dw, dh;
768 RGBA_Pipe_Op op[PIPE_LEN];
771 struct _RGBA_Pipe_Thread_Info
780 Image_Entry cache_entry;
782 RGBA_Image_Flags flags;
787 /* char *real_file; */
795 /* unsigned char scale; */
797 /* Colorspace stuff. */
800 Eina_Bool no_free : 1;
807 Eina_Bool no_free : 1;
815 #if 0 // filtering disabled
822 unsigned long long orig_usage;
823 unsigned long long usage_count;
825 unsigned long long newest_usage;
826 unsigned long long newest_usage_count;
836 struct _RGBA_Polygon_Point
842 struct _RGBA_Map_Point
844 FPc x, y; // x, y screenspace
845 float fx, fy, fz; // x, y, z in floats
846 // FPc x3, y3; // x, y 3d space
847 FPc z; // z in world space. optional
848 FPc u, v; // u, v in tex coords
849 DATA32 col; // color at this point
850 // for perspective correctness - only point 0 has relevant info
854 #if 0 // filtering disabled
855 struct _Filtered_Image
866 typedef struct _Fash_Item_Index_Map Fash_Item_Index_Map;
867 typedef struct _Fash_Int_Map Fash_Int_Map;
868 typedef struct _Fash_Int_Map2 Fash_Int_Map2;
869 typedef struct _Fash_Int Fash_Int;
870 struct _Fash_Item_Index_Map
877 Fash_Item_Index_Map item[256];
879 struct _Fash_Int_Map2
881 Fash_Int_Map *bucket[256];
885 Fash_Int_Map2 *bucket[256];
886 void (*freeme) (Fash_Int *fash);
890 typedef struct _Fash_Glyph_Map Fash_Glyph_Map;
891 typedef struct _Fash_Glyph_Map2 Fash_Glyph_Map2;
892 typedef struct _Fash_Glyph Fash_Glyph;
893 struct _Fash_Glyph_Map
895 RGBA_Font_Glyph *item[256];
897 struct _Fash_Glyph_Map2
899 Fash_Glyph_Map *bucket[256];
903 Fash_Glyph_Map2 *bucket[256];
904 void (*freeme) (Fash_Glyph *fash);
912 Font_Hint_Flags hinting;
915 unsigned char sizeok : 1;
918 #include "../engines/common/evas_font_ot.h"
920 struct _RGBA_Font_Int
923 RGBA_Font_Source *src;
938 Font_Hint_Flags hinting;
939 Font_Rend_Flags wanted_rend; /* The wanted rendering style */
940 Font_Rend_Flags runtime_rend; /* The rendering we need to do on runtime
941 in order to comply with the wanted_rend. */
947 unsigned char sizeok : 1;
948 unsigned char inuse : 1;
951 struct _RGBA_Font_Source
956 unsigned int current_size;
965 struct _RGBA_Font_Glyph
969 FT_BitmapGlyph glyph_out;
970 /* this is a problem - only 1 engine at a time can extend such a font... grrr */
972 void (*ext_dat_free) (void *ext_dat);
976 struct _RGBA_Gfx_Compositor
981 void (*shutdown)(void);
983 RGBA_Gfx_Func (*composite_pixel_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
984 RGBA_Gfx_Func (*composite_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
985 RGBA_Gfx_Func (*composite_pixel_color_span_get)(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
986 RGBA_Gfx_Func (*composite_mask_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
987 RGBA_Gfx_Func (*composite_pixel_mask_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
989 RGBA_Gfx_Pt_Func (*composite_pixel_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
990 RGBA_Gfx_Pt_Func (*composite_color_pt_get)(DATA32 col, RGBA_Image *dst);
991 RGBA_Gfx_Pt_Func (*composite_pixel_color_pt_get)(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
992 RGBA_Gfx_Pt_Func (*composite_mask_color_pt_get)(DATA32 col, RGBA_Image *dst);
993 RGBA_Gfx_Pt_Func (*composite_pixel_mask_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
996 #define EVAS_RECT_SPLIT 1
997 #ifdef EVAS_RECT_SPLIT
998 typedef struct list_node list_node_t;
999 typedef struct list list_t;
1000 typedef struct rect rect_t;
1001 typedef struct rect_node rect_node_t;
1005 struct list_node *next;
1010 struct list_node *head;
1011 struct list_node *tail;
1027 struct list_node _lst;
1030 #endif /* EVAS_RECT_SPLIT */
1043 } prev_add, prev_del;
1048 #elif defined(EVAS_RECT_SPLIT)
1055 Tilebuf_Tile *tiles;
1061 struct _Tilebuf_Tile
1063 Eina_Bool redraw : 1;
1064 /* FIXME: need these flags later - but not now */
1076 struct _Tilebuf_Rect
1099 Convert_Pal_Mode colors;
1106 /*****************************************************************************/
1107 #include "evas_macros.h"
1109 #ifndef WORDS_BIGENDIAN
1111 #define A_VAL(p) (((DATA8 *)(p))[3])
1112 #define R_VAL(p) (((DATA8 *)(p))[2])
1113 #define G_VAL(p) (((DATA8 *)(p))[1])
1114 #define B_VAL(p) (((DATA8 *)(p))[0])
1115 #define AR_VAL(p) ((DATA16 *)(p)[1])
1116 #define GB_VAL(p) ((DATA16 *)(p)[0])
1119 #define A_VAL(p) (((DATA8 *)(p))[0])
1120 #define R_VAL(p) (((DATA8 *)(p))[1])
1121 #define G_VAL(p) (((DATA8 *)(p))[2])
1122 #define B_VAL(p) (((DATA8 *)(p))[3])
1123 #define AR_VAL(p) ((DATA16 *)(p)[0])
1124 #define GB_VAL(p) ((DATA16 *)(p)[1])
1127 #define RGB_JOIN(r,g,b) \
1128 (((r) << 16) + ((g) << 8) + (b))
1130 #define ARGB_JOIN(a,r,g,b) \
1131 (((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
1133 #include "evas_blend_ops.h"
1135 #define _EVAS_RENDER_FILL -1
1136 #define _EVAS_RENDER_BLEND 0
1137 #define _EVAS_RENDER_BLEND_REL 1
1138 #define _EVAS_RENDER_COPY 2
1139 #define _EVAS_RENDER_COPY_REL 3
1140 #define _EVAS_RENDER_ADD 4
1141 #define _EVAS_RENDER_ADD_REL 5
1142 #define _EVAS_RENDER_SUB 6
1143 #define _EVAS_RENDER_SUB_REL 7
1144 #define _EVAS_RENDER_TINT 8
1145 #define _EVAS_RENDER_TINT_REL 9
1146 #define _EVAS_RENDER_MASK 10
1147 #define _EVAS_RENDER_MUL 11
1148 #define _EVAS_RENDER_CLIP 12
1150 #define _EVAS_TEXTURE_REFLECT 0
1151 #define _EVAS_TEXTURE_REPEAT 1
1152 #define _EVAS_TEXTURE_RESTRICT 2
1153 #define _EVAS_TEXTURE_RESTRICT_REFLECT 3
1154 #define _EVAS_TEXTURE_RESTRICT_REPEAT 4
1155 #define _EVAS_TEXTURE_PAD 5
1157 #define _EVAS_COLOR_SPACE_ARGB 0
1158 #define _EVAS_COLOR_SPACE_AHSV 1
1160 /*****************************************************************************/
1162 #define SCALE_SIZE_MAX ((1 << 15) - 1)
1169 void evas_common_init (void);
1170 void evas_common_shutdown (void);
1172 EAPI void evas_common_cpu_init (void);
1174 int evas_common_cpu_have_cpuid (void);
1175 int evas_common_cpu_has_feature (unsigned int feature);
1176 EAPI void evas_common_cpu_can_do (int *mmx, int *sse, int *sse2);
1177 EAPI void evas_common_cpu_end_opt (void);
1180 #include "../engines/common/evas_blend.h"
1182 EAPI Gfx_Func_Copy evas_common_draw_func_copy_get (int pixels, int reverse);
1185 #include "../engines/common/evas_convert_color.h"
1186 #include "../engines/common/evas_convert_colorspace.h"
1187 #include "../engines/common/evas_convert_main.h"
1188 #include "../engines/common/evas_convert_yuv.h"
1189 #include "../engines/common/evas_scale_main.h"
1190 #include "../engines/common/evas_scale_smooth.h"
1191 #include "../engines/common/evas_scale_span.h"
1194 #include "../engines/common/evas_image.h"
1197 #include "../engines/common/evas_line.h"
1198 #include "../engines/common/evas_polygon.h"
1199 #include "../engines/common/evas_rectangle.h"
1202 EAPI void evas_common_blit_init (void);
1204 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);
1207 #include "../engines/common/evas_font.h"
1210 EAPI void evas_common_tilebuf_init (void);
1212 EAPI Tilebuf *evas_common_tilebuf_new (int w, int h);
1213 EAPI void evas_common_tilebuf_free (Tilebuf *tb);
1214 EAPI void evas_common_tilebuf_set_tile_size (Tilebuf *tb, int tw, int th);
1215 EAPI void evas_common_tilebuf_get_tile_size (Tilebuf *tb, int *tw, int *th);
1216 EAPI int evas_common_tilebuf_add_redraw (Tilebuf *tb, int x, int y, int w, int h);
1217 EAPI int evas_common_tilebuf_del_redraw (Tilebuf *tb, int x, int y, int w, int h);
1218 EAPI int evas_common_tilebuf_add_motion_vector (Tilebuf *tb, int x, int y, int w, int h, int dx, int dy, int alpha);
1219 EAPI void evas_common_tilebuf_clear (Tilebuf *tb);
1220 EAPI Tilebuf_Rect *evas_common_tilebuf_get_render_rects (Tilebuf *tb);
1221 EAPI void evas_common_tilebuf_free_render_rects (Tilebuf_Rect *rects);
1224 Regionbuf *evas_common_regionbuf_new (int w, int h);
1225 void evas_common_regionbuf_free (Regionbuf *rb);
1226 void evas_common_regionbuf_clear (Regionbuf *rb);
1227 void evas_common_regionbuf_span_add (Regionbuf *rb, int x1, int x2, int y);
1228 void evas_common_regionbuf_span_del (Regionbuf *rb, int x1, int x2, int y);
1229 Tilebuf_Rect *evas_common_regionbuf_rects_get (Regionbuf *rb);
1233 #include "../engines/common/evas_draw.h"
1235 #include "../engines/common/evas_map_image.h"
1238 #ifdef BUILD_PIPE_RENDER
1239 # include "../engines/common/evas_pipe.h"
1242 void evas_font_dir_cache_free(void);
1246 /*****************************************************************************/