2007-07-16 00:38:48 -07:00
|
|
|
/*
|
|
|
|
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
|
|
|
*/
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
#ifndef EVAS_COMMON_H
|
|
|
|
#define EVAS_COMMON_H
|
|
|
|
|
2008-03-14 09:49:49 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h" /* so that EAPI in Evas.h is correctly defined */
|
|
|
|
#endif
|
|
|
|
|
2008-10-17 04:23:18 -07:00
|
|
|
#include <Eina.h>
|
2005-06-17 18:00:32 -07:00
|
|
|
#include "Evas.h"
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
#include "evas_options.h"
|
|
|
|
|
2009-03-13 23:48:25 -07:00
|
|
|
#if defined(__ARM_ARCH_3M__)
|
|
|
|
# define __ARM_ARCH__ 40
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_4__)
|
|
|
|
# define __ARM_ARCH__ 40
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_4T__)
|
|
|
|
# define __ARM_ARCH__ 41
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__ARM_ARCH_5__)
|
|
|
|
# define __ARM_ARCH__ 50
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_5T__)
|
|
|
|
# define __ARM_ARCH__ 51
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_5E__)
|
|
|
|
# define __ARM_ARCH__ 52
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_5TE__)
|
|
|
|
# define __ARM_ARCH__ 53
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_5TEJ__)
|
|
|
|
# define __ARM_ARCH__ 54
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__ARM_ARCH_6__)
|
|
|
|
# define __ARM_ARCH__ 60
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6J__)
|
|
|
|
# define __ARM_ARCH__ 61
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6K__)
|
|
|
|
# define __ARM_ARCH__ 62
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6Z__)
|
|
|
|
# define __ARM_ARCH__ 63
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6ZK__)
|
|
|
|
# define __ARM_ARCH__ 64
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6T2__)
|
|
|
|
# define __ARM_ARCH__ 65
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__ARM_ARCH_7__)
|
|
|
|
# define __ARM_ARCH__ 70
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_7A__)
|
|
|
|
# define __ARM_ARCH__ 71
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_7R__)
|
|
|
|
# define __ARM_ARCH__ 72
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_7M__)
|
|
|
|
# define __ARM_ARCH__ 73
|
|
|
|
#endif
|
|
|
|
|
2006-01-14 04:13:38 -08:00
|
|
|
#ifndef _GNU_SOURCE
|
|
|
|
#define _GNU_SOURCE
|
|
|
|
#endif
|
|
|
|
|
2009-03-26 18:48:58 -07:00
|
|
|
#ifndef BUILD_PTHREAD
|
|
|
|
#undef BUILD_PIPE_RENDER
|
|
|
|
#endif
|
|
|
|
|
2006-10-27 20:02:23 -07:00
|
|
|
#ifdef BUILD_PTHREAD
|
2008-10-15 07:25:27 -07:00
|
|
|
|
|
|
|
#ifndef __USE_GNU
|
|
|
|
#define __USE_GNU
|
|
|
|
#endif
|
|
|
|
|
2006-10-27 20:02:23 -07:00
|
|
|
# include <pthread.h>
|
2006-11-13 15:23:44 -08:00
|
|
|
# include <sched.h>
|
|
|
|
# define LK(x) pthread_mutex_t x
|
|
|
|
# define LKI(x) pthread_mutex_init(&(x), NULL);
|
|
|
|
# define LKD(x) pthread_mutex_destroy(&(x));
|
|
|
|
# define LKL(x) pthread_mutex_lock(&(x));
|
2009-07-09 23:52:09 -07:00
|
|
|
# define LKT(x) pthread_mutex_trylock(&(x));
|
2006-11-13 15:23:44 -08:00
|
|
|
# define LKU(x) pthread_mutex_unlock(&(x));
|
|
|
|
# define TH(x) pthread_t x
|
|
|
|
# define THI(x) int x
|
2006-11-15 08:44:34 -08:00
|
|
|
# define TH_MAX 8
|
|
|
|
|
|
|
|
// even though in theory having every Nth rendered line done by a different
|
|
|
|
// thread might even out load across threads - it actually slows things down.
|
|
|
|
//#define EVAS_SLI 1
|
|
|
|
|
2006-10-27 20:02:23 -07:00
|
|
|
#else
|
2007-07-16 00:38:48 -07:00
|
|
|
# define LK(x)
|
|
|
|
# define LKI(x)
|
|
|
|
# define LKD(x)
|
|
|
|
# define LKL(x)
|
2009-07-09 23:52:09 -07:00
|
|
|
# define LKT(x) 0
|
2007-07-16 00:38:48 -07:00
|
|
|
# define LKU(x)
|
2006-11-13 15:23:44 -08:00
|
|
|
# define TH(x)
|
|
|
|
# define THI(x)
|
|
|
|
# define TH_MAX 0
|
2006-10-27 20:02:23 -07:00
|
|
|
#endif
|
|
|
|
|
2006-01-09 05:29:15 -08:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/types.h>
|
2007-03-02 14:27:52 -08:00
|
|
|
#include <sys/stat.h>
|
2008-05-28 22:48:16 -07:00
|
|
|
#include <unistd.h>
|
2007-03-03 01:04:47 -08:00
|
|
|
#include <time.h>
|
2006-01-09 05:29:15 -08:00
|
|
|
#include <ctype.h>
|
2008-01-23 16:57:20 -08:00
|
|
|
#include <stdint.h>
|
2006-01-09 05:29:15 -08:00
|
|
|
|
|
|
|
#ifdef HAVE_ALLOCA_H
|
2007-07-16 00:38:48 -07:00
|
|
|
# include <alloca.h>
|
|
|
|
#elif defined __GNUC__
|
|
|
|
# define alloca __builtin_alloca
|
|
|
|
#elif defined _AIX
|
|
|
|
# define alloca __alloca
|
|
|
|
#elif defined _MSC_VER
|
|
|
|
# include <malloc.h>
|
|
|
|
# define alloca _alloca
|
|
|
|
#else
|
|
|
|
# include <stddef.h>
|
|
|
|
# ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
# endif
|
|
|
|
void *alloca (size_t);
|
2006-01-09 05:29:15 -08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <ft2build.h>
|
|
|
|
#include FT_FREETYPE_H
|
|
|
|
#include FT_GLYPH_H
|
|
|
|
#include FT_SIZES_H
|
2006-10-08 06:00:26 -07:00
|
|
|
#include FT_MODULE_H
|
2006-01-09 05:29:15 -08:00
|
|
|
|
2005-12-27 09:17:31 -08:00
|
|
|
#ifdef __GNUC__
|
|
|
|
# if __GNUC__ >= 4
|
2006-01-09 23:36:51 -08:00
|
|
|
// BROKEN in gcc 4 on amd64
|
|
|
|
//# pragma GCC visibility push(hidden)
|
2005-12-27 09:17:31 -08:00
|
|
|
# endif
|
2007-06-04 11:31:30 -07:00
|
|
|
#define LIKELY(x) __builtin_expect(!!(x), 1)
|
|
|
|
#define UNLIKELY(x) __builtin_expect(!!(x), 0)
|
|
|
|
#else
|
|
|
|
#define LIKELY(x) (x)
|
|
|
|
#define UNLIKELY(x) (x)
|
2005-12-27 09:17:31 -08:00
|
|
|
#endif
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
2005-02-04 18:30:13 -08:00
|
|
|
/* use exact rects for updates not tiles */
|
|
|
|
/* #define RECTUPDATE */
|
2005-02-04 20:21:25 -08:00
|
|
|
#define TILESIZE 8
|
2009-09-11 06:44:53 -07:00
|
|
|
#define IMG_MAX_SIZE 65536
|
2005-02-04 18:30:13 -08:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
#ifdef BUILD_SMALL_DITHER_MASK
|
2003-01-20 15:04:38 -08:00
|
|
|
# define DM_TABLE _evas_dither_44
|
2002-11-08 00:02:15 -08:00
|
|
|
# define DM_SIZE 4
|
|
|
|
# define DM_BITS 4
|
|
|
|
# define DM_DIV 16
|
|
|
|
# define USE_DITHER_44 1
|
|
|
|
# define DM_MSK (DM_SIZE - 1)
|
|
|
|
# define DM_SHF(_b) (DM_BITS - (8 - _b))
|
|
|
|
#else
|
2003-01-20 15:04:38 -08:00
|
|
|
# define DM_TABLE _evas_dither_128128
|
2002-11-08 00:02:15 -08:00
|
|
|
# define DM_SIZE 128
|
|
|
|
# define DM_BITS 6
|
|
|
|
# define DM_DIV 64
|
|
|
|
# define USE_DITHER_128128 1
|
|
|
|
# define DM_MSK (DM_SIZE - 1)
|
|
|
|
# define DM_SHF(_b) (DM_BITS - (8 - _b))
|
|
|
|
#endif
|
|
|
|
|
2006-10-02 04:24:26 -07:00
|
|
|
/* if more than 1/ALPHA_SPARSE_INV_FRACTION is "alpha" (1-254) then sparse
|
|
|
|
* alpha flag gets set */
|
|
|
|
#define ALPHA_SPARSE_INV_FRACTION 3
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
#if defined(__ARM_ARCH_3M__)
|
|
|
|
# define __ARM_ARCH__ 40
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_4__)
|
|
|
|
# define __ARM_ARCH__ 40
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_4T__)
|
|
|
|
# define __ARM_ARCH__ 41
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__ARM_ARCH_5__)
|
|
|
|
# define __ARM_ARCH__ 50
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_5T__)
|
|
|
|
# define __ARM_ARCH__ 51
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_5E__)
|
|
|
|
# define __ARM_ARCH__ 52
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_5TE__)
|
|
|
|
# define __ARM_ARCH__ 53
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_5TEJ__)
|
|
|
|
# define __ARM_ARCH__ 54
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__ARM_ARCH_6__)
|
|
|
|
# define __ARM_ARCH__ 60
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6J__)
|
|
|
|
# define __ARM_ARCH__ 61
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6K__)
|
|
|
|
# define __ARM_ARCH__ 62
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6Z__)
|
|
|
|
# define __ARM_ARCH__ 63
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6ZK__)
|
|
|
|
# define __ARM_ARCH__ 64
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6T2__)
|
|
|
|
# define __ARM_ARCH__ 65
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__ARM_ARCH_7__)
|
|
|
|
# define __ARM_ARCH__ 70
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_7A__)
|
|
|
|
# define __ARM_ARCH__ 71
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_7R__)
|
|
|
|
# define __ARM_ARCH__ 72
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_7M__)
|
|
|
|
# define __ARM_ARCH__ 73
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52)
|
|
|
|
/* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */
|
|
|
|
#define pld(addr, off) \
|
|
|
|
__asm__("pld [%[address], %[offset]]":: \
|
|
|
|
[address] "r" (addr), [offset] "i" (off))
|
|
|
|
#else
|
|
|
|
#define pld(addr, off)
|
|
|
|
#endif /* __ARMEL__ */
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
#define UNROLL2(op...) op op
|
|
|
|
#define UNROLL4(op...) UNROLL2(op) UNROLL2(op)
|
|
|
|
#define UNROLL8(op...) UNROLL4(op) UNROLL4(op)
|
|
|
|
#define UNROLL16(op...) UNROLL8(op) UNROLL8(op)
|
|
|
|
|
|
|
|
#define UNROLL8_PLD_WHILE(start, size, end, op) \
|
|
|
|
pld(start, 0); \
|
|
|
|
end = start + (size & ~7); \
|
|
|
|
while (start < end) \
|
|
|
|
{ \
|
|
|
|
pld(start, 32); \
|
|
|
|
UNROLL8(op); \
|
|
|
|
} \
|
|
|
|
end += (size & 7); \
|
|
|
|
pld(start, 32); \
|
|
|
|
while (start < end) \
|
|
|
|
{ \
|
|
|
|
op; \
|
|
|
|
}
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
2007-07-16 00:25:35 -07:00
|
|
|
typedef unsigned long long DATA64;
|
|
|
|
typedef unsigned int DATA32;
|
|
|
|
typedef unsigned short DATA16;
|
|
|
|
typedef unsigned char DATA8;
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2008-04-11 17:32:30 -07:00
|
|
|
typedef struct _Image_Entry Image_Entry;
|
2008-06-03 02:09:39 -07:00
|
|
|
typedef struct _Image_Entry_Flags Image_Entry_Flags;
|
2008-04-11 17:32:30 -07:00
|
|
|
typedef struct _Engine_Image_Entry Engine_Image_Entry;
|
2009-01-19 06:06:09 -08:00
|
|
|
typedef struct _Evas_Cache_Target Evas_Cache_Target;
|
2008-04-11 17:32:30 -07:00
|
|
|
|
2006-08-18 07:45:26 -07:00
|
|
|
typedef struct _RGBA_Image_Loadopts RGBA_Image_Loadopts;
|
2009-03-26 18:48:58 -07:00
|
|
|
#ifdef BUILD_PIPE_RENDER
|
2006-11-13 15:23:44 -08:00
|
|
|
typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op;
|
|
|
|
typedef struct _RGBA_Pipe RGBA_Pipe;
|
|
|
|
typedef struct _RGBA_Pipe_Thread_Info RGBA_Pipe_Thread_Info;
|
2009-03-26 18:48:58 -07:00
|
|
|
#endif
|
2002-11-08 00:02:15 -08:00
|
|
|
typedef struct _RGBA_Image RGBA_Image;
|
2005-01-26 08:42:31 -08:00
|
|
|
typedef struct _RGBA_Image_Span RGBA_Image_Span;
|
2002-11-08 00:02:15 -08:00
|
|
|
typedef struct _RGBA_Draw_Context RGBA_Draw_Context;
|
|
|
|
typedef struct _RGBA_Gradient RGBA_Gradient;
|
2006-09-30 03:18:37 -07:00
|
|
|
typedef struct _RGBA_Gradient_Color_Stop RGBA_Gradient_Color_Stop;
|
|
|
|
typedef struct _RGBA_Gradient_Alpha_Stop RGBA_Gradient_Alpha_Stop;
|
2005-12-03 01:27:53 -08:00
|
|
|
typedef struct _RGBA_Gradient_Type RGBA_Gradient_Type;
|
2008-08-25 22:45:04 -07:00
|
|
|
typedef struct _RGBA_Gradient2 RGBA_Gradient2;
|
|
|
|
typedef struct _RGBA_Gradient2_Type RGBA_Gradient2_Type;
|
|
|
|
typedef struct _RGBA_Gradient2_Color_Np_Stop RGBA_Gradient2_Color_Np_Stop;
|
2002-11-08 00:02:15 -08:00
|
|
|
typedef struct _RGBA_Polygon_Point RGBA_Polygon_Point;
|
|
|
|
typedef struct _RGBA_Font RGBA_Font;
|
2005-03-20 07:57:55 -08:00
|
|
|
typedef struct _RGBA_Font_Int RGBA_Font_Int;
|
2004-01-22 18:14:45 -08:00
|
|
|
typedef struct _RGBA_Font_Source RGBA_Font_Source;
|
2002-11-08 00:02:15 -08:00
|
|
|
typedef struct _RGBA_Font_Glyph RGBA_Font_Glyph;
|
2006-05-02 00:28:49 -07:00
|
|
|
typedef struct _RGBA_Gfx_Compositor RGBA_Gfx_Compositor;
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
typedef struct _Cutout_Rect Cutout_Rect;
|
2007-04-04 02:55:40 -07:00
|
|
|
typedef struct _Cutout_Rects Cutout_Rects;
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2007-07-16 00:25:35 -07:00
|
|
|
typedef struct _Convert_Pal Convert_Pal;
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2007-07-16 00:25:35 -07:00
|
|
|
typedef struct _Tilebuf Tilebuf;
|
|
|
|
typedef struct _Tilebuf_Tile Tilebuf_Tile;
|
|
|
|
typedef struct _Tilebuf_Rect Tilebuf_Rect;
|
2006-04-22 04:08:01 -07:00
|
|
|
|
2008-08-25 22:45:04 -07:00
|
|
|
typedef struct _Evas_Common_Transform Evas_Common_Transform;
|
|
|
|
|
2005-07-22 03:28:11 -07:00
|
|
|
/*
|
2005-02-04 18:30:13 -08:00
|
|
|
typedef struct _Regionbuf Regionbuf;
|
|
|
|
typedef struct _Regionspan Regionspan;
|
2005-07-22 03:28:11 -07:00
|
|
|
*/
|
2006-05-02 00:28:49 -07:00
|
|
|
|
|
|
|
typedef void (*RGBA_Gfx_Func) (DATA32 *src, DATA8 *mask, DATA32 col, DATA32 *dst, int len);
|
|
|
|
typedef void (*RGBA_Gfx_Pt_Func) (DATA32 src, DATA8 mask, DATA32 col, DATA32 *dst);
|
|
|
|
typedef void (*Gfx_Func_Copy) (DATA32 *src, DATA32 *dst, int len);
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
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);
|
|
|
|
|
2007-07-16 00:38:48 -07:00
|
|
|
typedef void (*Gfx_Func_Gradient_Fill)(DATA32 *src, int src_len,
|
2006-05-02 00:28:49 -07:00
|
|
|
DATA32 *dst, DATA8 *mask, int len,
|
|
|
|
int x, int y, int axx, int axy, int ayx, int ayy,
|
|
|
|
void *geom_data);
|
2005-12-03 01:27:53 -08:00
|
|
|
|
2008-08-25 22:45:04 -07:00
|
|
|
typedef void (*Gfx_Func_Gradient2_Fill)(DATA32 *src, int src_len,
|
|
|
|
DATA32 *dst, DATA8 *mask, int len,
|
|
|
|
int x, int y,
|
|
|
|
void *geom_data);
|
|
|
|
|
2008-07-10 09:38:54 -07:00
|
|
|
#include "../cache/evas_cache.h"
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
typedef enum _RGBA_Image_Flags
|
|
|
|
{
|
2006-09-30 03:18:37 -07:00
|
|
|
RGBA_IMAGE_NOTHING = (0),
|
2008-06-03 02:09:39 -07:00
|
|
|
/* RGBA_IMAGE_HAS_ALPHA = (1 << 0), */
|
2006-09-30 03:18:37 -07:00
|
|
|
RGBA_IMAGE_IS_DIRTY = (1 << 1),
|
|
|
|
RGBA_IMAGE_INDEXED = (1 << 2),
|
|
|
|
RGBA_IMAGE_ALPHA_ONLY = (1 << 3),
|
|
|
|
RGBA_IMAGE_ALPHA_TILES = (1 << 4),
|
2008-06-03 02:09:39 -07:00
|
|
|
/* RGBA_IMAGE_ALPHA_SPARSE = (1 << 5), */
|
|
|
|
/* RGBA_IMAGE_LOADED = (1 << 6), */
|
|
|
|
/* RGBA_IMAGE_NEED_DATA = (1 << 7) */
|
2002-11-08 00:02:15 -08:00
|
|
|
} RGBA_Image_Flags;
|
|
|
|
|
|
|
|
typedef enum _Convert_Pal_Mode
|
|
|
|
{
|
|
|
|
PAL_MODE_NONE,
|
|
|
|
PAL_MODE_MONO,
|
|
|
|
PAL_MODE_GRAY4,
|
|
|
|
PAL_MODE_GRAY16,
|
|
|
|
PAL_MODE_GRAY64,
|
|
|
|
PAL_MODE_GRAY256,
|
|
|
|
PAL_MODE_RGB111,
|
|
|
|
PAL_MODE_RGB121,
|
|
|
|
PAL_MODE_RGB221,
|
|
|
|
PAL_MODE_RGB222,
|
|
|
|
PAL_MODE_RGB232,
|
|
|
|
PAL_MODE_RGB332,
|
2006-08-14 06:50:07 -07:00
|
|
|
PAL_MODE_RGB666,
|
2002-11-08 00:02:15 -08:00
|
|
|
PAL_MODE_LAST
|
|
|
|
} Convert_Pal_Mode;
|
|
|
|
|
2003-03-10 20:39:58 -08:00
|
|
|
typedef enum _CPU_Features
|
|
|
|
{
|
|
|
|
CPU_FEATURE_C = 0,
|
|
|
|
CPU_FEATURE_MMX = (1 << 0),
|
2003-09-10 01:52:18 -07:00
|
|
|
CPU_FEATURE_MMX2 = (1 << 1),
|
|
|
|
CPU_FEATURE_SSE = (1 << 2),
|
|
|
|
CPU_FEATURE_ALTIVEC = (1 << 3),
|
|
|
|
CPU_FEATURE_VIS = (1 << 4),
|
2009-03-13 23:48:25 -07:00
|
|
|
CPU_FEATURE_VIS2 = (1 << 5),
|
|
|
|
CPU_FEATURE_NEON = (1 << 6)
|
2003-03-10 20:39:58 -08:00
|
|
|
} CPU_Features;
|
|
|
|
|
2006-02-27 06:03:27 -08:00
|
|
|
typedef enum _Font_Hint_Flags
|
|
|
|
{
|
|
|
|
FONT_NO_HINT,
|
|
|
|
FONT_AUTO_HINT,
|
|
|
|
FONT_BYTECODE_HINT
|
|
|
|
} Font_Hint_Flags;
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
2008-04-11 17:32:30 -07:00
|
|
|
struct _RGBA_Image_Loadopts
|
|
|
|
{
|
|
|
|
int scale_down_by; // if > 1 then use this
|
|
|
|
double dpi; // if > 0.0 use this
|
|
|
|
int w, h; // if > 0 use this
|
2009-09-15 06:34:12 -07:00
|
|
|
struct {
|
|
|
|
int x, y, w, h;
|
|
|
|
} region;
|
2008-04-11 17:32:30 -07:00
|
|
|
};
|
|
|
|
|
2008-06-03 02:09:39 -07:00
|
|
|
struct _Image_Entry_Flags
|
|
|
|
{
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool loaded : 1;
|
|
|
|
Eina_Bool dirty : 1;
|
|
|
|
Eina_Bool activ : 1;
|
|
|
|
Eina_Bool need_data : 1;
|
|
|
|
Eina_Bool lru_nodata : 1;
|
|
|
|
Eina_Bool cached : 1;
|
|
|
|
Eina_Bool alpha : 1;
|
|
|
|
Eina_Bool alpha_sparse : 1;
|
2008-09-16 07:52:57 -07:00
|
|
|
#ifdef BUILD_ASYNC_PRELOAD
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool preload : 1;
|
2008-09-16 07:52:57 -07:00
|
|
|
#endif
|
2008-06-03 02:09:39 -07:00
|
|
|
};
|
|
|
|
|
2009-01-19 06:06:09 -08:00
|
|
|
struct _Evas_Cache_Target
|
|
|
|
{
|
|
|
|
EINA_INLIST;
|
|
|
|
const void *target;
|
|
|
|
};
|
|
|
|
|
2008-04-11 17:32:30 -07:00
|
|
|
struct _Image_Entry
|
|
|
|
{
|
2009-03-13 08:18:39 -07:00
|
|
|
EINA_INLIST;
|
2008-12-01 18:33:09 -08:00
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
Evas_Cache_Image *cache;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
const char *cache_key;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
const char *file;
|
|
|
|
const char *key;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
Evas_Cache_Target *targets;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
time_t timestamp;
|
|
|
|
time_t laststat;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
int references;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
unsigned char scale;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
RGBA_Image_Loadopts load_opts;
|
|
|
|
int space;
|
|
|
|
int w;
|
|
|
|
int h;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
int w;
|
|
|
|
int h;
|
|
|
|
} allocated;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
void *module;
|
|
|
|
void *loader;
|
|
|
|
} info;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2008-12-23 15:07:48 -08:00
|
|
|
#ifdef BUILD_ASYNC_PRELOAD
|
2009-03-13 08:18:39 -07:00
|
|
|
LK(lock);
|
2008-12-23 15:07:48 -08:00
|
|
|
#endif
|
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
Image_Entry_Flags flags;
|
2009-05-07 06:29:56 -07:00
|
|
|
Evas_Image_Scale_Hint scale_hint;
|
2009-05-01 00:11:07 -07:00
|
|
|
void *data1, *data2;
|
2009-05-07 06:29:56 -07:00
|
|
|
int server_id;
|
2009-05-11 06:09:43 -07:00
|
|
|
int connect_num;
|
2009-09-11 06:44:53 -07:00
|
|
|
int channel;
|
2008-04-11 17:32:30 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _Engine_Image_Entry
|
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
EINA_INLIST;
|
2008-12-01 18:33:09 -08:00
|
|
|
|
2008-04-11 17:32:30 -07:00
|
|
|
/* Upper Engine data. */
|
|
|
|
Image_Entry *src;
|
2008-12-01 18:33:09 -08:00
|
|
|
|
2008-04-11 17:32:30 -07:00
|
|
|
/* Cache stuff. */
|
|
|
|
Evas_Cache_Engine_Image *cache;
|
|
|
|
const char *cache_key;
|
2008-12-01 18:33:09 -08:00
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool cached : 1;
|
|
|
|
Eina_Bool activ : 1;
|
|
|
|
Eina_Bool dirty : 1;
|
|
|
|
Eina_Bool loaded : 1;
|
|
|
|
Eina_Bool need_parent : 1;
|
2008-04-11 17:32:30 -07:00
|
|
|
} flags;
|
2008-12-01 18:33:09 -08:00
|
|
|
|
2008-04-11 17:32:30 -07:00
|
|
|
int references;
|
|
|
|
int w;
|
|
|
|
int h;
|
|
|
|
};
|
|
|
|
|
2007-04-04 02:55:40 -07:00
|
|
|
struct _Cutout_Rect
|
|
|
|
{
|
|
|
|
int x, y, w, h;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _Cutout_Rects
|
|
|
|
{
|
|
|
|
Cutout_Rect* rects;
|
|
|
|
int active;
|
|
|
|
int max;
|
|
|
|
};
|
|
|
|
|
2008-08-25 22:45:04 -07:00
|
|
|
struct _Evas_Common_Transform
|
|
|
|
{
|
|
|
|
float mxx, mxy, mxz;
|
|
|
|
float myx, myy, myz;
|
|
|
|
float mzx, mzy, mzz;
|
|
|
|
};
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
struct _RGBA_Draw_Context
|
|
|
|
{
|
|
|
|
struct {
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool use : 1;
|
2002-11-08 00:02:15 -08:00
|
|
|
DATA32 col;
|
|
|
|
} mul;
|
|
|
|
struct {
|
|
|
|
DATA32 col;
|
|
|
|
} col;
|
2007-06-21 13:10:13 -07:00
|
|
|
struct RGBA_Draw_Context_clip {
|
2002-11-08 00:02:15 -08:00
|
|
|
int x, y, w, h;
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool use : 1;
|
2002-11-08 00:02:15 -08:00
|
|
|
} clip;
|
2007-04-04 02:55:40 -07:00
|
|
|
Cutout_Rects cutout;
|
2003-09-08 22:51:03 -07:00
|
|
|
struct {
|
|
|
|
struct {
|
|
|
|
void *(*gl_new) (void *data, RGBA_Font_Glyph *fg);
|
|
|
|
void (*gl_free) (void *ext_dat);
|
|
|
|
void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
|
|
|
|
} func;
|
|
|
|
void *data;
|
|
|
|
} font_ext;
|
2005-12-03 01:27:53 -08:00
|
|
|
struct {
|
|
|
|
int color_space;
|
|
|
|
} interpolation;
|
2006-11-15 08:44:34 -08:00
|
|
|
struct {
|
|
|
|
int y, h;
|
|
|
|
} sli;
|
2006-05-02 00:28:49 -07:00
|
|
|
int render_op;
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool anti_alias : 1;
|
2002-11-08 00:02:15 -08:00
|
|
|
};
|
|
|
|
|
2009-03-26 18:48:58 -07:00
|
|
|
#ifdef BUILD_PIPE_RENDER
|
2006-11-13 15:23:44 -08:00
|
|
|
struct _RGBA_Pipe_Op
|
|
|
|
{
|
|
|
|
RGBA_Draw_Context context;
|
|
|
|
void (*op_func) (RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info);
|
|
|
|
void (*free_func) (RGBA_Pipe_Op *op);
|
2007-07-16 00:38:48 -07:00
|
|
|
|
2006-11-13 15:23:44 -08:00
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
int x, y, w, h;
|
|
|
|
} rect;
|
|
|
|
struct {
|
|
|
|
int x0, y0, x1, y1;
|
|
|
|
} line;
|
|
|
|
struct {
|
|
|
|
RGBA_Polygon_Point *points;
|
|
|
|
} poly;
|
|
|
|
struct {
|
|
|
|
RGBA_Gradient *grad;
|
|
|
|
int x, y, w, h;
|
|
|
|
} grad;
|
2008-08-25 22:45:04 -07:00
|
|
|
struct {
|
2008-11-04 01:19:35 -08:00
|
|
|
RGBA_Gradient2 *grad;
|
2008-08-25 22:45:04 -07:00
|
|
|
int x, y, w, h;
|
|
|
|
} grad2;
|
2006-11-13 15:23:44 -08:00
|
|
|
struct {
|
|
|
|
RGBA_Font *font;
|
|
|
|
int x, y;
|
|
|
|
char *text;
|
|
|
|
} text;
|
|
|
|
struct {
|
2008-11-04 01:19:35 -08:00
|
|
|
RGBA_Image *src;
|
|
|
|
int sx, sy, sw, sh, dx, dy, dw, dh;
|
|
|
|
int smooth;
|
|
|
|
char *text;
|
2006-11-13 15:23:44 -08:00
|
|
|
} image;
|
|
|
|
} op;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define PIPE_LEN 256
|
|
|
|
|
|
|
|
struct _RGBA_Pipe
|
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
EINA_INLIST;
|
2006-11-13 15:23:44 -08:00
|
|
|
int op_num;
|
|
|
|
RGBA_Pipe_Op op[PIPE_LEN];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _RGBA_Pipe_Thread_Info
|
|
|
|
{
|
|
|
|
RGBA_Image *im;
|
|
|
|
int x, y, w, h;
|
|
|
|
};
|
2009-03-26 18:48:58 -07:00
|
|
|
#endif
|
2006-11-13 15:23:44 -08:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
struct _RGBA_Image
|
|
|
|
{
|
2008-04-11 17:32:30 -07:00
|
|
|
Image_Entry cache_entry;
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
RGBA_Image_Flags flags;
|
2005-05-21 19:49:50 -07:00
|
|
|
struct
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2009-06-24 21:20:34 -07:00
|
|
|
/* void *module; */
|
|
|
|
/* void *loader; */
|
|
|
|
/* char *real_file; */
|
2002-11-08 00:02:15 -08:00
|
|
|
char *comment;
|
2007-06-28 16:22:20 -07:00
|
|
|
// int format;
|
2002-11-08 00:02:15 -08:00
|
|
|
} info;
|
2007-07-16 00:25:35 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
void *extended_info;
|
2009-03-26 18:48:58 -07:00
|
|
|
#ifdef BUILD_PIPE_RENDER
|
2006-11-13 15:23:44 -08:00
|
|
|
RGBA_Pipe *pipe;
|
2009-06-24 21:20:34 -07:00
|
|
|
#endif
|
2006-11-13 15:23:44 -08:00
|
|
|
int ref;
|
2007-07-16 00:25:35 -07:00
|
|
|
|
2008-04-11 17:32:30 -07:00
|
|
|
/* unsigned char scale; */
|
|
|
|
|
2007-07-16 00:25:35 -07:00
|
|
|
/* Colorspace stuff. */
|
2006-12-17 07:48:52 -08:00
|
|
|
struct {
|
2008-04-11 17:32:30 -07:00
|
|
|
void *data;
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool no_free : 1;
|
|
|
|
Eina_Bool dirty : 1;
|
2006-12-17 07:48:52 -08:00
|
|
|
} cs;
|
2007-07-16 00:25:35 -07:00
|
|
|
|
2008-04-11 17:32:30 -07:00
|
|
|
/* RGBA stuff */
|
2009-03-26 00:14:08 -07:00
|
|
|
struct {
|
2008-04-11 17:32:30 -07:00
|
|
|
DATA32 *data;
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool no_free : 1;
|
2008-04-11 17:32:30 -07:00
|
|
|
} image;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2009-03-26 00:14:08 -07:00
|
|
|
struct {
|
|
|
|
LK(lock);
|
|
|
|
Eina_List *list;
|
|
|
|
unsigned long long orig_usage;
|
|
|
|
unsigned long long usage_count;
|
2009-03-26 05:47:44 -07:00
|
|
|
int populate_count;
|
2009-03-26 20:50:03 -07:00
|
|
|
unsigned long long newest_usage;
|
|
|
|
unsigned long long newest_usage_count;
|
2009-03-26 00:14:08 -07:00
|
|
|
} cache;
|
2002-11-08 00:02:15 -08:00
|
|
|
};
|
|
|
|
|
2006-09-30 03:18:37 -07:00
|
|
|
struct _RGBA_Gradient_Color_Stop
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
EINA_INLIST;
|
2002-11-08 00:02:15 -08:00
|
|
|
int r, g, b, a;
|
|
|
|
int dist;
|
|
|
|
};
|
|
|
|
|
2006-09-30 03:18:37 -07:00
|
|
|
struct _RGBA_Gradient_Alpha_Stop
|
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
EINA_INLIST;
|
2006-09-30 03:18:37 -07:00
|
|
|
int a;
|
|
|
|
int dist;
|
|
|
|
};
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
struct _RGBA_Gradient
|
|
|
|
{
|
2006-09-30 03:18:37 -07:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
DATA32 *data;
|
|
|
|
int len;
|
|
|
|
float angle;
|
|
|
|
int direction;
|
|
|
|
float offset;
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool has_alpha : 1;
|
2006-09-30 03:18:37 -07:00
|
|
|
} map;
|
|
|
|
|
|
|
|
struct {
|
2008-10-17 04:23:18 -07:00
|
|
|
Eina_Inlist *stops;
|
2006-09-30 03:18:37 -07:00
|
|
|
DATA32 *data;
|
2007-06-28 16:22:20 -07:00
|
|
|
int nstops;
|
2006-09-30 03:18:37 -07:00
|
|
|
int len;
|
|
|
|
} color;
|
|
|
|
struct {
|
2008-10-17 04:23:18 -07:00
|
|
|
Eina_Inlist *stops;
|
2006-09-30 03:18:37 -07:00
|
|
|
DATA8 *data;
|
2007-06-28 16:22:20 -07:00
|
|
|
int nstops;
|
2006-09-30 03:18:37 -07:00
|
|
|
int len;
|
|
|
|
} alpha;
|
|
|
|
|
2005-12-03 01:27:53 -08:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
int x, y, w, h;
|
2006-09-30 03:18:37 -07:00
|
|
|
int spread;
|
|
|
|
float angle;
|
2005-12-03 01:27:53 -08:00
|
|
|
} fill;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
char *name;
|
|
|
|
char *params;
|
|
|
|
RGBA_Gradient_Type *geometer;
|
2006-09-30 03:18:37 -07:00
|
|
|
void *gdata;
|
2005-12-03 01:27:53 -08:00
|
|
|
} type;
|
2007-07-16 00:38:48 -07:00
|
|
|
|
2006-11-13 15:23:44 -08:00
|
|
|
int references;
|
2007-07-16 00:38:48 -07:00
|
|
|
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool imported_data : 1;
|
|
|
|
Eina_Bool has_alpha : 1;
|
2005-12-03 01:27:53 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _RGBA_Gradient_Type
|
|
|
|
{
|
2007-05-06 04:29:37 -07:00
|
|
|
const char *name;
|
2006-09-30 03:18:37 -07:00
|
|
|
void (*init)(void);
|
|
|
|
void (*shutdown)(void);
|
|
|
|
void (*geom_init)(RGBA_Gradient *gr);
|
|
|
|
void (*geom_set)(RGBA_Gradient *gr);
|
|
|
|
void (*geom_free)(void *gdata);
|
|
|
|
int (*has_alpha)(RGBA_Gradient *gr, int render_op);
|
|
|
|
int (*has_mask)(RGBA_Gradient *gr, int render_op);
|
|
|
|
int (*get_map_len)(RGBA_Gradient *gr);
|
|
|
|
Gfx_Func_Gradient_Fill (*get_fill_func)(RGBA_Gradient *gr, int render_op, unsigned char aa);
|
2002-11-08 00:02:15 -08:00
|
|
|
};
|
|
|
|
|
2008-08-25 22:45:04 -07:00
|
|
|
struct _RGBA_Gradient2_Color_Np_Stop
|
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
EINA_INLIST;
|
2008-08-25 22:45:04 -07:00
|
|
|
int r, g, b, a;
|
|
|
|
float pos;
|
|
|
|
int dist;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _RGBA_Gradient2
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
DATA32 *data;
|
|
|
|
int len;
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool has_alpha : 1;
|
2008-08-25 22:45:04 -07:00
|
|
|
} map;
|
|
|
|
|
|
|
|
struct {
|
2008-10-17 04:23:18 -07:00
|
|
|
Eina_Inlist *stops;
|
2008-08-25 22:45:04 -07:00
|
|
|
int nstops;
|
2008-11-04 01:19:35 -08:00
|
|
|
DATA32 *cdata;
|
|
|
|
DATA8 *adata;
|
2008-08-25 22:45:04 -07:00
|
|
|
int len;
|
|
|
|
} stops;
|
|
|
|
|
2008-11-04 01:19:35 -08:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
Evas_Common_Transform transform;
|
|
|
|
int spread;
|
|
|
|
} fill;
|
2008-08-25 22:45:04 -07:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
int id;
|
|
|
|
RGBA_Gradient2_Type *geometer;
|
|
|
|
void *gdata;
|
|
|
|
} type;
|
|
|
|
|
|
|
|
int references;
|
|
|
|
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool has_alpha : 1;
|
2008-08-25 22:45:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _RGBA_Gradient2_Type
|
|
|
|
{
|
|
|
|
const char *name;
|
|
|
|
void (*init)(void);
|
|
|
|
void (*shutdown)(void);
|
2008-11-04 01:19:35 -08:00
|
|
|
void (*geom_init)(RGBA_Gradient2 *gr);
|
|
|
|
void (*geom_update)(RGBA_Gradient2 *gr);
|
2008-08-25 22:45:04 -07:00
|
|
|
void (*geom_free)(void *gdata);
|
2008-11-04 01:19:35 -08:00
|
|
|
int (*has_alpha)(RGBA_Gradient2 *gr, int render_op);
|
|
|
|
int (*has_mask)(RGBA_Gradient2 *gr, int render_op);
|
|
|
|
int (*get_map_len)(RGBA_Gradient2 *gr);
|
|
|
|
Gfx_Func_Gradient2_Fill (*get_fill_func)(RGBA_Gradient2 *gr, int render_op);
|
2008-08-25 22:45:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
struct _RGBA_Polygon_Point
|
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
EINA_INLIST;
|
2002-11-08 00:02:15 -08:00
|
|
|
int x, y;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _RGBA_Font
|
2005-03-20 07:57:55 -08:00
|
|
|
{
|
2008-10-21 09:31:05 -07:00
|
|
|
Eina_List *fonts;
|
2006-02-27 06:03:27 -08:00
|
|
|
Font_Hint_Flags hinting;
|
2006-11-13 15:23:44 -08:00
|
|
|
int references;
|
|
|
|
LK(lock);
|
2005-03-20 07:57:55 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _RGBA_Font_Int
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2004-01-22 18:14:45 -08:00
|
|
|
RGBA_Font_Source *src;
|
|
|
|
|
|
|
|
int size;
|
|
|
|
int real_size;
|
2004-01-25 19:31:40 -08:00
|
|
|
|
|
|
|
struct {
|
|
|
|
FT_Size size;
|
|
|
|
} ft;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2008-12-09 09:56:31 -08:00
|
|
|
Eina_Hash *glyphs;
|
2004-01-22 18:14:45 -08:00
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
LK(ft_mutex);
|
2009-06-15 08:07:13 -07:00
|
|
|
|
2009-02-10 07:53:17 -08:00
|
|
|
Eina_Hash *kerning;
|
|
|
|
Eina_Hash *indexes;
|
|
|
|
|
2004-01-22 18:14:45 -08:00
|
|
|
int usage;
|
2006-02-27 06:03:27 -08:00
|
|
|
Font_Hint_Flags hinting;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2004-01-22 18:14:45 -08:00
|
|
|
int references;
|
2009-06-15 08:07:13 -07:00
|
|
|
|
2004-01-22 18:14:45 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _RGBA_Font_Source
|
|
|
|
{
|
2006-04-08 17:02:47 -07:00
|
|
|
const char *name;
|
|
|
|
const char *file;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2004-01-22 18:14:45 -08:00
|
|
|
void *data;
|
|
|
|
int data_size;
|
|
|
|
int current_size;
|
2009-06-17 03:01:52 -07:00
|
|
|
#if 0 /* FIXME: charmap user is disabled and use a deprecated data type. */
|
2006-04-22 04:08:01 -07:00
|
|
|
Evas_Array_Hash *charmap;
|
2009-06-17 03:01:52 -07:00
|
|
|
#endif
|
2007-07-16 00:38:48 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
struct {
|
2004-01-26 00:21:00 -08:00
|
|
|
int orig_upem;
|
2002-11-08 00:02:15 -08:00
|
|
|
FT_Face face;
|
|
|
|
} ft;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
int references;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _RGBA_Font_Glyph
|
2005-05-21 19:49:50 -07:00
|
|
|
{
|
2009-06-18 05:14:29 -07:00
|
|
|
FT_UInt index;
|
2003-09-08 22:51:03 -07:00
|
|
|
FT_Glyph glyph;
|
|
|
|
FT_BitmapGlyph glyph_out;
|
2006-03-06 18:44:16 -08:00
|
|
|
/* this is a problem - only 1 engine at a time can extend such a font... grrr */
|
2003-09-08 22:51:03 -07:00
|
|
|
void *ext_dat;
|
|
|
|
void (*ext_dat_free) (void *ext_dat);
|
2002-11-08 00:02:15 -08:00
|
|
|
};
|
|
|
|
|
2006-05-02 00:28:49 -07:00
|
|
|
struct _RGBA_Gfx_Compositor
|
|
|
|
{
|
2007-05-06 04:29:37 -07:00
|
|
|
const char *name;
|
2006-05-02 00:28:49 -07:00
|
|
|
|
|
|
|
void (*init)(void);
|
|
|
|
void (*shutdown)(void);
|
|
|
|
|
|
|
|
RGBA_Gfx_Func (*composite_pixel_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
|
|
|
|
RGBA_Gfx_Func (*composite_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
|
|
|
|
RGBA_Gfx_Func (*composite_pixel_color_span_get)(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
|
|
|
|
RGBA_Gfx_Func (*composite_mask_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
|
|
|
|
RGBA_Gfx_Func (*composite_pixel_mask_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
|
|
|
|
|
2008-06-03 02:09:39 -07:00
|
|
|
RGBA_Gfx_Pt_Func (*composite_pixel_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
|
2006-05-02 00:28:49 -07:00
|
|
|
RGBA_Gfx_Pt_Func (*composite_color_pt_get)(DATA32 col, RGBA_Image *dst);
|
2008-06-03 02:09:39 -07:00
|
|
|
RGBA_Gfx_Pt_Func (*composite_pixel_color_pt_get)(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
|
2006-05-02 00:28:49 -07:00
|
|
|
RGBA_Gfx_Pt_Func (*composite_mask_color_pt_get)(DATA32 col, RGBA_Image *dst);
|
2008-06-03 02:09:39 -07:00
|
|
|
RGBA_Gfx_Pt_Func (*composite_pixel_mask_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
|
2006-05-02 00:28:49 -07:00
|
|
|
};
|
|
|
|
|
2007-06-02 08:30:59 -07:00
|
|
|
#define EVAS_RECT_SPLIT 1
|
|
|
|
#ifdef EVAS_RECT_SPLIT
|
|
|
|
typedef struct list_node list_node_t;
|
|
|
|
typedef struct list list_t;
|
|
|
|
typedef struct rect rect_t;
|
|
|
|
typedef struct rect_node rect_node_t;
|
|
|
|
|
|
|
|
struct list_node
|
|
|
|
{
|
|
|
|
struct list_node *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct list
|
|
|
|
{
|
|
|
|
struct list_node *head;
|
|
|
|
struct list_node *tail;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct rect
|
|
|
|
{
|
|
|
|
short left;
|
|
|
|
short top;
|
|
|
|
short right;
|
|
|
|
short bottom;
|
|
|
|
short width;
|
|
|
|
short height;
|
|
|
|
int area;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct rect_node
|
|
|
|
{
|
|
|
|
struct list_node _lst;
|
|
|
|
struct rect rect;
|
|
|
|
};
|
|
|
|
|
2007-06-04 11:32:57 -07:00
|
|
|
void rect_list_node_pool_set_max(int max);
|
|
|
|
void rect_list_node_pool_flush(void);
|
|
|
|
list_node_t *rect_list_node_pool_get(void);
|
|
|
|
void rect_list_node_pool_put(list_node_t *node);
|
2007-06-02 08:30:59 -07:00
|
|
|
|
|
|
|
void rect_init(rect_t *r, int x, int y, int w, int h);
|
|
|
|
void rect_list_append_node(list_t *rects, list_node_t *node);
|
|
|
|
void rect_list_append(list_t *rects, const rect_t r);
|
|
|
|
void rect_list_append_xywh(list_t *rects, int x, int y, int w, int h);
|
|
|
|
void rect_list_concat(list_t *rects, list_t *other);
|
|
|
|
list_node_t *rect_list_unlink_next(list_t *rects, list_node_t *parent_node);
|
|
|
|
void rect_list_del_next(list_t *rects, list_node_t *parent_node);
|
|
|
|
void rect_list_clear(list_t *rects);
|
2007-06-02 22:28:12 -07:00
|
|
|
void rect_list_del_split_strict(list_t *rects, const rect_t del_r);
|
2007-06-02 08:30:59 -07:00
|
|
|
void rect_list_add_split_strict(list_t *rects, list_node_t *node);
|
2007-06-02 22:28:12 -07:00
|
|
|
list_node_t *rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error);
|
|
|
|
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);
|
2007-06-02 08:30:59 -07:00
|
|
|
|
|
|
|
void rect_print(const rect_t r);
|
|
|
|
void rect_list_print(const list_t rects);
|
|
|
|
#endif /* EVAS_RECT_SPLIT */
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
struct _Tilebuf
|
|
|
|
{
|
|
|
|
int outbuf_w;
|
|
|
|
int outbuf_h;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
struct {
|
|
|
|
int w, h;
|
|
|
|
} tile_size;
|
2005-02-04 18:30:13 -08:00
|
|
|
|
|
|
|
#ifdef RECTUPDATE
|
|
|
|
Regionbuf *rb;
|
2007-06-02 08:30:59 -07:00
|
|
|
#elif defined(EVAS_RECT_SPLIT)
|
2007-06-02 22:28:12 -07:00
|
|
|
int need_merge;
|
2007-06-02 08:30:59 -07:00
|
|
|
list_t rects;
|
2005-02-04 18:30:13 -08:00
|
|
|
#else
|
2002-11-08 00:02:15 -08:00
|
|
|
struct {
|
|
|
|
int w, h;
|
|
|
|
Tilebuf_Tile *tiles;
|
|
|
|
} tiles;
|
2005-02-04 18:30:13 -08:00
|
|
|
#endif
|
2002-11-08 00:02:15 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _Tilebuf_Tile
|
|
|
|
{
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool redraw : 1;
|
2002-11-08 00:02:15 -08:00
|
|
|
/* FIXME: need these flags later - but not now */
|
2005-05-21 19:49:50 -07:00
|
|
|
/*
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool done : 1;
|
|
|
|
Eina_Bool edge : 1;
|
|
|
|
Eina_Bool from : 1;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
struct {
|
|
|
|
int dx, dy;
|
|
|
|
} vector;
|
|
|
|
*/
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _Tilebuf_Rect
|
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
EINA_INLIST;
|
2002-11-08 00:02:15 -08:00
|
|
|
int x, y, w, h;
|
|
|
|
};
|
2005-07-22 03:28:11 -07:00
|
|
|
/*
|
2005-02-04 18:30:13 -08:00
|
|
|
struct _Regionbuf
|
|
|
|
{
|
|
|
|
int w, h;
|
|
|
|
Regionspan **spans;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _Regionspan
|
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
EINA_INLIST;
|
2005-02-04 18:30:13 -08:00
|
|
|
int x1, x2;
|
|
|
|
};
|
2005-07-22 03:28:11 -07:00
|
|
|
*/
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
struct _Convert_Pal
|
|
|
|
{
|
|
|
|
int references;
|
|
|
|
int count;
|
|
|
|
Convert_Pal_Mode colors;
|
|
|
|
DATA8 *lookup;
|
|
|
|
void *data;
|
|
|
|
};
|
|
|
|
|
2007-07-16 00:25:35 -07:00
|
|
|
/****/
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/*****************************************************************************/
|
2005-12-03 01:27:53 -08:00
|
|
|
#include "evas_macros.h"
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
#ifndef WORDS_BIGENDIAN
|
|
|
|
/* x86 */
|
|
|
|
#define A_VAL(p) ((DATA8 *)(p))[3]
|
|
|
|
#define R_VAL(p) ((DATA8 *)(p))[2]
|
|
|
|
#define G_VAL(p) ((DATA8 *)(p))[1]
|
|
|
|
#define B_VAL(p) ((DATA8 *)(p))[0]
|
|
|
|
#define AR_VAL(p) ((DATA16 *)(p)[1])
|
|
|
|
#define GB_VAL(p) ((DATA16 *)(p)[0])
|
|
|
|
#else
|
|
|
|
/* ppc */
|
|
|
|
#define A_VAL(p) ((DATA8 *)(p))[0]
|
|
|
|
#define R_VAL(p) ((DATA8 *)(p))[1]
|
|
|
|
#define G_VAL(p) ((DATA8 *)(p))[2]
|
|
|
|
#define B_VAL(p) ((DATA8 *)(p))[3]
|
|
|
|
#define AR_VAL(p) ((DATA16 *)(p)[0])
|
|
|
|
#define GB_VAL(p) ((DATA16 *)(p)[1])
|
|
|
|
#endif
|
|
|
|
|
2005-12-03 01:27:53 -08:00
|
|
|
#define RGB_JOIN(r,g,b) \
|
|
|
|
(((r) << 16) + ((g) << 8) + (b))
|
|
|
|
|
|
|
|
#define ARGB_JOIN(a,r,g,b) \
|
|
|
|
(((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
|
|
|
|
|
2006-05-02 00:28:49 -07:00
|
|
|
#include "evas_blend_ops.h"
|
|
|
|
|
2006-09-30 03:18:37 -07:00
|
|
|
#define _EVAS_RENDER_FILL -1
|
2006-05-02 00:28:49 -07:00
|
|
|
#define _EVAS_RENDER_BLEND 0
|
|
|
|
#define _EVAS_RENDER_BLEND_REL 1
|
|
|
|
#define _EVAS_RENDER_COPY 2
|
|
|
|
#define _EVAS_RENDER_COPY_REL 3
|
|
|
|
#define _EVAS_RENDER_ADD 4
|
|
|
|
#define _EVAS_RENDER_ADD_REL 5
|
|
|
|
#define _EVAS_RENDER_SUB 6
|
|
|
|
#define _EVAS_RENDER_SUB_REL 7
|
|
|
|
#define _EVAS_RENDER_TINT 8
|
|
|
|
#define _EVAS_RENDER_TINT_REL 9
|
|
|
|
#define _EVAS_RENDER_MASK 10
|
|
|
|
#define _EVAS_RENDER_MUL 11
|
2006-09-30 03:18:37 -07:00
|
|
|
#define _EVAS_RENDER_CLIP 12
|
2006-05-02 00:28:49 -07:00
|
|
|
|
|
|
|
#define _EVAS_TEXTURE_REFLECT 0
|
|
|
|
#define _EVAS_TEXTURE_REPEAT 1
|
|
|
|
#define _EVAS_TEXTURE_RESTRICT 2
|
|
|
|
#define _EVAS_TEXTURE_RESTRICT_REFLECT 3
|
|
|
|
#define _EVAS_TEXTURE_RESTRICT_REPEAT 4
|
|
|
|
#define _EVAS_TEXTURE_PAD 5
|
2005-12-03 01:27:53 -08:00
|
|
|
|
|
|
|
#define _EVAS_COLOR_SPACE_ARGB 0
|
|
|
|
#define _EVAS_COLOR_SPACE_AHSV 1
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/****/
|
2005-12-03 01:27:53 -08:00
|
|
|
void evas_common_init (void);
|
|
|
|
void evas_common_shutdown (void);
|
|
|
|
|
2006-09-06 00:33:40 -07:00
|
|
|
EAPI void evas_common_cpu_init (void);
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2002-11-13 21:38:10 -08:00
|
|
|
int evas_common_cpu_have_cpuid (void);
|
2003-12-09 20:10:55 -08:00
|
|
|
int evas_common_cpu_has_feature (unsigned int feature);
|
2006-09-06 00:33:40 -07:00
|
|
|
EAPI void evas_common_cpu_can_do (int *mmx, int *sse, int *sse2);
|
|
|
|
EAPI void evas_common_cpu_end_opt (void);
|
2007-07-16 00:38:48 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/****/
|
2008-07-21 09:10:48 -07:00
|
|
|
#include "../engines/common/evas_blend.h"
|
2006-05-02 00:28:49 -07:00
|
|
|
|
2006-09-06 00:33:40 -07:00
|
|
|
EAPI Gfx_Func_Copy evas_common_draw_func_copy_get (int pixels, int reverse);
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
/****/
|
2008-07-21 08:52:09 -07:00
|
|
|
#include "../engines/common/evas_convert_color.h"
|
|
|
|
#include "../engines/common/evas_convert_colorspace.h"
|
2008-07-10 22:50:56 -07:00
|
|
|
#include "../engines/common/evas_convert_main.h"
|
2008-07-21 08:52:09 -07:00
|
|
|
#include "../engines/common/evas_convert_yuv.h"
|
2008-07-10 23:36:30 -07:00
|
|
|
#include "../engines/common/evas_scale_main.h"
|
2008-07-21 08:52:09 -07:00
|
|
|
#include "../engines/common/evas_scale_smooth.h"
|
|
|
|
#include "../engines/common/evas_scale_span.h"
|
2006-05-02 00:28:49 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/****/
|
2008-07-19 11:32:32 -07:00
|
|
|
#include "../engines/common/evas_image.h"
|
2006-05-02 00:28:49 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/****/
|
2008-07-19 11:05:54 -07:00
|
|
|
#include "../engines/common/evas_line.h"
|
|
|
|
#include "../engines/common/evas_polygon.h"
|
|
|
|
#include "../engines/common/evas_rectangle.h"
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
/****/
|
2006-09-06 00:33:40 -07:00
|
|
|
EAPI void evas_common_blit_init (void);
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2007-07-16 00:29:34 -07:00
|
|
|
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);
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
/****/
|
2008-07-19 10:13:42 -07:00
|
|
|
#include "../engines/common/evas_gradient.h"
|
|
|
|
#include "../engines/common/evas_font.h"
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/****/
|
2006-09-06 00:33:40 -07:00
|
|
|
EAPI void evas_common_tilebuf_init (void);
|
|
|
|
|
|
|
|
EAPI Tilebuf *evas_common_tilebuf_new (int w, int h);
|
|
|
|
EAPI void evas_common_tilebuf_free (Tilebuf *tb);
|
|
|
|
EAPI void evas_common_tilebuf_set_tile_size (Tilebuf *tb, int tw, int th);
|
|
|
|
EAPI void evas_common_tilebuf_get_tile_size (Tilebuf *tb, int *tw, int *th);
|
|
|
|
EAPI int evas_common_tilebuf_add_redraw (Tilebuf *tb, int x, int y, int w, int h);
|
|
|
|
EAPI int evas_common_tilebuf_del_redraw (Tilebuf *tb, int x, int y, int w, int h);
|
|
|
|
EAPI int evas_common_tilebuf_add_motion_vector (Tilebuf *tb, int x, int y, int w, int h, int dx, int dy, int alpha);
|
|
|
|
EAPI void evas_common_tilebuf_clear (Tilebuf *tb);
|
|
|
|
EAPI Tilebuf_Rect *evas_common_tilebuf_get_render_rects (Tilebuf *tb);
|
|
|
|
EAPI void evas_common_tilebuf_free_render_rects (Tilebuf_Rect *rects);
|
2005-02-04 18:30:13 -08:00
|
|
|
|
2005-07-22 03:28:11 -07:00
|
|
|
/*
|
2005-02-04 18:30:13 -08:00
|
|
|
Regionbuf *evas_common_regionbuf_new (int w, int h);
|
|
|
|
void evas_common_regionbuf_free (Regionbuf *rb);
|
|
|
|
void evas_common_regionbuf_clear (Regionbuf *rb);
|
|
|
|
void evas_common_regionbuf_span_add (Regionbuf *rb, int x1, int x2, int y);
|
|
|
|
void evas_common_regionbuf_span_del (Regionbuf *rb, int x1, int x2, int y);
|
|
|
|
Tilebuf_Rect *evas_common_regionbuf_rects_get (Regionbuf *rb);
|
2005-07-22 03:28:11 -07:00
|
|
|
*/
|
2007-07-16 00:38:48 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/****/
|
2008-07-21 08:52:09 -07:00
|
|
|
#include "../engines/common/evas_draw.h"
|
2007-07-16 00:38:48 -07:00
|
|
|
|
2006-11-13 15:23:44 -08:00
|
|
|
/****/
|
2009-03-26 18:48:58 -07:00
|
|
|
#ifdef BUILD_PIPE_RENDER
|
|
|
|
# include "../engines/common/evas_pipe.h"
|
|
|
|
#endif
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2004-01-12 18:24:03 -08:00
|
|
|
void evas_font_dir_cache_free(void);
|
|
|
|
|
2007-07-16 00:25:35 -07:00
|
|
|
/****/
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
2009-03-13 23:48:25 -07:00
|
|
|
#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 70)
|
|
|
|
#ifdef BUILD_NEON
|
|
|
|
# include <arm_neon.h>
|
|
|
|
#endif
|
2009-06-24 21:20:34 -07:00
|
|
|
#endif
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|