summaryrefslogtreecommitdiff
path: root/src/lib/evas/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/common')
-rw-r--r--src/lib/evas/common/evas_blend.h2
-rw-r--r--src/lib/evas/common/evas_blend_main.c2
-rw-r--r--src/lib/evas/common/evas_blit_main.c8
-rw-r--r--src/lib/evas/common/evas_common_generic_cache.c25
-rw-r--r--src/lib/evas/common/evas_convert_color.c20
-rw-r--r--src/lib/evas/common/evas_convert_color.h20
-rw-r--r--src/lib/evas/common/evas_convert_colorspace.c15
-rw-r--r--src/lib/evas/common/evas_convert_colorspace.h12
-rw-r--r--src/lib/evas/common/evas_convert_gry_8.c4
-rw-r--r--src/lib/evas/common/evas_convert_grypal_6.c4
-rw-r--r--src/lib/evas/common/evas_convert_main.c4
-rw-r--r--src/lib/evas/common/evas_convert_main.h4
-rw-r--r--src/lib/evas/common/evas_convert_rgb_16.c18
-rw-r--r--src/lib/evas/common/evas_convert_rgb_24.c2
-rw-r--r--src/lib/evas/common/evas_convert_rgb_24.h2
-rw-r--r--src/lib/evas/common/evas_convert_yuv.h10
-rw-r--r--src/lib/evas/common/evas_cpu.c8
-rw-r--r--src/lib/evas/common/evas_draw.h48
-rw-r--r--src/lib/evas/common/evas_draw_main.c58
-rw-r--r--src/lib/evas/common/evas_font.h171
-rw-r--r--src/lib/evas/common/evas_font_compress.c4
-rw-r--r--src/lib/evas/common/evas_font_draw.c28
-rw-r--r--src/lib/evas/common/evas_font_draw.h16
-rw-r--r--src/lib/evas/common/evas_font_load.c71
-rw-r--r--src/lib/evas/common/evas_font_main.c200
-rw-r--r--src/lib/evas/common/evas_font_ot.c6
-rw-r--r--src/lib/evas/common/evas_font_ot.h5
-rw-r--r--src/lib/evas/common/evas_font_private.h2
-rw-r--r--src/lib/evas/common/evas_font_query.c60
-rw-r--r--src/lib/evas/common/evas_image.h85
-rw-r--r--src/lib/evas/common/evas_image_load.c45
-rw-r--r--src/lib/evas/common/evas_image_main.c65
-rw-r--r--src/lib/evas/common/evas_image_save.c2
-rw-r--r--src/lib/evas/common/evas_image_scalecache.c42
-rw-r--r--src/lib/evas/common/evas_line.h12
-rw-r--r--src/lib/evas/common/evas_line_main.c72
-rw-r--r--src/lib/evas/common/evas_map_image.c54
-rw-r--r--src/lib/evas/common/evas_map_image.h14
-rw-r--r--src/lib/evas/common/evas_map_image_core.c2
-rw-r--r--src/lib/evas/common/evas_map_image_internal_high.c18
-rw-r--r--src/lib/evas/common/evas_op_blend/op_blend_mask_color_neon.c2
-rw-r--r--src/lib/evas/common/evas_op_blend/op_blend_mask_color_sse3.c2
-rw-r--r--src/lib/evas/common/evas_op_blend/op_blend_master_sse3.c12
-rw-r--r--src/lib/evas/common/evas_op_blend/op_blend_pixel_i386.c2
-rw-r--r--src/lib/evas/common/evas_op_blend/op_blend_pixel_neon.c4
-rw-r--r--src/lib/evas/common/evas_op_blend_main_.c4
-rw-r--r--src/lib/evas/common/evas_op_copy/op_copy_color_.c2
-rw-r--r--src/lib/evas/common/evas_op_copy/op_copy_pixel_mask_.c2
-rw-r--r--src/lib/evas/common/evas_op_copy/op_copy_pixel_mask_i386.c4
-rw-r--r--src/lib/evas/common/evas_op_copy/op_copy_pixel_mask_neon.c4
-rw-r--r--src/lib/evas/common/evas_op_copy/op_copy_pixel_neon.c10
-rw-r--r--src/lib/evas/common/evas_op_mask/op_mask_pixel_mask_.c4
-rw-r--r--src/lib/evas/common/evas_pipe.c30
-rw-r--r--src/lib/evas/common/evas_pipe.h24
-rw-r--r--src/lib/evas/common/evas_polygon.h10
-rw-r--r--src/lib/evas/common/evas_polygon_main.c12
-rw-r--r--src/lib/evas/common/evas_rectangle.h12
-rw-r--r--src/lib/evas/common/evas_rectangle_main.c12
-rw-r--r--src/lib/evas/common/evas_scale_main.c6
-rw-r--r--src/lib/evas/common/evas_scale_main.h24
-rw-r--r--src/lib/evas/common/evas_scale_sample.c10
-rw-r--r--src/lib/evas/common/evas_scale_smooth.c6
-rw-r--r--src/lib/evas/common/evas_scale_smooth.h4
-rw-r--r--src/lib/evas/common/evas_scale_smooth_scaler_downx_downy.c2
-rw-r--r--src/lib/evas/common/evas_scale_span.c12
-rw-r--r--src/lib/evas/common/evas_scale_span.h12
-rw-r--r--src/lib/evas/common/evas_text_utils.c20
-rw-r--r--src/lib/evas/common/evas_text_utils.h12
-rw-r--r--src/lib/evas/common/evas_thread_render.c6
-rw-r--r--src/lib/evas/common/evas_tiler.c89
-rw-r--r--src/lib/evas/common/language/evas_bidi_utils.c2
-rw-r--r--src/lib/evas/common/language/evas_bidi_utils.h2
-rw-r--r--src/lib/evas/common/region.c16
-rw-r--r--src/lib/evas/common/region.h8
74 files changed, 874 insertions, 749 deletions
diff --git a/src/lib/evas/common/evas_blend.h b/src/lib/evas/common/evas_blend.h
index 1a98f3f550..f8aba7269f 100644
--- a/src/lib/evas/common/evas_blend.h
+++ b/src/lib/evas/common/evas_blend.h
@@ -2,7 +2,7 @@
#define _EVAS_BLEND_H
-EAPI void evas_common_blend_init (void);
+EVAS_API void evas_common_blend_init (void);
#endif /* _EVAS_BLEND_H */
diff --git a/src/lib/evas/common/evas_blend_main.c b/src/lib/evas/common/evas_blend_main.c
index ebac8f35b5..ce9e6bb38e 100644
--- a/src/lib/evas/common/evas_blend_main.c
+++ b/src/lib/evas/common/evas_blend_main.c
@@ -64,7 +64,7 @@ evas_gfx_compositor_get(unsigned char op)
return comp;
}
-EAPI void
+EVAS_API void
evas_common_blend_init(void)
{
static int gfx_initialised = 0;
diff --git a/src/lib/evas/common/evas_blit_main.c b/src/lib/evas/common/evas_blit_main.c
index afeea86f8b..2457716b47 100644
--- a/src/lib/evas/common/evas_blit_main.c
+++ b/src/lib/evas/common/evas_blit_main.c
@@ -26,12 +26,12 @@ static void evas_common_copy_pixels_rev_sse/*NB*/ (DATA32 *src, DATA32 *dst, int
static void evas_common_copy_rev_pixels_c (DATA32 *src, DATA32 *dst, int len);
-EAPI void
+EVAS_API void
evas_common_blit_init(void)
{
}
-EAPI void
+EVAS_API 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)
{
int y;
@@ -254,10 +254,10 @@ evas_common_copy_pixels_mmx(DATA32 *src, DATA32 *dst, int len)
#ifdef ALIGN_FIX
intptr_t src_align;
intptr_t dst_align;
-
+
src_align = (intptr_t)src & 0x3f; /* 64 byte alignment */
dst_align = (intptr_t)dst & 0x3f; /* 64 byte alignment */
-
+
if ((src_align != dst_align) ||
((src_align & 0x3) != 0))
{
diff --git a/src/lib/evas/common/evas_common_generic_cache.c b/src/lib/evas/common/evas_common_generic_cache.c
index ddb055deb2..db979de552 100644
--- a/src/lib/evas/common/evas_common_generic_cache.c
+++ b/src/lib/evas/common/evas_common_generic_cache.c
@@ -1,6 +1,6 @@
#include "evas_common_private.h"
-EAPI Generic_Cache*
+EVAS_API Generic_Cache*
generic_cache_new(void *user_data, Generic_Cache_Free func)
{
Generic_Cache *cache;
@@ -11,14 +11,23 @@ generic_cache_new(void *user_data, Generic_Cache_Free func)
return cache;
}
-EAPI void
+EVAS_API void
generic_cache_destroy(Generic_Cache *cache)
{
- generic_cache_dump(cache);
- eina_hash_free(cache->hash);
+ Generic_Cache_Entry *entry;
+ if (cache)
+ {
+ EINA_LIST_FREE(cache->lru_list, entry)
+ {
+ free(entry);
+ }
+
+ eina_hash_free(cache->hash);
+ free(cache);
+ }
}
-EAPI void
+EVAS_API void
generic_cache_dump(Generic_Cache *cache)
{
Generic_Cache_Entry *entry;
@@ -33,7 +42,7 @@ generic_cache_dump(Generic_Cache *cache)
}
}
-EAPI void
+EVAS_API void
generic_cache_data_set(Generic_Cache *cache, void *key, void *surface)
{
Generic_Cache_Entry *entry = NULL;
@@ -58,7 +67,7 @@ generic_cache_data_set(Generic_Cache *cache, void *key, void *surface)
}
}
-EAPI void *
+EVAS_API void *
generic_cache_data_get(Generic_Cache *cache, void *key)
{
Generic_Cache_Entry *entry = NULL, *lru_data;
@@ -83,7 +92,7 @@ generic_cache_data_get(Generic_Cache *cache, void *key)
return NULL;
}
-EAPI void
+EVAS_API void
generic_cache_data_drop(Generic_Cache *cache, void *key)
{
Generic_Cache_Entry *entry = NULL;
diff --git a/src/lib/evas/common/evas_convert_color.c b/src/lib/evas/common/evas_convert_color.c
index 548c8c5d50..5ac168c050 100644
--- a/src/lib/evas/common/evas_convert_color.c
+++ b/src/lib/evas/common/evas_convert_color.c
@@ -2,7 +2,7 @@
#include "evas_convert_color.h"
#include "draw.h"
-EAPI DATA32
+EVAS_API DATA32
evas_common_convert_ag_premul(DATA16 *data, unsigned int len)
{
DATA16 *de = data + len;
@@ -23,7 +23,7 @@ evas_common_convert_ag_premul(DATA16 *data, unsigned int len)
return nas;
}
-EAPI void
+EVAS_API void
evas_common_convert_ag_unpremul(DATA16 *data, unsigned int len)
{
DATA16 *de = data + len;
@@ -51,19 +51,19 @@ evas_common_convert_ag_unpremul(DATA16 *data, unsigned int len)
}
}
-EAPI DATA32
+EVAS_API DATA32
evas_common_convert_argb_premul(DATA32 *data, unsigned int len)
{
return (DATA32) efl_draw_argb_premul(data, len);
}
-EAPI void
+EVAS_API void
evas_common_convert_argb_unpremul(DATA32 *data, unsigned int len)
{
return efl_draw_argb_unpremul(data, len);
}
-EAPI void
+EVAS_API void
evas_common_convert_color_argb_premul(int a, int *r, int *g, int *b)
{
a++;
@@ -72,7 +72,7 @@ evas_common_convert_color_argb_premul(int a, int *r, int *g, int *b)
if (b) { *b = (a * *b) >> 8; }
}
-EAPI void
+EVAS_API void
evas_common_convert_color_argb_unpremul(int a, int *r, int *g, int *b)
{
if (!a) return;
@@ -81,7 +81,7 @@ evas_common_convert_color_argb_unpremul(int a, int *r, int *g, int *b)
if (b) { *b = (255 * *b) / a; }
}
-EAPI void
+EVAS_API void
evas_common_convert_color_hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b)
{
int i;
@@ -139,7 +139,7 @@ evas_common_convert_color_hsv_to_rgb(float h, float s, float v, int *r, int *g,
}
}
-EAPI void
+EVAS_API void
evas_common_convert_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v)
{
int max, min, d = r - g;
@@ -194,7 +194,7 @@ evas_common_convert_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, fl
}
}
-EAPI void
+EVAS_API void
evas_common_convert_color_hsv_to_rgb_int(int h, int s, int v, int *r, int *g, int *b)
{
int i, f;
@@ -234,7 +234,7 @@ evas_common_convert_color_hsv_to_rgb_int(int h, int s, int v, int *r, int *g, in
}
}
-EAPI void
+EVAS_API void
evas_common_convert_color_rgb_to_hsv_int(int r, int g, int b, int *h, int *s, int *v)
{
int min, max, d = r - g;
diff --git a/src/lib/evas/common/evas_convert_color.h b/src/lib/evas/common/evas_convert_color.h
index 54bd59e138..ce139e5837 100644
--- a/src/lib/evas/common/evas_convert_color.h
+++ b/src/lib/evas/common/evas_convert_color.h
@@ -2,17 +2,17 @@
#define _EVAS_CONVERT_COLOR_H
-EAPI DATA32 evas_common_convert_ag_premul (DATA16 *data, unsigned int len);
-EAPI void evas_common_convert_ag_unpremul (DATA16 *data, unsigned int len);
-EAPI DATA32 evas_common_convert_argb_premul (DATA32 *src, unsigned int len);
-EAPI void evas_common_convert_argb_unpremul (DATA32 *src, unsigned int len);
-EAPI void evas_common_convert_color_argb_premul (int a, int *r, int *g, int *b);
-EAPI void evas_common_convert_color_argb_unpremul (int a, int *r, int *g, int *b);
+EVAS_API DATA32 evas_common_convert_ag_premul (DATA16 *data, unsigned int len);
+EVAS_API void evas_common_convert_ag_unpremul (DATA16 *data, unsigned int len);
+EVAS_API DATA32 evas_common_convert_argb_premul (DATA32 *src, unsigned int len);
+EVAS_API void evas_common_convert_argb_unpremul (DATA32 *src, unsigned int len);
+EVAS_API void evas_common_convert_color_argb_premul (int a, int *r, int *g, int *b);
+EVAS_API void evas_common_convert_color_argb_unpremul (int a, int *r, int *g, int *b);
-EAPI void evas_common_convert_color_hsv_to_rgb (float h, float s, float v, int *r, int *g, int *b);
-EAPI void evas_common_convert_color_rgb_to_hsv (int r, int g, int b, float *h, float *s, float *v);
-EAPI void evas_common_convert_color_hsv_to_rgb_int (int h, int s, int v, int *r, int *g, int *b);
-EAPI void evas_common_convert_color_rgb_to_hsv_int (int r, int g, int b, int *h, int *s, int *v);
+EVAS_API void evas_common_convert_color_hsv_to_rgb (float h, float s, float v, int *r, int *g, int *b);
+EVAS_API void evas_common_convert_color_rgb_to_hsv (int r, int g, int b, float *h, float *s, float *v);
+EVAS_API void evas_common_convert_color_hsv_to_rgb_int (int h, int s, int v, int *r, int *g, int *b);
+EVAS_API void evas_common_convert_color_rgb_to_hsv_int (int r, int g, int b, int *h, int *s, int *v);
#endif /* _EVAS_CONVERT_COLOR_H */
diff --git a/src/lib/evas/common/evas_convert_colorspace.c b/src/lib/evas/common/evas_convert_colorspace.c
index afbac8f884..229b307abc 100644
--- a/src/lib/evas/common/evas_convert_colorspace.c
+++ b/src/lib/evas/common/evas_convert_colorspace.c
@@ -27,6 +27,7 @@ evas_common_convert_rgb565_a5p_to_argb8888(void *data, int w, int h, int stride,
src = data;
end = src + (stride * h);
ret = malloc(w * h * sizeof(DATA32));
+ if (!ret) return NULL;
dst = ret;
if (has_alpha)
@@ -55,6 +56,7 @@ evas_common_convert_agry88_to_argb8888(const void *data, int w, int h, int strid
src = data;
end = src + ((stride >> 1) * h);
ret = malloc(w * h * sizeof(DATA32));
+ if (!ret) return NULL;
dst = ret;
if (has_alpha)
@@ -97,6 +99,7 @@ evas_common_convert_gry8_to_argb8888(const void *data, int w, int h, int stride,
src = data;
end = src + (stride * h);
ret = malloc(w * h * sizeof(DATA32));
+ if (!ret) return NULL;
dst = ret;
if (has_alpha)
@@ -152,7 +155,7 @@ evas_common_convert_argb8888_to_a8(void *data, int w, int h, int stride, Eina_Bo
return ret;
}
-EAPI void *
+EVAS_API void *
evas_common_convert_argb8888_to(void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace)
{
switch (cspace)
@@ -167,7 +170,7 @@ evas_common_convert_argb8888_to(void *data, int w, int h, int stride, Eina_Bool
return NULL;
}
-EAPI void *
+EVAS_API void *
evas_common_convert_rgb565_a5p_to(void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace)
{
switch (cspace)
@@ -180,7 +183,7 @@ evas_common_convert_rgb565_a5p_to(void *data, int w, int h, int stride, Eina_Boo
return NULL;
}
-EAPI void *
+EVAS_API void *
evas_common_convert_yuv_422_601_to(void *data, int w, int h, Evas_Colorspace cspace)
{
switch (cspace)
@@ -201,7 +204,7 @@ evas_common_convert_yuv_422_601_to(void *data, int w, int h, Evas_Colorspace csp
return NULL;
}
-EAPI void *
+EVAS_API void *
evas_common_convert_yuv_422P_601_to(void *data, int w, int h, Evas_Colorspace cspace)
{
switch (cspace)
@@ -222,7 +225,7 @@ evas_common_convert_yuv_422P_601_to(void *data, int w, int h, Evas_Colorspace cs
return NULL;
}
-EAPI void *
+EVAS_API void *
evas_common_convert_yuv_420_601_to(void *data, int w, int h, Evas_Colorspace cspace)
{
switch (cspace)
@@ -243,7 +246,7 @@ evas_common_convert_yuv_420_601_to(void *data, int w, int h, Evas_Colorspace csp
return NULL;
}
-EAPI void *
+EVAS_API void *
evas_common_convert_yuv_420T_601_to(void *data, int w, int h, Evas_Colorspace cspace)
{
switch (cspace)
diff --git a/src/lib/evas/common/evas_convert_colorspace.h b/src/lib/evas/common/evas_convert_colorspace.h
index 51a94f9aeb..c1f2854077 100644
--- a/src/lib/evas/common/evas_convert_colorspace.h
+++ b/src/lib/evas/common/evas_convert_colorspace.h
@@ -2,12 +2,12 @@
#define _EVAS_CONVERT_COLORSPACE_H
-EAPI void *evas_common_convert_argb8888_to (void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace);
-EAPI void *evas_common_convert_rgb565_a5p_to (void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace);
-EAPI void *evas_common_convert_yuv_422P_601_to(void *data, int w, int h, Evas_Colorspace cspace);
-EAPI void *evas_common_convert_yuv_422_601_to (void *data, int w, int h, Evas_Colorspace cspace);
-EAPI void *evas_common_convert_yuv_420_601_to (void *data, int w, int h, Evas_Colorspace cspace);
-EAPI void *evas_common_convert_yuv_420T_601_to(void *data, int w, int h, Evas_Colorspace cspace);
+EVAS_API void *evas_common_convert_argb8888_to (void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace);
+EVAS_API void *evas_common_convert_rgb565_a5p_to (void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace);
+EVAS_API void *evas_common_convert_yuv_422P_601_to(void *data, int w, int h, Evas_Colorspace cspace);
+EVAS_API void *evas_common_convert_yuv_422_601_to (void *data, int w, int h, Evas_Colorspace cspace);
+EVAS_API void *evas_common_convert_yuv_420_601_to (void *data, int w, int h, Evas_Colorspace cspace);
+EVAS_API void *evas_common_convert_yuv_420T_601_to(void *data, int w, int h, Evas_Colorspace cspace);
void *evas_common_convert_agry88_to(const void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace);
void *evas_common_convert_gry8_to(const void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace);
diff --git a/src/lib/evas/common/evas_convert_gry_8.c b/src/lib/evas/common/evas_convert_gry_8.c
index 30993ce498..bef3b39de0 100644
--- a/src/lib/evas/common/evas_convert_gry_8.c
+++ b/src/lib/evas/common/evas_convert_gry_8.c
@@ -25,7 +25,7 @@ void evas_common_convert_rgba_to_8bpp_gry_256_dith (DATA32 *src, DATA8 *dst,
b = (B_VAL(src_ptr));
// Y = 0.299 * R + 0.587 * G + 0.114 * B;
- gry8 = ((r * 19595) + (g * 38469) + (b * 7471)) >> 16;
+ gry8 = ((r * 19596) + (g * 38470) + (b * 7472)) >> 16;
*dst_ptr = gry8;
@@ -54,7 +54,7 @@ void evas_common_convert_rgba_to_8bpp_gry_16_dith (DATA32 *src, DATA8 *dst,
b = (B_VAL(src_ptr));
// Y = 0.299 * R + 0.587 * G + 0.114 * B;
- gry8 = ((r * 19595) + (g * 38469) + (b * 7471)) >> 16;
+ gry8 = ((r * 19596) + (g * 38470) + (b * 7472)) >> 16;
if (((gry8 - gry8 * 255 / 4) >= dith) && (gry8 < 0x07)) gry8++;
diff --git a/src/lib/evas/common/evas_convert_grypal_6.c b/src/lib/evas/common/evas_convert_grypal_6.c
index 920fcfdf26..b3cf705f80 100644
--- a/src/lib/evas/common/evas_convert_grypal_6.c
+++ b/src/lib/evas/common/evas_convert_grypal_6.c
@@ -12,8 +12,8 @@ void evas_common_convert_rgba_to_8bpp_pal_gray64(DATA32 *src, DATA8 *dst, int sr
CONVERT_LOOP_START_ROT_0();
/* RGB -> YUV conversion */
- Y = ((R_VAL(src_ptr) * 76) +
- (G_VAL(src_ptr) * 151) +
+ Y = ((R_VAL(src_ptr) * 76) +
+ (G_VAL(src_ptr) * 151) +
(B_VAL(src_ptr) * 29)) >> 10;
*dst_ptr = pal[Y];
diff --git a/src/lib/evas/common/evas_convert_main.c b/src/lib/evas/common/evas_convert_main.c
index c9b4363fe8..509dee4b46 100644
--- a/src/lib/evas/common/evas_convert_main.c
+++ b/src/lib/evas/common/evas_convert_main.c
@@ -151,12 +151,12 @@ const DATA8 _evas_dither_128128[128][128] =
};
#endif /* USE_DITHER_128128 */
-EAPI void
+EVAS_API void
evas_common_convert_init(void)
{
}
-EAPI Gfx_Func_Convert
+EVAS_API Gfx_Func_Convert
evas_common_convert_func_get(DATA8 *dest, int w, int h EINA_UNUSED, int depth, DATA32 rmask, DATA32 gmask, DATA32 bmask, Convert_Pal_Mode pal_mode, int rotation)
{
if ((rmask == 0) && (gmask == 0) && (bmask == 0))
diff --git a/src/lib/evas/common/evas_convert_main.h b/src/lib/evas/common/evas_convert_main.h
index 51c2cc888f..03f0c85e8e 100644
--- a/src/lib/evas/common/evas_convert_main.h
+++ b/src/lib/evas/common/evas_convert_main.h
@@ -2,8 +2,8 @@
#define _EVAS_CONVERT_MAIN_H
-EAPI void evas_common_convert_init (void);
-EAPI Gfx_Func_Convert evas_common_convert_func_get (DATA8 *dest, int w, int h, int depth, DATA32 rmask, DATA32 gmask, DATA32 bmask, Convert_Pal_Mode pal_mode, int rotation);
+EVAS_API void evas_common_convert_init (void);
+EVAS_API Gfx_Func_Convert evas_common_convert_func_get (DATA8 *dest, int w, int h, int depth, DATA32 rmask, DATA32 gmask, DATA32 bmask, Convert_Pal_Mode pal_mode, int rotation);
#endif /* _EVAS_CONVERT_MAIN_H */
diff --git a/src/lib/evas/common/evas_convert_rgb_16.c b/src/lib/evas/common/evas_convert_rgb_16.c
index 1a98d7d52e..167ea5e86a 100644
--- a/src/lib/evas/common/evas_convert_rgb_16.c
+++ b/src/lib/evas/common/evas_convert_rgb_16.c
@@ -79,7 +79,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int sr
for (x = 0; x < w; x++)
{
DATA32 p = *src++, q = *src++;
-
+
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK];
dith2 = dith >> DM_SHF(6);
dith >>= DM_SHF(5);
@@ -89,7 +89,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int sr
if ((r1 < 0x1f) && ((((p & 0xff0000) >> 16) - (r1 << 3)) >= dith )) r1++;
if ((g1 < 0x3f) && ((((p & 0xff00) >> 8) - (g1 << 2)) >= dith2)) g1++;
if ((b1 < 0x1f) && (((p & 0xff) - (b1 << 3)) >= dith )) b1++;
-
+
x++;
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK];
dith2 = dith >> DM_SHF(6);
@@ -100,7 +100,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int sr
if ((r2 < 0x1f) && ((((q & 0xff0000) >> 16) - (r2 << 3)) >= dith )) r2++;
if ((g2 < 0x3f) && ((((q & 0xff00) >> 8) - (g2 << 2)) >= dith2)) g2++;
if ((b2 < 0x1f) && (((q & 0xff) - (b2 << 3)) >= dith )) b2++;
-
+
#ifndef WORDS_BIGENDIAN
*((DATA32 *)d) = (r2 << 27) | (g2 << 21) | (b2 << 16) |
(r1 << 11) | (g1 << 5) | (b1);
@@ -113,7 +113,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int sr
src += src_jump;
d += dst_jump;
}
-#endif
+#endif
#else
DATA16 *d = (DATA16 *)dst;
int w0 = w;
@@ -159,7 +159,7 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src
for (x = 0; x < w; x++)
{
DATA32 p = *src++;
-
+
r = (p & 0xff0000) >> 19;
if (r > 0x1f) r = 0x1f;
g = (p & 0xff00) >> 10;
@@ -182,13 +182,13 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src
src += src_jump;
d += dst_jump;
}
-#else
+#else
for (y = 0; y < h; y++)
{
for (x = 0; x < w; x++)
{
DATA32 p = *src++;
-
+
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK];
dith2 = dith >> DM_SHF(6);
dith >>= DM_SHF(5);
@@ -198,13 +198,13 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src
if ((r < 0x1f) && ((((p & 0xff0000) >> 16) - (r << 3)) >= dith )) r++;
if ((g < 0x3f) && ((((p & 0xff00) >> 8) - (g << 2)) >= dith2)) g++;
if ((b < 0x1f) && (((p & 0xff) - (b << 3)) >= dith )) b++;
-
+
*d++ = (r << 11) | (g << 5) | b;
}
src += src_jump;
d += dst_jump;
}
-#endif
+#endif
#else
DATA16 *d = (DATA16 *)dst;
int w0 = w;
diff --git a/src/lib/evas/common/evas_convert_rgb_24.c b/src/lib/evas/common/evas_convert_rgb_24.c
index 8849354cdd..b5abbcb6d0 100644
--- a/src/lib/evas/common/evas_convert_rgb_24.c
+++ b/src/lib/evas/common/evas_convert_rgb_24.c
@@ -43,7 +43,7 @@ evas_common_convert_rgba_to_24bpp_rgb_666(DATA32 *src, DATA8 *dst, int src_jump,
{
for (x = 0; x < w; x++)
{
- scratch =
+ scratch =
(((R_VAL(src_ptr) << 12) | (B_VAL(src_ptr) >> 2)) & 0x03f03f) |
((G_VAL(src_ptr) << 4) & 0x000fc0);
dst_ptr[0] = scratch_ptr[1];
diff --git a/src/lib/evas/common/evas_convert_rgb_24.h b/src/lib/evas/common/evas_convert_rgb_24.h
index bc114cad9d..27bd71917a 100644
--- a/src/lib/evas/common/evas_convert_rgb_24.h
+++ b/src/lib/evas/common/evas_convert_rgb_24.h
@@ -6,5 +6,5 @@ void evas_common_convert_rgba_to_24bpp_rgb_888 (DATA32 *src, DAT
void evas_common_convert_rgba_to_24bpp_bgr_888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
void evas_common_convert_rgba_to_24bpp_rgb_666 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
-
+
#endif /* _EVAS_CONVERT_RGB_24_H */
diff --git a/src/lib/evas/common/evas_convert_yuv.h b/src/lib/evas/common/evas_convert_yuv.h
index 1cadf2b1a3..3f59a28b2d 100644
--- a/src/lib/evas/common/evas_convert_yuv.h
+++ b/src/lib/evas/common/evas_convert_yuv.h
@@ -1,11 +1,11 @@
#ifndef _EVAS_CONVERT_YUV_H
#define _EVAS_CONVERT_YUV_H
-EAPI void evas_common_convert_yuv_422p_709_rgba (DATA8 **src, DATA8 *dst, int w, int h);
+EVAS_API void evas_common_convert_yuv_422p_709_rgba (DATA8 **src, DATA8 *dst, int w, int h);
-EAPI void evas_common_convert_yuv_422p_601_rgba (DATA8 **src, DATA8 *dst, int w, int h);
-EAPI void evas_common_convert_yuv_422_601_rgba (DATA8 **src, DATA8 *dst, int w, int h);
-EAPI void evas_common_convert_yuv_420_601_rgba (DATA8 **src, DATA8 *dst, int w, int h);
-EAPI void evas_common_convert_yuv_420T_601_rgba (DATA8 **src, DATA8 *dst, int w, int h);
+EVAS_API void evas_common_convert_yuv_422p_601_rgba (DATA8 **src, DATA8 *dst, int w, int h);
+EVAS_API void evas_common_convert_yuv_422_601_rgba (DATA8 **src, DATA8 *dst, int w, int h);
+EVAS_API void evas_common_convert_yuv_420_601_rgba (DATA8 **src, DATA8 *dst, int w, int h);
+EVAS_API void evas_common_convert_yuv_420T_601_rgba (DATA8 **src, DATA8 *dst, int w, int h);
#endif /* _EVAS_CONVERT_YUV_H */
diff --git a/src/lib/evas/common/evas_cpu.c b/src/lib/evas/common/evas_cpu.c
index a91ffe6930..b44cbc69f6 100644
--- a/src/lib/evas/common/evas_cpu.c
+++ b/src/lib/evas/common/evas_cpu.c
@@ -9,7 +9,7 @@ _cpu_check(Eina_Cpu_Features f)
return (features & f) == f;
}
-EAPI void
+EVAS_API void
evas_common_cpu_init(void)
{
static int called = 0;
@@ -79,7 +79,7 @@ evas_common_cpu_have_cpuid(void)
return 0;
}
-EAPI void
+EVAS_API void
evas_common_cpu_can_do(int *mmx, int *sse, int *sse2)
{
static int do_mmx = 0, do_sse = 0, do_sse2 = 0, done = 0;
@@ -98,7 +98,7 @@ evas_common_cpu_can_do(int *mmx, int *sse, int *sse2)
}
#ifdef BUILD_MMX
-EAPI void
+EVAS_API void
evas_common_cpu_end_opt(void)
{
if (cpu_feature_mask & (CPU_FEATURE_MMX | CPU_FEATURE_MMX2))
@@ -107,7 +107,7 @@ evas_common_cpu_end_opt(void)
}
}
#else
-EAPI void
+EVAS_API void
evas_common_cpu_end_opt(void)
{
}
diff --git a/src/lib/evas/common/evas_draw.h b/src/lib/evas/common/evas_draw.h
index e045a186ce..2906d6a895 100644
--- a/src/lib/evas/common/evas_draw.h
+++ b/src/lib/evas/common/evas_draw.h
@@ -2,12 +2,12 @@
#define _EVAS_DRAW_H
-EAPI void evas_common_draw_init (void);
+EVAS_API void evas_common_draw_init (void);
-EAPI RGBA_Draw_Context *evas_common_draw_context_new (void);
-EAPI RGBA_Draw_Context *evas_common_draw_context_dup (RGBA_Draw_Context *dc);
-EAPI void evas_common_draw_context_free (RGBA_Draw_Context *dc);
-EAPI void evas_common_draw_context_font_ext_set (RGBA_Draw_Context *dc,
+EVAS_API RGBA_Draw_Context *evas_common_draw_context_new (void);
+EVAS_API RGBA_Draw_Context *evas_common_draw_context_dup (RGBA_Draw_Context *dc);
+EVAS_API void evas_common_draw_context_free (RGBA_Draw_Context *dc);
+EVAS_API void evas_common_draw_context_font_ext_set (RGBA_Draw_Context *dc,
void *data,
void *(*gl_new) (void *data, RGBA_Font_Glyph *fg),
void (*gl_free) (void *ext_dat),
@@ -15,24 +15,24 @@ EAPI void evas_common_draw_context_font_ext_set (RGBA_D
void *(*gl_image_new) (void *gc, RGBA_Font_Glyph *fg, int alpha, Evas_Colorspace cspace),
void (*gl_image_free) (void *image),
void (*gl_image_draw) (void *gc, void *im, int dx, int dy, int dw, int dh, int smooth));
-EAPI void evas_common_draw_context_clip_clip (RGBA_Draw_Context *dc, int x, int y, int w, int h);
-EAPI void evas_common_draw_context_set_clip (RGBA_Draw_Context *dc, int x, int y, int w, int h);
-EAPI void evas_common_draw_context_unset_clip (RGBA_Draw_Context *dc);
-EAPI void evas_common_draw_context_set_color (RGBA_Draw_Context *dc, int r, int g, int b, int a);
-EAPI void evas_common_draw_context_set_multiplier (RGBA_Draw_Context *dc, int r, int g, int b, int a);
-EAPI void evas_common_draw_context_unset_multiplier (RGBA_Draw_Context *dc);
-EAPI Cutout_Rects *evas_common_draw_context_cutouts_new (void);
-EAPI void evas_common_draw_context_cutouts_free (Cutout_Rects* rects);
-EAPI void evas_common_draw_context_cutouts_real_free (Cutout_Rects* rects);
-EAPI void evas_common_draw_context_cutouts_del (Cutout_Rects* rects, int idx);
-EAPI void evas_common_draw_context_add_cutout (RGBA_Draw_Context *dc, int x, int y, int w, int h);
-EAPI void evas_common_draw_context_clear_cutouts (RGBA_Draw_Context *dc);
-EAPI Cutout_Rects *evas_common_draw_context_apply_cutouts (RGBA_Draw_Context *dc, Cutout_Rects *recycle);
-EAPI void evas_common_draw_context_apply_clear_cutouts (Cutout_Rects* rects);
-EAPI void evas_common_draw_context_apply_clean_cutouts (Cutout_Rects* rects);
-EAPI void evas_common_draw_context_set_anti_alias (RGBA_Draw_Context *dc, unsigned char aa);
-EAPI void evas_common_draw_context_set_color_interpolation (RGBA_Draw_Context *dc, int color_space);
-EAPI void evas_common_draw_context_set_render_op (RGBA_Draw_Context *dc, int op);
-EAPI void evas_common_draw_context_target_set (RGBA_Draw_Context *dc, int x, int y, int w, int h);
+EVAS_API void evas_common_draw_context_clip_clip (RGBA_Draw_Context *dc, int x, int y, int w, int h);
+EVAS_API void evas_common_draw_context_set_clip (RGBA_Draw_Context *dc, int x, int y, int w, int h);
+EVAS_API void evas_common_draw_context_unset_clip (RGBA_Draw_Context *dc);
+EVAS_API void evas_common_draw_context_set_color (RGBA_Draw_Context *dc, int r, int g, int b, int a);
+EVAS_API void evas_common_draw_context_set_multiplier (RGBA_Draw_Context *dc, int r, int g, int b, int a);
+EVAS_API void evas_common_draw_context_unset_multiplier (RGBA_Draw_Context *dc);
+EVAS_API Cutout_Rects *evas_common_draw_context_cutouts_new (void);
+EVAS_API void evas_common_draw_context_cutouts_free (Cutout_Rects* rects);
+EVAS_API void evas_common_draw_context_cutouts_real_free (Cutout_Rects* rects);
+EVAS_API void evas_common_draw_context_cutouts_del (Cutout_Rects* rects, int idx);
+EVAS_API void evas_common_draw_context_add_cutout (RGBA_Draw_Context *dc, int x, int y, int w, int h);
+EVAS_API void evas_common_draw_context_clear_cutouts (RGBA_Draw_Context *dc);
+EVAS_API Cutout_Rects *evas_common_draw_context_apply_cutouts (RGBA_Draw_Context *dc, Cutout_Rects *recycle);
+EVAS_API void evas_common_draw_context_apply_clear_cutouts (Cutout_Rects* rects);
+EVAS_API void evas_common_draw_context_apply_clean_cutouts (Cutout_Rects* rects);
+EVAS_API void evas_common_draw_context_set_anti_alias (RGBA_Draw_Context *dc, unsigned char aa);
+EVAS_API void evas_common_draw_context_set_color_interpolation (RGBA_Draw_Context *dc, int color_space);
+EVAS_API void evas_common_draw_context_set_render_op (RGBA_Draw_Context *dc, int op);
+EVAS_API void evas_common_draw_context_target_set (RGBA_Draw_Context *dc, int x, int y, int w, int h);
#endif /* _EVAS_DRAW_H */
diff --git a/src/lib/evas/common/evas_draw_main.c b/src/lib/evas/common/evas_draw_main.c
index 518bfb2ac7..832235765f 100644
--- a/src/lib/evas/common/evas_draw_main.c
+++ b/src/lib/evas/common/evas_draw_main.c
@@ -2,7 +2,7 @@
#include "evas_convert_main.h"
#include "evas_private.h"
-EAPI Cutout_Rects *
+EVAS_API Cutout_Rects *
evas_common_draw_context_cutouts_new(void)
{
Cutout_Rects *rects;
@@ -28,7 +28,7 @@ evas_common_draw_context_cutouts_dup(Cutout_Rects *rects2, const Cutout_Rects *r
else rects2->rects = NULL;
}
-EAPI void
+EVAS_API void
evas_common_draw_context_cutouts_free(Cutout_Rects* rects)
{
if (!rects) return;
@@ -36,7 +36,7 @@ evas_common_draw_context_cutouts_free(Cutout_Rects* rects)
rects->last_add.w = 0;
}
-EAPI void
+EVAS_API void
evas_common_draw_context_cutouts_real_free(Cutout_Rects* rects)
{
if (!rects) return;
@@ -44,7 +44,7 @@ evas_common_draw_context_cutouts_real_free(Cutout_Rects* rects)
free(rects);
}
-EAPI void
+EVAS_API void
evas_common_draw_context_cutouts_del(Cutout_Rects* rects, int idx)
{
if ((idx >= 0) && (idx < rects->active))
@@ -122,7 +122,7 @@ _evas_common_draw_context_find(void)
return dc;
}
-EAPI void
+EVAS_API void
evas_common_init(void)
{
if (_init_count++) return;
@@ -143,7 +143,7 @@ evas_common_init(void)
evas_common_tilebuf_init();
}
-EAPI void
+EVAS_API void
evas_common_shutdown(void)
{
if (--_init_count) return;
@@ -162,12 +162,12 @@ evas_common_shutdown(void)
// SLKD(_ctx_spares_lock);
}
-EAPI void
+EVAS_API void
evas_common_draw_init(void)
{
}
-EAPI RGBA_Draw_Context *
+EVAS_API RGBA_Draw_Context *
evas_common_draw_context_new(void)
{
RGBA_Draw_Context *dc;
@@ -177,7 +177,7 @@ evas_common_draw_context_new(void)
return dc;
}
-EAPI RGBA_Draw_Context *
+EVAS_API RGBA_Draw_Context *
evas_common_draw_context_dup(RGBA_Draw_Context *dc)
{
RGBA_Draw_Context *dc2 = _evas_common_draw_context_find();
@@ -195,20 +195,20 @@ evas_common_draw_context_dup(RGBA_Draw_Context *dc)
return dc2;
}
-EAPI void
+EVAS_API void
evas_common_draw_context_free(RGBA_Draw_Context *dc)
{
if (!dc) return;
_evas_common_draw_context_stash(dc);
}
-EAPI void
+EVAS_API void
evas_common_draw_context_clear_cutouts(RGBA_Draw_Context *dc)
{
evas_common_draw_context_cutouts_free(&dc->cutout);
}
-EAPI void
+EVAS_API void
evas_common_draw_context_font_ext_set(RGBA_Draw_Context *dc,
void *data,
void *(*gl_new) (void *data, RGBA_Font_Glyph *fg),
@@ -227,7 +227,7 @@ evas_common_draw_context_font_ext_set(RGBA_Draw_Context *dc,
dc->font_ext.func.gl_image_draw = gl_image_draw;
}
-EAPI void
+EVAS_API void
evas_common_draw_context_clip_clip(RGBA_Draw_Context *dc, int x, int y, int w, int h)
{
if (dc->clip.use)
@@ -239,7 +239,7 @@ evas_common_draw_context_clip_clip(RGBA_Draw_Context *dc, int x, int y, int w, i
evas_common_draw_context_set_clip(dc, x, y, w, h);
}
-EAPI void
+EVAS_API void
evas_common_draw_context_set_clip(RGBA_Draw_Context *dc, int x, int y, int w, int h)
{
dc->clip.use = 1;
@@ -249,13 +249,13 @@ evas_common_draw_context_set_clip(RGBA_Draw_Context *dc, int x, int y, int w, in
dc->clip.h = h;
}
-EAPI void
+EVAS_API void
evas_common_draw_context_unset_clip(RGBA_Draw_Context *dc)
{
dc->clip.use = 0;
}
-EAPI void
+EVAS_API void
evas_common_draw_context_set_color(RGBA_Draw_Context *dc, int r, int g, int b, int a)
{
R_VAL(&(dc->col.col)) = (DATA8)r;
@@ -266,21 +266,21 @@ evas_common_draw_context_set_color(RGBA_Draw_Context *dc, int r, int g, int b, i
#if defined(PIXMAN_FONT) || defined(PIXMAN_RECT) || defined(PIXMAN_LINE) || defined(PIXMAN_POLY)
if (dc->col.pixman_color_image)
pixman_image_unref(dc->col.pixman_color_image);
-
+
pixman_color_t pixman_color;
-
+
pixman_color.alpha = (dc->col.col & 0xff000000) >> 16;
pixman_color.red = (dc->col.col & 0x00ff0000) >> 8;
pixman_color.green = (dc->col.col & 0x0000ff00);
pixman_color.blue = (dc->col.col & 0x000000ff) << 8;
dc->col.pixman_color_image = pixman_image_create_solid_fill(&pixman_color);
-#endif
+#endif
#endif
}
-EAPI void
+EVAS_API void
evas_common_draw_context_set_multiplier(RGBA_Draw_Context *dc, int r, int g, int b, int a)
{
dc->mul.use = 1;
@@ -290,14 +290,14 @@ evas_common_draw_context_set_multiplier(RGBA_Draw_Context *dc, int r, int g, int
A_VAL(&(dc->mul.col)) = (DATA8)a;
}
-EAPI void
+EVAS_API void
evas_common_draw_context_unset_multiplier(RGBA_Draw_Context *dc)
{
dc->mul.use = 0;
}
-EAPI void
+EVAS_API void
evas_common_draw_context_add_cutout(RGBA_Draw_Context *dc, int x, int y, int w, int h)
{
// if (dc->cutout.rects > 512) return;
@@ -643,7 +643,7 @@ evas_common_draw_context_cutout_split(Cutout_Rects *res, int idx, Cutout_Rect *s
#undef R_NEW
}
-EAPI void
+EVAS_API void
evas_common_draw_context_target_set(RGBA_Draw_Context *dc, int x, int y, int w, int h)
{
dc->cutout_target.x = x;
@@ -668,7 +668,7 @@ _srt_x(const void *d1, const void *d2)
return r1->x - r2->x;
}
-EAPI Cutout_Rects *
+EVAS_API Cutout_Rects *
evas_common_draw_context_apply_cutouts(RGBA_Draw_Context *dc, Cutout_Rects *reuse)
{
Cutout_Rects *res = NULL;
@@ -833,14 +833,14 @@ evas_common_draw_context_apply_cutouts(RGBA_Draw_Context *dc, Cutout_Rects *reus
return res;
}
-EAPI void
+EVAS_API void
evas_common_draw_context_apply_clear_cutouts(Cutout_Rects *rects)
{
evas_common_draw_context_apply_clean_cutouts(rects);
free(rects);
}
-EAPI void
+EVAS_API void
evas_common_draw_context_apply_clean_cutouts(Cutout_Rects *rects)
{
free(rects->rects);
@@ -850,19 +850,19 @@ evas_common_draw_context_apply_clean_cutouts(Cutout_Rects *rects)
rects->last_add.w = 0;
}
-EAPI void
+EVAS_API void
evas_common_draw_context_set_anti_alias(RGBA_Draw_Context *dc , unsigned char aa)
{
dc->anti_alias = !!aa;
}
-EAPI void
+EVAS_API void
evas_common_draw_context_set_color_interpolation(RGBA_Draw_Context *dc, int color_space)
{
dc->interpolation.color_space = color_space;
}
-EAPI void
+EVAS_API void
evas_common_draw_context_set_render_op(RGBA_Draw_Context *dc , int op)
{
dc->render_op = op;
diff --git a/src/lib/evas/common/evas_font.h b/src/lib/evas/common/evas_font.h
index e6f2bdebd5..24e3f771e1 100644
--- a/src/lib/evas/common/evas_font.h
+++ b/src/lib/evas/common/evas_font.h
@@ -22,31 +22,7 @@ typedef unsigned long long DATA64;
#include "evas_text_utils.h"
-#ifdef EAPI
-# undef EAPI
-#endif
-
-#ifdef _WIN32
-# ifdef EFL_BUILD
-# ifdef DLL_EXPORT
-# define EAPI __declspec(dllexport)
-# else
-# define EAPI
-# endif
-# else
-# define EAPI __declspec(dllimport)
-# endif
-#else
-# ifdef __GNUC__
-# if __GNUC__ >= 4
-# define EAPI __attribute__ ((visibility("default")))
-# else
-# define EAPI
-# endif
-# else
-# define EAPI
-# endif
-#endif
+#include <evas_api.h>
#define LK(x) Eina_Lock x
#define LKI(x) eina_lock_new(&(x))
@@ -63,10 +39,10 @@ typedef unsigned long long DATA64;
* https://unicode.org/ivd/
* https://www.freetype.org/freetype2/docs/reference/ft2-glyph_variants.html
*/
-#define VAR_SEQ(x) GENERIC_VARIATION_SEQUENCES(x) | IDEOGRAPHICS_VARIATION_SEQUENCES(x) | MANGOLIAN_VARIATION_SEQUENCES(x)
-#define GENERIC_VARIATION_SEQUENCES(x) (x>=0xFE00 && x<=0xFE0F) ? x : 0
-#define IDEOGRAPHICS_VARIATION_SEQUENCES(x) (x>=0xE0100 && x<=0xE01EF) ? x : 0
-#define MANGOLIAN_VARIATION_SEQUENCES(x) (x>=0x180B && x<=0x180D) ? x : 0
+#define VAR_SEQ(x) (GENERIC_VARIATION_SEQUENCES(x) | IDEOGRAPHICS_VARIATION_SEQUENCES(x) | MANGOLIAN_VARIATION_SEQUENCES(x))
+#define GENERIC_VARIATION_SEQUENCES(x) ((x>=0xFE00 && x<=0xFE0F) ? x : 0)
+#define IDEOGRAPHICS_VARIATION_SEQUENCES(x) ((x>=0xE0100 && x<=0xE01EF) ? x : 0)
+#define MANGOLIAN_VARIATION_SEQUENCES(x) ((x>=0x180B && x<=0x180D) ? x : 0)
/**
* http://unicode.org/emoji/charts/emoji-variants.html
*/
@@ -294,7 +270,8 @@ struct _RGBA_Font_Int
Eina_Hash *kerning;
Fash_Glyph *fash;
unsigned int size;
- float scale_factor;
+ double scale_factor;
+ Eina_Bool is_resized;
int real_size;
int max_h;
int references;
@@ -361,6 +338,7 @@ struct _RGBA_Font_Glyph
Evas_Coord x_bear;
Evas_Coord y_bear;
FT_Glyph glyph;
+ FT_Vector advance;
RGBA_Font_Glyph_Out *glyph_out;
void *col_dat;
/* this is a problem - only 1 engine at a time can extend such a font... grrr */
@@ -375,76 +353,76 @@ struct _RGBA_Font_Glyph
/* main */
-EAPI void evas_common_font_init (void);
-EAPI void evas_common_font_shutdown (void);
-EAPI void evas_common_font_font_all_unload (void);
-
-EAPI int evas_common_font_ascent_get (RGBA_Font *fn);
-EAPI int evas_common_font_descent_get (RGBA_Font *fn);
-EAPI int evas_common_font_max_ascent_get (RGBA_Font *fn);
-EAPI int evas_common_font_max_descent_get (RGBA_Font *fn);
-EAPI int evas_common_font_instance_ascent_get (RGBA_Font_Int *fi);
-EAPI int evas_common_font_instance_descent_get (RGBA_Font_Int *fi);
-EAPI int evas_common_font_instance_max_ascent_get (RGBA_Font_Int *fi);
-EAPI int evas_common_font_instance_max_descent_get (RGBA_Font_Int *fi);
-EAPI int evas_common_font_instance_underline_position_get (RGBA_Font_Int *fi);
-EAPI int evas_common_font_instance_underline_thickness_get (RGBA_Font_Int *fi);
-EAPI int evas_common_font_get_line_advance (RGBA_Font *fn);
-void *evas_common_font_freetype_face_get(RGBA_Font *font); /* XXX: Not EAPI on purpose. Not ment to be used in modules. */
-
-EAPI RGBA_Font_Glyph *evas_common_font_int_cache_glyph_get (RGBA_Font_Int *fi, FT_UInt index);
-EAPI Eina_Bool evas_common_font_int_cache_glyph_render(RGBA_Font_Glyph *fg);
-EAPI FT_UInt evas_common_get_char_index (RGBA_Font_Int* fi, Eina_Unicode gl, Eina_Unicode variation_sequence);
+EVAS_API void evas_common_font_init (void);
+EVAS_API void evas_common_font_shutdown (void);
+EVAS_API void evas_common_font_font_all_unload (void);
+
+EVAS_API int evas_common_font_ascent_get (RGBA_Font *fn);
+EVAS_API int evas_common_font_descent_get (RGBA_Font *fn);
+EVAS_API int evas_common_font_max_ascent_get (RGBA_Font *fn);
+EVAS_API int evas_common_font_max_descent_get (RGBA_Font *fn);
+EVAS_API int evas_common_font_instance_ascent_get (RGBA_Font_Int *fi);
+EVAS_API int evas_common_font_instance_descent_get (RGBA_Font_Int *fi);
+EVAS_API int evas_common_font_instance_max_ascent_get (RGBA_Font_Int *fi);
+EVAS_API int evas_common_font_instance_max_descent_get (RGBA_Font_Int *fi);
+EVAS_API int evas_common_font_instance_underline_position_get (RGBA_Font_Int *fi);
+EVAS_API int evas_common_font_instance_underline_thickness_get (RGBA_Font_Int *fi);
+EVAS_API int evas_common_font_get_line_advance (RGBA_Font *fn);
+void *evas_common_font_freetype_face_get(RGBA_Font *font); /* XXX: Not EVAS_API on purpose. Not ment to be used in modules. */
+
+EVAS_API RGBA_Font_Glyph *evas_common_font_int_cache_glyph_get (RGBA_Font_Int *fi, FT_UInt index);
+EVAS_API Eina_Bool evas_common_font_int_cache_glyph_render(RGBA_Font_Glyph *fg);
+EVAS_API FT_UInt evas_common_get_char_index (RGBA_Font_Int* fi, Eina_Unicode gl, Eina_Unicode variation_sequence);
/* load */
-EAPI void evas_common_font_dpi_set (int dpi_h, int dpi_v);
-EAPI RGBA_Font_Source *evas_common_font_source_memory_load (const char *name, const void *data, int data_size);
-EAPI RGBA_Font_Source *evas_common_font_source_load (const char *name);
-EAPI int evas_common_font_source_load_complete (RGBA_Font_Source *fs);
-EAPI RGBA_Font_Source *evas_common_font_source_find (const char *name);
-EAPI void evas_common_font_source_free (RGBA_Font_Source *fs);
-EAPI void evas_common_font_size_use (RGBA_Font *fn);
-EAPI RGBA_Font_Int *evas_common_font_int_load (const char *name, int size, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
-EAPI RGBA_Font_Int *evas_common_font_int_load_init (RGBA_Font_Int *fn);
-EAPI RGBA_Font_Int *evas_common_font_int_load_complete (RGBA_Font_Int *fi);
-EAPI RGBA_Font *evas_common_font_memory_load (const char *source, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
-EAPI RGBA_Font *evas_common_font_load (const char *name, int size, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
-EAPI RGBA_Font *evas_common_font_add (RGBA_Font *fn, const char *name, int size, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
-EAPI RGBA_Font *evas_common_font_memory_add (RGBA_Font *fn, const char *source, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
-EAPI void evas_common_font_free (RGBA_Font *fn);
-EAPI void evas_common_font_int_unref (RGBA_Font_Int *fi);
-EAPI void evas_common_font_hinting_set (RGBA_Font *fn, Font_Hint_Flags hinting);
-EAPI Eina_Bool evas_common_hinting_available (Font_Hint_Flags hinting);
-EAPI RGBA_Font *evas_common_font_memory_hinting_load (const char *source, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
-EAPI RGBA_Font *evas_common_font_hinting_load (const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
-EAPI RGBA_Font *evas_common_font_hinting_add (RGBA_Font *fn, const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
-EAPI RGBA_Font *evas_common_font_memory_hinting_add (RGBA_Font *fn, const char *source, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
-EAPI void evas_common_font_int_modify_cache_by (RGBA_Font_Int *fi, int dir);
-EAPI int evas_common_font_cache_get (void);
-EAPI void evas_common_font_cache_set (int size);
-EAPI void evas_common_font_flush (void);
-EAPI void evas_common_font_flush_last (void);
-EAPI RGBA_Font_Int *evas_common_font_int_find (const char *name, int size, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
-EAPI void evas_common_font_all_clear (void);
-EAPI void evas_common_font_ext_clear (void);
+EVAS_API void evas_common_font_dpi_set (int dpi_h, int dpi_v);
+EVAS_API RGBA_Font_Source *evas_common_font_source_memory_load (const char *name, const void *data, int data_size);
+EVAS_API RGBA_Font_Source *evas_common_font_source_load (const char *name);
+EVAS_API int evas_common_font_source_load_complete (RGBA_Font_Source *fs);
+EVAS_API RGBA_Font_Source *evas_common_font_source_find (const char *name);
+EVAS_API void evas_common_font_source_free (RGBA_Font_Source *fs);
+EVAS_API void evas_common_font_size_use (RGBA_Font *fn);
+EVAS_API RGBA_Font_Int *evas_common_font_int_load (const char *name, int size, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
+EVAS_API RGBA_Font_Int *evas_common_font_int_load_init (RGBA_Font_Int *fn);
+EVAS_API RGBA_Font_Int *evas_common_font_int_load_complete (RGBA_Font_Int *fi);
+EVAS_API RGBA_Font *evas_common_font_memory_load (const char *source, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
+EVAS_API RGBA_Font *evas_common_font_load (const char *name, int size, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
+EVAS_API RGBA_Font *evas_common_font_add (RGBA_Font *fn, const char *name, int size, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
+EVAS_API RGBA_Font *evas_common_font_memory_add (RGBA_Font *fn, const char *source, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
+EVAS_API void evas_common_font_free (RGBA_Font *fn);
+EVAS_API void evas_common_font_int_unref (RGBA_Font_Int *fi);
+EVAS_API void evas_common_font_hinting_set (RGBA_Font *fn, Font_Hint_Flags hinting);
+EVAS_API Eina_Bool evas_common_hinting_available (Font_Hint_Flags hinting);
+EVAS_API RGBA_Font *evas_common_font_memory_hinting_load (const char *source, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
+EVAS_API RGBA_Font *evas_common_font_hinting_load (const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
+EVAS_API RGBA_Font *evas_common_font_hinting_add (RGBA_Font *fn, const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
+EVAS_API RGBA_Font *evas_common_font_memory_hinting_add (RGBA_Font *fn, const char *source, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
+EVAS_API void evas_common_font_int_modify_cache_by (RGBA_Font_Int *fi, int dir);
+EVAS_API int evas_common_font_cache_get (void);
+EVAS_API void evas_common_font_cache_set (int size);
+EVAS_API void evas_common_font_flush (void);
+EVAS_API void evas_common_font_flush_last (void);
+EVAS_API RGBA_Font_Int *evas_common_font_int_find (const char *name, int size, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
+EVAS_API void evas_common_font_all_clear (void);
+EVAS_API void evas_common_font_ext_clear (void);
/* query */
-EAPI int evas_common_font_query_kerning (RGBA_Font_Int* fi, FT_UInt left, FT_UInt right, int* kerning);
-EAPI void evas_common_font_query_size (RGBA_Font *fn, const Evas_Text_Props *intl_props, int *w, int *h);
-EAPI int evas_common_font_query_inset (RGBA_Font *fn, const Evas_Text_Props *text_props);
-EAPI int evas_common_font_query_right_inset (RGBA_Font *fn, const Evas_Text_Props *text_props);
-EAPI void evas_common_font_query_advance (RGBA_Font *fn, const Evas_Text_Props *intl_props, int *h_adv, int *v_adv);
-EAPI int evas_common_font_query_char_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch);
-EAPI int evas_common_font_query_pen_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch);
-EAPI int evas_common_font_query_char_at_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch);
-EAPI int evas_common_font_query_last_up_to_pos (RGBA_Font *fn, const Evas_Text_Props *intl_props, int x, int y, int width_offset);
-EAPI int evas_common_font_query_run_font_end_get(RGBA_Font *fn, RGBA_Font_Int **script_fi, RGBA_Font_Int **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len);
-EAPI void evas_common_font_ascent_descent_get(RGBA_Font *fn, const Evas_Text_Props *text_props, int *ascent, int *descent);
-
-EAPI void *evas_common_font_glyph_compress(void *data, int num_grays, int pixel_mode, int pitch_data, int w, int h, int *size_ret);
-EAPI DATA8 *evas_common_font_glyph_uncompress(RGBA_Font_Glyph *fg, int *wret, int *hret);
-EAPI int evas_common_font_glyph_search (RGBA_Font *fn, RGBA_Font_Int **fi_ret, Eina_Unicode gl, Eina_Unicode variation_sequence, uint32_t evas_font_search_options);
+EVAS_API int evas_common_font_query_kerning (RGBA_Font_Int* fi, FT_UInt left, FT_UInt right, int* kerning);
+EVAS_API void evas_common_font_query_size (RGBA_Font *fn, const Evas_Text_Props *intl_props, int *w, int *h);
+EVAS_API int evas_common_font_query_inset (RGBA_Font *fn, const Evas_Text_Props *text_props);
+EVAS_API int evas_common_font_query_right_inset (RGBA_Font *fn, const Evas_Text_Props *text_props);
+EVAS_API void evas_common_font_query_advance (RGBA_Font *fn, const Evas_Text_Props *intl_props, int *h_adv, int *v_adv);
+EVAS_API int evas_common_font_query_char_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch);
+EVAS_API int evas_common_font_query_pen_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch);
+EVAS_API int evas_common_font_query_char_at_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch);
+EVAS_API int evas_common_font_query_last_up_to_pos (RGBA_Font *fn, const Evas_Text_Props *intl_props, int x, int y, int width_offset);
+EVAS_API int evas_common_font_query_run_font_end_get(RGBA_Font *fn, RGBA_Font_Int **script_fi, RGBA_Font_Int **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len);
+EVAS_API void evas_common_font_ascent_descent_get(RGBA_Font *fn, const Evas_Text_Props *text_props, int *ascent, int *descent);
+
+EVAS_API void *evas_common_font_glyph_compress(void *data, int num_grays, int pixel_mode, int pitch_data, int w, int h, int *size_ret);
+EVAS_API DATA8 *evas_common_font_glyph_uncompress(RGBA_Font_Glyph *fg, int *wret, int *hret);
+EVAS_API int evas_common_font_glyph_search (RGBA_Font *fn, RGBA_Font_Int **fi_ret, Eina_Unicode gl, Eina_Unicode variation_sequence, uint32_t evas_font_search_options);
void evas_common_font_load_init(void);
void evas_common_font_load_shutdown(void);
@@ -468,7 +446,4 @@ const char *evas_font_lang_normalize(const char *lang);
void * evas_font_load(const Eina_List *font_paths, int hinting, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size, Efl_Text_Font_Bitmap_Scalable bitmap_scalable);
void evas_font_load_hinting_set(void *font, int hinting);
-#undef EAPI
-#define EAPI
-
#endif /* _EVAS_FONT_H */
diff --git a/src/lib/evas/common/evas_font_compress.c b/src/lib/evas/common/evas_font_compress.c
index 19d7219e0d..b017daecb2 100644
--- a/src/lib/evas/common/evas_font_compress.c
+++ b/src/lib/evas/common/evas_font_compress.c
@@ -402,7 +402,7 @@ decompress_bpp4(DATA8 *src, DATA8 *dst, int pitch, int w, int h)
//--------------------------------------------------------------------------
//- GENERAL ----------------------------------------------------------------
//--------------------------------------------------------------------------
-EAPI void *
+EVAS_API void *
evas_common_font_glyph_compress(void *data, int num_grays, int pixel_mode,
int pitch_data, int w, int h, int *size_ret)
{
@@ -438,7 +438,7 @@ evas_common_font_glyph_compress(void *data, int num_grays, int pixel_mode,
// this decompresses a whole block of compressed font data back to 8bit
// per pixels and deals with both 4bit RLE and 4bit packed encoding modes
-EAPI DATA8 *
+EVAS_API DATA8 *
evas_common_font_glyph_uncompress(RGBA_Font_Glyph *fg, int *wret, int *hret)
{
RGBA_Font_Glyph_Out *fgo = fg->glyph_out;
diff --git a/src/lib/evas/common/evas_font_draw.c b/src/lib/evas/common/evas_font_draw.c
index f6aa4d5424..93c493df9a 100644
--- a/src/lib/evas/common/evas_font_draw.c
+++ b/src/lib/evas/common/evas_font_draw.c
@@ -15,7 +15,7 @@ struct _Evas_Glyph
FT_UInt idx;
};
-EAPI void
+EVAS_API void
evas_common_font_draw_init(void)
{
}
@@ -80,7 +80,7 @@ _evas_font_image_draw(void *context, void *surface, void *image, RGBA_Font_Glyph
* and then for kerning we have to switch the order of the kerning query (as the prev
* is on the right, and not on the left).
*/
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_font_rgba_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y,
Evas_Glyph_Array *glyphs, RGBA_Gfx_Func func EINA_UNUSED, int ext_x, int ext_y, int ext_w,
int ext_h, int im_w, int im_h EINA_UNUSED)
@@ -105,8 +105,12 @@ evas_common_font_rgba_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y,
if ((fg->fi->bitmap_scalable & EFL_TEXT_FONT_BITMAP_SCALABLE_COLOR) &&
FT_HAS_COLOR(fg->fi->src->ft.face))
{
- w *= fg->fi->scale_factor;
- h *= fg->fi->scale_factor;
+ if ( !fg->fi->is_resized )
+ {
+ w *= fg->fi->scale_factor;
+ h *= fg->fi->scale_factor;
+ }
+
}
}
@@ -205,7 +209,7 @@ evas_common_font_fonts_unref(Evas_Font_Array *array)
free(array);
}
-EAPI void
+EVAS_API void
evas_common_font_draw_prepare(Evas_Text_Props *text_props)
{
RGBA_Font_Int *fi;
@@ -297,7 +301,7 @@ error:
eina_inarray_free(glyphs);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_font_draw_cb(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, Evas_Glyph_Array *glyphs, Evas_Common_Font_Draw_Cb cb)
{
int ext_x, ext_y, ext_w, ext_h;
@@ -371,14 +375,14 @@ evas_common_font_draw_cb(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, E
}
}
-EAPI void
+EVAS_API void
evas_common_font_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, Evas_Glyph_Array *glyphs)
{
evas_common_font_draw_cb(dst, dc, x, y, glyphs,
evas_common_font_rgba_draw);
}
-EAPI void
+EVAS_API void
evas_common_font_draw_do(const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Gfx_Func func,
RGBA_Image *dst, RGBA_Draw_Context *dc,
int x, int y, const Evas_Text_Props *text_props)
@@ -417,7 +421,7 @@ evas_common_font_draw_do(const Cutout_Rects *reuse, const Eina_Rectangle *clip,
}
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_font_draw_prepare_cutout(Cutout_Rects **reuse, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Gfx_Func *func)
{
int im_w, im_h;
@@ -441,7 +445,7 @@ evas_common_font_draw_prepare_cutout(Cutout_Rects **reuse, RGBA_Image *dst, RGBA
// this draws a compressed font glyph and decompresses on the fly as it
// draws, saving memory bandwidth and providing speedups
-EAPI void
+EVAS_API void
evas_common_font_glyph_draw(RGBA_Font_Glyph *fg,
RGBA_Draw_Context *dc,
RGBA_Image *dst_image, int dst_pitch,
@@ -453,6 +457,8 @@ evas_common_font_glyph_draw(RGBA_Font_Glyph *fg,
DATA32 coltab[16], col;
DATA16 mtab[16], v;
+ if (!dst) return;
+
// FIXME: Use dw, dh for scaling glyphs...
(void) dw;
(void) dh;
@@ -550,7 +556,7 @@ evas_common_font_glyph_draw(RGBA_Font_Glyph *fg,
ptr = dst + (x + x1) + ((y + row) * dst_pitch);
buf_ptr = buf + (row * w) + x1;
- func(buf_ptr, mask, 0, ptr, w);
+ func(buf_ptr, mask, 0, ptr, x2 - x1);
}
}
else
diff --git a/src/lib/evas/common/evas_font_draw.h b/src/lib/evas/common/evas_font_draw.h
index 2fdfc36e12..cf31d6b385 100644
--- a/src/lib/evas/common/evas_font_draw.h
+++ b/src/lib/evas/common/evas_font_draw.h
@@ -6,13 +6,13 @@
/* draw */
typedef Eina_Bool (*Evas_Common_Font_Draw_Cb)(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, Evas_Glyph_Array *glyphs, RGBA_Gfx_Func func, int ext_x, int ext_y, int ext_w, int ext_h, int im_w, int im_h);
-EAPI Eina_Bool evas_common_font_draw_cb (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, Evas_Glyph_Array *glyphs, Evas_Common_Font_Draw_Cb cb);
-EAPI void evas_common_font_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, Evas_Glyph_Array *glyphs);
-EAPI Eina_Bool evas_common_font_rgba_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, Evas_Glyph_Array *glyphs, RGBA_Gfx_Func func, int ext_x, int ext_y, int ext_w, int ext_h, int im_w, int im_h);
-EAPI void evas_common_font_draw_init (void);
-EAPI void evas_common_font_draw_prepare (Evas_Text_Props *text_props);
-EAPI void evas_common_font_draw_do (const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Gfx_Func func, RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, const Evas_Text_Props *text_props);
-EAPI Eina_Bool evas_common_font_draw_prepare_cutout (Cutout_Rects **reuse, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Gfx_Func *func);
-EAPI void evas_common_font_glyph_draw (RGBA_Font_Glyph *fg, RGBA_Draw_Context *dc, RGBA_Image *dst, int dst_pitch, int dx, int dy, int dw, int dh, int cx, int cy, int cw, int ch);
+EVAS_API Eina_Bool evas_common_font_draw_cb (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, Evas_Glyph_Array *glyphs, Evas_Common_Font_Draw_Cb cb);
+EVAS_API void evas_common_font_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, Evas_Glyph_Array *glyphs);
+EVAS_API Eina_Bool evas_common_font_rgba_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, Evas_Glyph_Array *glyphs, RGBA_Gfx_Func func, int ext_x, int ext_y, int ext_w, int ext_h, int im_w, int im_h);
+EVAS_API void evas_common_font_draw_init (void);
+EVAS_API void evas_common_font_draw_prepare (Evas_Text_Props *text_props);
+EVAS_API void evas_common_font_draw_do (const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Gfx_Func func, RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, const Evas_Text_Props *text_props);
+EVAS_API Eina_Bool evas_common_font_draw_prepare_cutout (Cutout_Rects **reuse, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Gfx_Func *func);
+EVAS_API void evas_common_font_glyph_draw (RGBA_Font_Glyph *fg, RGBA_Draw_Context *dc, RGBA_Image *dst, int dst_pitch, int dx, int dy, int dw, int dh, int cx, int cy, int cw, int ch);
#endif /* _EVAS_FONT_DRAW_H */
diff --git a/src/lib/evas/common/evas_font_load.c b/src/lib/evas/common/evas_font_load.c
index 3aa2070499..355d1f9394 100644
--- a/src/lib/evas/common/evas_font_load.c
+++ b/src/lib/evas/common/evas_font_load.c
@@ -123,7 +123,7 @@ evas_common_font_load_shutdown(void)
fonts_src = NULL;
}
-EAPI void
+EVAS_API void
evas_common_font_dpi_set(int dpi_h, int dpi_v)
{
if (dpi_v <= 0) dpi_v = dpi_h;
@@ -131,7 +131,7 @@ evas_common_font_dpi_set(int dpi_h, int dpi_v)
font_dpi_v = dpi_v;
}
-EAPI RGBA_Font_Source *
+EVAS_API RGBA_Font_Source *
evas_common_font_source_memory_load(const char *name, const void *data, int data_size)
{
int error;
@@ -174,7 +174,7 @@ evas_common_font_source_memory_load(const char *name, const void *data, int data
return fs;
}
-EAPI RGBA_Font_Source *
+EVAS_API RGBA_Font_Source *
evas_common_font_source_load(const char *name)
{
RGBA_Font_Source *fs;
@@ -228,7 +228,7 @@ evas_common_font_source_reload(RGBA_Font_Source *fs)
evas_common_font_source_load_complete(fs);
}
-EAPI int
+EVAS_API int
evas_common_font_source_load_complete(RGBA_Font_Source *fs)
{
int error;
@@ -254,7 +254,7 @@ evas_common_font_source_load_complete(RGBA_Font_Source *fs)
return error;
}
-EAPI RGBA_Font_Source *
+EVAS_API RGBA_Font_Source *
evas_common_font_source_find(const char *name)
{
RGBA_Font_Source *fs;
@@ -269,7 +269,7 @@ evas_common_font_source_find(const char *name)
return NULL;
}
-EAPI void
+EVAS_API void
evas_common_font_source_free(RGBA_Font_Source *fs)
{
fs->references--;
@@ -278,7 +278,7 @@ evas_common_font_source_free(RGBA_Font_Source *fs)
eina_hash_del(fonts_src, fs->name, fs);
}
-EAPI void
+EVAS_API void
evas_common_font_size_use(RGBA_Font *fn)
{
RGBA_Font_Int *fi;
@@ -324,7 +324,7 @@ _evas_common_font_int_cache_init(RGBA_Font_Int *fi)
LKI(fi->ft_mutex);
}
-EAPI RGBA_Font_Int *
+EVAS_API RGBA_Font_Int *
evas_common_font_int_memory_load(const char *source, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable)
{
RGBA_Font_Int *fi;
@@ -367,7 +367,7 @@ _file_path_is_file_helper(const char *path)
return 0;
}
-EAPI RGBA_Font_Int *
+EVAS_API RGBA_Font_Int *
evas_common_font_int_load(const char *name, int size,
Font_Rend_Flags wanted_rend,
Efl_Text_Font_Bitmap_Scalable bitmap_scalable)
@@ -396,7 +396,7 @@ evas_common_font_int_load(const char *name, int size,
return fi;
}
-EAPI RGBA_Font_Int *
+EVAS_API RGBA_Font_Int *
evas_common_font_int_load_init(RGBA_Font_Int *fi)
{
fi->ft.size = NULL;
@@ -405,7 +405,7 @@ evas_common_font_int_load_init(RGBA_Font_Int *fi)
return fi;
}
-EAPI RGBA_Font_Int *
+EVAS_API RGBA_Font_Int *
evas_common_font_int_load_complete(RGBA_Font_Int *fi)
{
int val, dv;
@@ -460,9 +460,14 @@ evas_common_font_int_load_complete(RGBA_Font_Int *fi)
fi->bitmap_scalable & EFL_TEXT_FONT_BITMAP_SCALABLE_COLOR)
{
if (fi->real_size > 0)
- fi->scale_factor = (float)fi->size * 64.0 / (float)fi->real_size;
+ {
+ fi->scale_factor = (double)fi->size * 64.0 / (double)fi->real_size;
+ fi->is_resized = EINA_FALSE;
+ if ((fi->scale_factor <= 0.9) && (fi->scale_factor != 0))
+ fi->is_resized = EINA_TRUE;
+ }
else
- fi->scale_factor = (float)64.0;
+ fi->scale_factor = 64.0;
}
}
}
@@ -541,7 +546,7 @@ evas_common_font_int_load_complete(RGBA_Font_Int *fi)
return fi;
}
-EAPI RGBA_Font *
+EVAS_API RGBA_Font *
evas_common_font_memory_load(const char *source, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable)
{
RGBA_Font *fn;
@@ -575,7 +580,7 @@ evas_common_font_memory_load(const char *source, const char *name, int size, con
// fn->(fi, fi, fi, ...)
// fi->fs
-EAPI RGBA_Font *
+EVAS_API RGBA_Font *
evas_common_font_load(const char *name, int size, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable)
{
RGBA_Font *fn;
@@ -617,7 +622,7 @@ evas_common_font_load(const char *name, int size, Font_Rend_Flags wanted_rend, E
return fn;
}
-EAPI RGBA_Font *
+EVAS_API RGBA_Font *
evas_common_font_add(RGBA_Font *fn, const char *name, int size, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable)
{
RGBA_Font_Int *fi;
@@ -639,7 +644,7 @@ evas_common_font_add(RGBA_Font *fn, const char *name, int size, Font_Rend_Flags
return NULL;
}
-EAPI RGBA_Font *
+EVAS_API RGBA_Font *
evas_common_font_memory_add(RGBA_Font *fn, const char *source, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable)
{
RGBA_Font_Int *fi;
@@ -662,7 +667,7 @@ evas_common_font_memory_add(RGBA_Font *fn, const char *source, const char *name,
return NULL;
}
-EAPI void
+EVAS_API void
evas_common_font_int_unref(RGBA_Font_Int *fi)
{
fi->references--;
@@ -674,7 +679,7 @@ evas_common_font_int_unref(RGBA_Font_Int *fi)
}
}
-EAPI void
+EVAS_API void
evas_common_font_free(RGBA_Font *fn)
{
Eina_List *l;
@@ -696,7 +701,7 @@ evas_common_font_free(RGBA_Font *fn)
free(fn);
}
-EAPI void
+EVAS_API void
evas_common_font_hinting_set(RGBA_Font *fn, Font_Hint_Flags hinting)
{
Eina_List *l;
@@ -712,7 +717,7 @@ evas_common_font_hinting_set(RGBA_Font *fn, Font_Hint_Flags hinting)
}
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_hinting_available(Font_Hint_Flags hinting)
{
switch (hinting)
@@ -746,7 +751,7 @@ evas_common_hinting_available(Font_Hint_Flags hinting)
return EINA_FALSE;
}
-EAPI RGBA_Font *
+EVAS_API RGBA_Font *
evas_common_font_memory_hinting_load(const char *source, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable)
{
RGBA_Font *fn;
@@ -756,7 +761,7 @@ evas_common_font_memory_hinting_load(const char *source, const char *name, int s
return fn;
}
-EAPI RGBA_Font *
+EVAS_API RGBA_Font *
evas_common_font_hinting_load(const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable)
{
RGBA_Font *fn;
@@ -766,7 +771,7 @@ evas_common_font_hinting_load(const char *name, int size, Font_Hint_Flags hintin
return fn;
}
-EAPI RGBA_Font *
+EVAS_API RGBA_Font *
evas_common_font_hinting_add(RGBA_Font *fn, const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable)
{
fn = evas_common_font_add(fn, name, size, wanted_rend, bitmap_scalable);
@@ -774,7 +779,7 @@ evas_common_font_hinting_add(RGBA_Font *fn, const char *name, int size, Font_Hin
return fn;
}
-EAPI RGBA_Font *
+EVAS_API RGBA_Font *
evas_common_font_memory_hinting_add(RGBA_Font *fn, const char *source, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend, Efl_Text_Font_Bitmap_Scalable bitmap_scalable)
{
fn = evas_common_font_memory_add(fn, source, name, size, data, data_size,
@@ -815,7 +820,7 @@ _evas_common_font_all_clear_cb(const Eina_Hash *hash EINA_UNUSED, const void *ke
return 1;
}
-EAPI void
+EVAS_API void
evas_common_font_all_clear(void)
{
eina_hash_foreach(fonts, _evas_common_font_all_clear_cb, NULL);
@@ -891,20 +896,20 @@ evas_common_font_int_reload(RGBA_Font_Int *fi)
* we then check if the cache_useage size is larger than allowed
* !If the cache is NOT too large we dont delete font_int
* !If the cache is too large we really delete font_int */
-EAPI void
+EVAS_API void
evas_common_font_int_modify_cache_by(RGBA_Font_Int *fi, int dir)
{
font_cache_usage += dir * (sizeof(RGBA_Font) + fi->usage +
sizeof(FT_FaceRec) + 16384); /* fudge values */
}
-EAPI int
+EVAS_API int
evas_common_font_cache_get(void)
{
return font_cache;
}
-EAPI void
+EVAS_API void
evas_common_font_cache_set(int size)
{
font_cache = size;
@@ -912,7 +917,7 @@ evas_common_font_cache_set(int size)
evas_common_font_int_use_trim();
}
-EAPI void
+EVAS_API void
evas_common_font_flush(void)
{
if (font_cache_usage < font_cache) return;
@@ -929,7 +934,7 @@ evas_common_font_flush(void)
/* We run this when the cache gets larger than allowed size
* We check cache size each time a fi->references goes to 0
* PERFORMS: Find font_int(s) with references == 0 and delete them */
-EAPI void
+EVAS_API void
evas_common_font_flush_last(void)
{
RGBA_Font_Int *fi = NULL;
@@ -940,7 +945,7 @@ evas_common_font_flush_last(void)
eina_hash_del(fonts, fi, fi);
}
-EAPI RGBA_Font_Int *
+EVAS_API RGBA_Font_Int *
evas_common_font_int_find(const char *name, int size,
Font_Rend_Flags wanted_rend,
Efl_Text_Font_Bitmap_Scalable bitmap_scalable)
@@ -1021,7 +1026,7 @@ _cb_hash_font_ext(const Eina_Hash *hash EINA_UNUSED,
return EINA_TRUE;
}
-EAPI void
+EVAS_API void
evas_common_font_ext_clear(void)
{
eina_hash_foreach(fonts, _cb_hash_font_ext, NULL);
diff --git a/src/lib/evas/common/evas_font_main.c b/src/lib/evas/common/evas_font_main.c
index c41e350dcf..1af8fd2862 100644
--- a/src/lib/evas/common/evas_font_main.c
+++ b/src/lib/evas/common/evas_font_main.c
@@ -13,9 +13,10 @@ LK(lock_font_draw); // for freetype2 API calls
LK(lock_bidi); // for evas bidi internal usage.
LK(lock_ot); // for evas bidi internal usage.
-int _evas_font_log_dom_global = -1;
+int _evas_font_log_dom_global = -1;
+int _evas_font_texture_cache = -1;
-EAPI void
+EVAS_API void
evas_common_font_init(void)
{
int error;
@@ -56,7 +57,7 @@ evas_common_font_init(void)
LKI(lock_ot);
}
-EAPI void
+EVAS_API void
evas_common_font_shutdown(void)
{
if (initialised < 1) return;
@@ -76,7 +77,7 @@ evas_common_font_shutdown(void)
eina_log_domain_unregister(_evas_font_log_dom_global);
}
-EAPI void
+EVAS_API void
evas_common_font_font_all_unload(void)
{
evas_common_font_all_clear();
@@ -98,7 +99,7 @@ evas_common_font_freetype_face_get(RGBA_Font *font)
return fi->src->ft.face;
}
-EAPI int
+EVAS_API int
evas_common_font_instance_ascent_get(RGBA_Font_Int *fi)
{
int val;
@@ -132,7 +133,7 @@ evas_common_font_instance_ascent_get(RGBA_Font_Int *fi)
// return ret;
}
-EAPI int
+EVAS_API int
evas_common_font_instance_descent_get(RGBA_Font_Int *fi)
{
int val;
@@ -161,7 +162,7 @@ evas_common_font_instance_descent_get(RGBA_Font_Int *fi)
// return ret;
}
-EAPI int
+EVAS_API int
evas_common_font_instance_max_ascent_get(RGBA_Font_Int *fi)
{
int val, dv;
@@ -196,7 +197,7 @@ evas_common_font_instance_max_ascent_get(RGBA_Font_Int *fi)
return ret;
}
-EAPI int
+EVAS_API int
evas_common_font_instance_max_descent_get(RGBA_Font_Int *fi)
{
int val, dv;
@@ -231,35 +232,35 @@ evas_common_font_instance_max_descent_get(RGBA_Font_Int *fi)
return ret;
}
-EAPI int
+EVAS_API int
evas_common_font_ascent_get(RGBA_Font *fn)
{
// evas_common_font_size_use(fn);
return evas_common_font_instance_ascent_get(fn->fonts->data);
}
-EAPI int
+EVAS_API int
evas_common_font_descent_get(RGBA_Font *fn)
{
// evas_common_font_size_use(fn);
return evas_common_font_instance_descent_get(fn->fonts->data);
}
-EAPI int
+EVAS_API int
evas_common_font_max_ascent_get(RGBA_Font *fn)
{
// evas_common_font_size_use(fn);
return evas_common_font_instance_max_ascent_get(fn->fonts->data);
}
-EAPI int
+EVAS_API int
evas_common_font_max_descent_get(RGBA_Font *fn)
{
// evas_common_font_size_use(fn);
return evas_common_font_instance_max_descent_get(fn->fonts->data);
}
-EAPI int
+EVAS_API int
evas_common_font_get_line_advance(RGBA_Font *fn)
{
int val;
@@ -296,7 +297,7 @@ evas_common_font_get_line_advance(RGBA_Font *fn)
// return ret;
}
-EAPI int
+EVAS_API int
evas_common_font_instance_underline_position_get(RGBA_Font_Int *fi)
{
int position = 0;
@@ -324,7 +325,7 @@ end:
return position;
}
-EAPI int
+EVAS_API int
evas_common_font_instance_underline_thickness_get(RGBA_Font_Int *fi)
{
int thickness = 0;
@@ -597,6 +598,11 @@ _glyph_free(RGBA_Font_Glyph *fg)
if ((fg->glyph_out->rle) && (fg->glyph_out->bitmap.rle_alloc))
free(fg->glyph_out->rle);
+ else if ((fg->glyph_out->bitmap.buffer) && (fg->glyph_out->bitmap.rle_alloc))
+ {
+ free(fg->glyph_out->bitmap.buffer);
+ fg->glyph_out->bitmap.buffer = NULL;
+ }
fg->glyph_out->rle = NULL;
if (!fg->glyph_out->bitmap.no_free_glout) free(fg->glyph_out);
fg->glyph_out = NULL;
@@ -706,7 +712,47 @@ _fash_gl_add(Fash_Glyph *fash, int item, RGBA_Font_Glyph *glyph)
fash->bucket[grp]->bucket[maj]->item[min] = glyph;
}
-EAPI RGBA_Font_Glyph *
+static void evas_font_glyph_load(RGBA_Font_Glyph *fg)
+{
+ if(fg->glyph) return;
+
+ RGBA_Font_Int *fi = fg->fi;
+ FT_UInt idx = fg->index;
+ FT_Error error;
+
+ const FT_Int32 hintflags[3] =
+ { FT_LOAD_NO_HINTING, FT_LOAD_FORCE_AUTOHINT, FT_LOAD_NO_AUTOHINT };
+ static FT_Matrix transform = {0x10000, _EVAS_FONT_SLANT_TAN * 0x10000,
+ 0x00000, 0x10000};
+
+ evas_common_font_int_reload(fi);
+ FTLOCK();
+ error = FT_Load_Glyph(fi->src->ft.face, idx,
+ (FT_HAS_COLOR(fi->src->ft.face) ?
+ (FT_LOAD_COLOR | hintflags[fi->hinting]) :
+ (FT_LOAD_DEFAULT | FT_LOAD_NO_BITMAP | hintflags[fi->hinting])));
+
+ FTUNLOCK();
+ if (error)
+ {
+ return;
+ }
+
+ /* Transform the outline of Glyph according to runtime_rend. */
+ if (fi->runtime_rend & FONT_REND_SLANT)
+ FT_Outline_Transform(&fi->src->ft.face->glyph->outline, &transform);
+ /* Embolden the outline of Glyph according to rundtime_rend. */
+ if (fi->runtime_rend & FONT_REND_WEIGHT)
+ FT_GlyphSlot_Embolden(fi->src->ft.face->glyph);
+
+ FTLOCK();
+ error = FT_Get_Glyph(fi->src->ft.face->glyph, &(fg->glyph));
+ FTUNLOCK();
+
+ return;
+}
+
+EVAS_API RGBA_Font_Glyph *
evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt idx)
{
RGBA_Font_Glyph *fg;
@@ -744,48 +790,60 @@ evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt idx)
/* Transform the outline of Glyph according to runtime_rend. */
if (fi->runtime_rend & FONT_REND_SLANT)
- FT_Outline_Transform(&fi->src->ft.face->glyph->outline, &transform);
+ FT_Outline_Transform(&fi->src->ft.face->glyph->outline, &transform);
/* Embolden the outline of Glyph according to rundtime_rend. */
if (fi->runtime_rend & FONT_REND_WEIGHT)
- FT_GlyphSlot_Embolden(fi->src->ft.face->glyph);
+ FT_GlyphSlot_Embolden(fi->src->ft.face->glyph);
fg = calloc(1, sizeof(RGBA_Font_Glyph));
if (!fg) return NULL;
- FTLOCK();
- error = FT_Get_Glyph(fi->src->ft.face->glyph, &(fg->glyph));
- FTUNLOCK();
- if (error)
+ if (FT_HAS_COLOR(fi->src->ft.face))
{
- free(fg);
- if (!fi->fash) fi->fash = _fash_gl_new();
- if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
- return NULL;
- }
+ fg->advance.x = fi->src->ft.face->glyph->advance.x * 1024;
+ fg->advance.y = fi->src->ft.face->glyph->advance.y * 1024;
- {
- FT_BBox outbox;
- FT_Glyph_Get_CBox(fg->glyph,
- ((fi->hinting == 0) ? FT_GLYPH_BBOX_UNSCALED :
- FT_GLYPH_BBOX_GRIDFIT),
- &outbox);
- fg->width = EVAS_FONT_ROUND_26_6_TO_INT(outbox.xMax - outbox.xMin);
- fg->x_bear = EVAS_FONT_ROUND_26_6_TO_INT(outbox.xMin);
- fg->y_bear = EVAS_FONT_ROUND_26_6_TO_INT(outbox.yMax);
+ FT_GlyphSlot slot = fi->src->ft.face->glyph;
+ fg->width = EVAS_FONT_ROUND_26_6_TO_INT(slot->metrics.width);
+ fg->x_bear = EVAS_FONT_ROUND_26_6_TO_INT(slot->metrics.horiBearingX);
+ fg->y_bear = EVAS_FONT_ROUND_26_6_TO_INT(slot->metrics.horiBearingY);
if (FT_HAS_FIXED_SIZES(fi->src->ft.face))
{
- if (FT_HAS_COLOR(fi->src->ft.face) &&
- fi->bitmap_scalable & EFL_TEXT_FONT_BITMAP_SCALABLE_COLOR)
+ if (fi->bitmap_scalable & EFL_TEXT_FONT_BITMAP_SCALABLE_COLOR)
{
- fg->glyph->advance.x *= fi->scale_factor;
- fg->glyph->advance.y *= fi->scale_factor;
+ fg->advance.x *= fi->scale_factor;
+ fg->advance.y *= fi->scale_factor;
fg->width *= fi->scale_factor;
fg->x_bear *= fi->scale_factor;
fg->y_bear *= fi->scale_factor;
}
}
}
+ else
+ {
+ FTLOCK();
+ error = FT_Get_Glyph(fi->src->ft.face->glyph, &(fg->glyph));
+ FTUNLOCK();
+ if (error)
+ {
+ free(fg);
+ if (!fi->fash) fi->fash = _fash_gl_new();
+ if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
+ return NULL;
+ }
+ fg->advance.x = fg->glyph->advance.x;
+ fg->advance.y = fg->glyph->advance.y;
+
+ FT_BBox outbox;
+ FT_Glyph_Get_CBox(fg->glyph,
+ ((fi->hinting == 0) ? FT_GLYPH_BBOX_UNSCALED :
+ FT_GLYPH_BBOX_GRIDFIT),
+ &outbox);
+ fg->width = EVAS_FONT_ROUND_26_6_TO_INT(outbox.xMax - outbox.xMin);
+ fg->x_bear = EVAS_FONT_ROUND_26_6_TO_INT(outbox.xMin);
+ fg->y_bear = EVAS_FONT_ROUND_26_6_TO_INT(outbox.yMax);
+ }
fg->index = idx;
fg->fi = fi;
@@ -797,7 +855,26 @@ evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt idx)
return fg;
}
-EAPI Eina_Bool
+EVAS_API void
+evas_font_data_cache_set(Evas_Font_Data_Cache options, int bytes)
+{
+ if ((options & EVAS_FONT_DATA_CACHE_TEXTURE) == EVAS_FONT_DATA_CACHE_TEXTURE)
+ {
+ _evas_font_texture_cache = bytes;
+ //FIXME No direct free happend until next render call
+ }
+}
+
+EVAS_API int
+evas_font_data_cache_get(Evas_Font_Data_Cache options)
+{
+ if ((options & EVAS_FONT_DATA_CACHE_TEXTURE) == EVAS_FONT_DATA_CACHE_TEXTURE)
+ return _evas_font_texture_cache;
+ else
+ return -1;
+}
+
+EVAS_API Eina_Bool
evas_common_font_int_cache_glyph_render(RGBA_Font_Glyph *fg)
{
int size;
@@ -808,7 +885,7 @@ evas_common_font_int_cache_glyph_render(RGBA_Font_Glyph *fg)
/* no cserve2 case */
if (fg->glyph_out)
return EINA_TRUE;
-
+ evas_font_glyph_load(fg);
FTLOCK();
error = FT_Glyph_To_Bitmap(&(fg->glyph), FT_RENDER_MODE_NORMAL, 0, 1);
if (error)
@@ -857,6 +934,41 @@ evas_common_font_int_cache_glyph_render(RGBA_Font_Glyph *fg)
{
fg->glyph_out->rle = NULL;
fg->glyph_out->bitmap.rle_alloc = EINA_FALSE;
+ if (fi->is_resized)
+ {
+ int w = fbg->bitmap.width;
+ int h = fbg->bitmap.rows;
+
+ RGBA_Image src = {0};
+ src.image.data = (DATA32 *) fbg->bitmap.buffer;
+ src.cache_entry.w = w;
+ src.cache_entry.h = h;
+ src.cache_entry.flags.alpha = 1;
+
+ RGBA_Image dst = {0};
+ dst.cache_entry.w = w * fi->scale_factor;
+ dst.cache_entry.h = h * fi->scale_factor;
+ dst.image.data = malloc(dst.cache_entry.w * dst.cache_entry.h * 4);
+ dst.cache_entry.flags.alpha = 1;
+
+ evas_common_scale_rgba_smooth_draw(&src, &dst,
+ 0, 0, src.cache_entry.w , src.cache_entry.h,
+ 0xffffffff, EVAS_RENDER_COPY,
+ 0, 0, src.cache_entry.w , src.cache_entry.h,
+ 0, 0, dst.cache_entry.w, dst.cache_entry.h,
+ NULL, 0, 0);
+
+ fg->glyph_out->bitmap.rows = dst.cache_entry.h;
+ fg->glyph_out->bitmap.width = dst.cache_entry.w;
+ fg->glyph_out->bitmap.buffer = (unsigned char *) dst.image.data;
+ fg->glyph_out->bitmap.pitch = dst.cache_entry.w * 4;
+
+ fg->glyph_out->rle = NULL;
+ fg->glyph_out->bitmap.rle_alloc = EINA_TRUE;
+ // this may be technically incorrect as we go and free a bitmap buffer
+ // behind the ftglyph's back...
+ FT_Bitmap_Done(evas_ft_lib, &(fbg->bitmap));
+ }
}
return EINA_TRUE;
@@ -869,7 +981,7 @@ struct _Font_Char_Index
Eina_Unicode gl;
};
-EAPI FT_UInt
+EVAS_API FT_UInt
evas_common_get_char_index(RGBA_Font_Int* fi, Eina_Unicode gl, Eina_Unicode variation_sequence)
{
static const unsigned short mapfix[] =
@@ -1008,7 +1120,7 @@ evas_common_get_char_index(RGBA_Font_Int* fi, Eina_Unicode gl, Eina_Unicode vari
*
*/
-EAPI int
+EVAS_API int
evas_common_font_glyph_search(RGBA_Font *fn, RGBA_Font_Int **fi_ret, Eina_Unicode gl, Eina_Unicode variation_sequence, uint32_t evas_font_search_options)
{
Eina_List *l;
diff --git a/src/lib/evas/common/evas_font_ot.c b/src/lib/evas/common/evas_font_ot.c
index 47c624c99a..c2297a539c 100644
--- a/src/lib/evas/common/evas_font_ot.c
+++ b/src/lib/evas/common/evas_font_ot.c
@@ -122,7 +122,7 @@ _evas_script_to_harfbuzz[] =
#ifdef OT_SUPPORT
/* FIXME: doc. returns #items */
-EAPI int
+EVAS_API int
evas_common_font_ot_cluster_size_get(const Evas_Text_Props *props, size_t char_index)
{
int i;
@@ -188,7 +188,7 @@ _evas_common_font_ot_hb_get_glyph_advance(hb_font_t *font,
fg = evas_common_font_int_cache_glyph_get(fi, glyph);
if (fg)
{
- return fg->glyph->advance.x >> 10;
+ return fg->advance.x >> 10;
}
return 0;
}
@@ -264,7 +264,7 @@ _evas_common_font_ot_shape(hb_buffer_t *buffer, RGBA_Font_Int *fi, Evas_Text_Pro
}
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_font_ot_populate_text_props(const Eina_Unicode *text,
Evas_Text_Props *props, int len,
Evas_Text_Props_Mode mode,
diff --git a/src/lib/evas/common/evas_font_ot.h b/src/lib/evas/common/evas_font_ot.h
index e38e758b00..31625a3c45 100644
--- a/src/lib/evas/common/evas_font_ot.h
+++ b/src/lib/evas/common/evas_font_ot.h
@@ -33,11 +33,12 @@ struct _Evas_Font_OT_Info
# endif
#include "evas_font.h"
+#include "Evas.h"
-EAPI int
+EVAS_API int
evas_common_font_ot_cluster_size_get(const Evas_Text_Props *props, size_t char_index);
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_font_ot_populate_text_props(const Eina_Unicode *text,
Evas_Text_Props *props, int len, Evas_Text_Props_Mode mode, const char *lang);
#endif
diff --git a/src/lib/evas/common/evas_font_private.h b/src/lib/evas/common/evas_font_private.h
index 213ef7f96f..b84b463801 100644
--- a/src/lib/evas/common/evas_font_private.h
+++ b/src/lib/evas/common/evas_font_private.h
@@ -4,7 +4,7 @@
#include "evas_font.h"
/* macros needed to log message through eina_log */
-extern EAPI int _evas_font_log_dom_global;
+EVAS_API extern int _evas_font_log_dom_global;
#ifdef _EVAS_FONT_DEFAULT_LOG_DOM
# undef _EVAS_FONT_DEFAULT_LOG_DOM
#endif
diff --git a/src/lib/evas/common/evas_font_query.c b/src/lib/evas/common/evas_font_query.c
index bab7376621..b5fd5fbe14 100644
--- a/src/lib/evas/common/evas_font_query.c
+++ b/src/lib/evas/common/evas_font_query.c
@@ -16,8 +16,8 @@
* @param[in] run_let the current run len, i.e "search limit".
* @return length of the run found.
*/
-EAPI int
-evas_common_font_query_run_font_end_get(RGBA_Font *fn, RGBA_Font_Int **script_fi, RGBA_Font_Int **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len)
+EVAS_API int
+evas_common_font_query_run_font_end_get(RGBA_Font *fn, RGBA_Font_Int **script_fi, RGBA_Font_Int **cur_fi, Evas_Script_Type script EINA_UNUSED, const Eina_Unicode *text, int run_len)
{
RGBA_Font_Int *fi = NULL;
const Eina_Unicode *run_end = text + run_len;
@@ -26,38 +26,7 @@ evas_common_font_query_run_font_end_get(RGBA_Font *fn, RGBA_Font_Int **script_fi
/* If there's no current script_fi, find it first */
if (!*script_fi)
{
- const Eina_Unicode *base_char = NULL;
- /* Skip common chars */
- for (base_char = text ;
- (base_char < run_end) &&
- (evas_common_language_char_script_get(*base_char) != script) ;
- base_char++)
- ;
- /* If counter reach variation sequence it is safe to pick default font */
- if(VAR_SEQ_SAFE(base_char) || (base_char != run_end && VAR_SEQ_SAFE((base_char+1)))) goto get_top_font;
-
- if (base_char == run_end) base_char = text;
-
- /* Find the first renderable char */
- while (base_char < run_end)
- {
- /* 0x1F is the last ASCII contral char, just a hack in
- * the meanwhile. */
- if ((*base_char > 0x1F) &&
- evas_common_font_glyph_search(fn, &fi, *base_char, 0, EVAS_FONT_SEARCH_OPTION_NONE))
- break;
- base_char++;
- }
-
-
- /* If everything else fails, at least try to find a font for the
- * replacement char */
- if (base_char == run_end)
- evas_common_font_glyph_search(fn, &fi, REPLACEMENT_CHAR, 0, EVAS_FONT_SEARCH_OPTION_NONE);
-get_top_font:
-
- if (!fi)
- fi = fn->fonts->data;
+ fi = fn->fonts->data;
*script_fi = fi;
}
@@ -68,6 +37,7 @@ get_top_font:
/* Find the longest run of the same font starting from the start position
* and update cur_fi accordingly. */
+ Eina_Unicode variation_sequence = 0;
itr = text;
while (itr < run_end)
{
@@ -85,7 +55,7 @@ get_top_font:
if (evas_common_language_char_script_get(*itr) == EVAS_SCRIPT_INHERITED)
continue;
- Eina_Unicode variation_sequence = VAR_SEQ_SAFE(itr+1);
+ variation_sequence = VAR_SEQ_SAFE(itr+1);
/* Break if either it's not in the font, or if it is in the
* script's font. */
@@ -200,7 +170,7 @@ get_top_font:
* @param[out] kerning the kerning calculated.
* @return FALSE on error, TRUE on success.
*/
-EAPI int
+EVAS_API int
evas_common_font_query_kerning(RGBA_Font_Int *fi, FT_UInt left, FT_UInt right,
int *kerning)
{
@@ -265,7 +235,7 @@ evas_common_font_query_kerning(RGBA_Font_Int *fi, FT_UInt left, FT_UInt right,
* @param text_props the string object.
* @return the calculated inset.
*/
-EAPI int
+EVAS_API int
evas_common_font_query_inset(RGBA_Font *fn EINA_UNUSED, const Evas_Text_Props *text_props)
{
if (!text_props->len) return 0;
@@ -284,7 +254,7 @@ evas_common_font_query_inset(RGBA_Font *fn EINA_UNUSED, const Evas_Text_Props *t
*
* @see evas_common_font_query_inset()
*/
-EAPI int
+EVAS_API int
evas_common_font_query_right_inset(RGBA_Font *fn EINA_UNUSED, const Evas_Text_Props *text_props)
{
const Evas_Font_Glyph_Info *gli;
@@ -317,7 +287,7 @@ evas_common_font_query_right_inset(RGBA_Font *fn EINA_UNUSED, const Evas_Text_Pr
* @param[out] ascent the calculated ascent
* @param[out] descent the calculated descent
*/
-EAPI void
+EVAS_API void
evas_common_font_ascent_descent_get(RGBA_Font *fn, const Evas_Text_Props *text_props, int *ascent, int *descent)
{
int asc = 0, desc = 0;
@@ -358,7 +328,7 @@ evas_common_font_ascent_descent_get(RGBA_Font *fn, const Evas_Text_Props *text_p
* @param[out] w the calculated width
* @param[out] h the calculated height
*/
-EAPI void
+EVAS_API void
evas_common_font_query_size(RGBA_Font *fn, const Evas_Text_Props *text_props, int *w, int *h)
{
Evas_Coord ret_w = 0;
@@ -422,7 +392,7 @@ evas_common_font_query_size(RGBA_Font *fn, const Evas_Text_Props *text_props, in
* @param[out] h_adv the calculated horizontal advance.
* @param[out] v_adv the calculated vertical advance.
*/
-EAPI void
+EVAS_API void
evas_common_font_query_advance(RGBA_Font *fn, const Evas_Text_Props *text_props, int *h_adv, int *v_adv)
{
Evas_Coord ret_adv = 0;
@@ -471,7 +441,7 @@ evas_common_font_query_advance(RGBA_Font *fn, const Evas_Text_Props *text_props,
*
* @see evas_common_font_query_pen_coords()
*/
-EAPI int
+EVAS_API int
evas_common_font_query_char_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch)
{
int asc, desc;
@@ -607,7 +577,7 @@ end:
*
* @see evas_common_font_query_char_coords()
*/
-EAPI int
+EVAS_API int
evas_common_font_query_pen_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch)
{
int asc, desc;
@@ -732,7 +702,7 @@ end:
* @param[out] ch the calculated height - CAN BE NULL
* @return the position found, -1 on failure.
*/
-EAPI int
+EVAS_API int
evas_common_font_query_char_at_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch)
{
int asc, desc;
@@ -845,7 +815,7 @@ end:
* @param width_offset the additional width only for allowing glyph's.
* @return the position found, -1 on failure.
*/
-EAPI int
+EVAS_API int
evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const Evas_Text_Props *text_props, int x, int y, int width_offset)
{
int asc, desc;
diff --git a/src/lib/evas/common/evas_image.h b/src/lib/evas/common/evas_image.h
index 281e82a616..c5a512dab6 100644
--- a/src/lib/evas/common/evas_image.h
+++ b/src/lib/evas/common/evas_image.h
@@ -2,61 +2,62 @@
#define _EVAS_IMAGE_H
-EAPI void evas_common_image_init (void);
-EAPI void evas_common_image_shutdown (void);
+EVAS_API void evas_common_image_init (void);
+EVAS_API void evas_common_image_shutdown (void);
-EAPI void evas_common_image_image_all_unload (void);
+EVAS_API void evas_common_image_image_all_unload (void);
-EAPI void evas_common_rgba_pending_unloads_cleanup (void);
-EAPI void evas_common_rgba_pending_unloads_remove (Image_Entry *ie);
+EVAS_API void evas_common_rgba_pending_unloads_cleanup (void);
+EVAS_API void evas_common_rgba_pending_unloads_remove (Image_Entry *ie);
-EAPI void evas_common_rgba_image_free (Image_Entry *ie);
-EAPI void evas_common_rgba_image_unload (Image_Entry *ie);
-EAPI void evas_common_image_colorspace_normalize (RGBA_Image *im);
-EAPI void evas_common_image_colorspace_dirty (RGBA_Image *im);
-EAPI void evas_common_image_cache_free (void); /*2*/
-EAPI void evas_common_image_premul (Image_Entry *ie); /*2*/
-EAPI void evas_common_image_set_alpha_sparse (Image_Entry *ie); /*2*/
-/* EAPI RGBA_Image *evas_common_image_alpha_create (int w, int h); */
-/* EAPI RGBA_Image *evas_common_image_create (int w, int h); */
-EAPI RGBA_Image *evas_common_image_new (unsigned int w, unsigned int h, unsigned int alpha);
-EAPI Evas_Cache_Image *evas_common_image_cache_get (void);
+EVAS_API void evas_common_rgba_image_free (Image_Entry *ie);
+EVAS_API void evas_common_rgba_image_unload (Image_Entry *ie);
+EVAS_API void evas_common_image_colorspace_normalize (RGBA_Image *im);
+EVAS_API void evas_common_image_colorspace_dirty (RGBA_Image *im);
+EVAS_API void evas_common_image_cache_free (void); /*2*/
+EVAS_API void evas_common_image_premul (Image_Entry *ie); /*2*/
+EVAS_API void evas_common_image_set_alpha_sparse (Image_Entry *ie); /*2*/
+/* EVAS_API RGBA_Image *evas_common_image_alpha_create (int w, int h); */
+/* EVAS_API RGBA_Image *evas_common_image_create (int w, int h); */
+EVAS_API RGBA_Image *evas_common_image_new (unsigned int w, unsigned int h, unsigned int alpha);
+EVAS_API Evas_Cache_Image *evas_common_image_cache_get (void);
-EAPI void evas_common_image_set_cache (unsigned int size);
-EAPI int evas_common_image_get_cache (void);
+EVAS_API void evas_common_image_set_cache (unsigned int size);
+EVAS_API int evas_common_image_get_cache (void);
-EAPI RGBA_Image *evas_common_image_line_buffer_obtain (int len);
-EAPI void evas_common_image_line_buffer_release (RGBA_Image *im);
+EVAS_API RGBA_Image *evas_common_image_line_buffer_obtain (int len);
+EVAS_API void evas_common_image_line_buffer_release (RGBA_Image *im);
-EAPI RGBA_Image *evas_common_image_alpha_line_buffer_obtain (int len);
-EAPI void evas_common_image_alpha_line_buffer_release (RGBA_Image *im);
-EAPI void evas_common_image_alpha_line_buffer_free (RGBA_Image *im);
+EVAS_API RGBA_Image *evas_common_image_alpha_line_buffer_obtain (int len);
+EVAS_API void evas_common_image_alpha_line_buffer_release (RGBA_Image *im);
+EVAS_API void evas_common_image_alpha_line_buffer_free (RGBA_Image *im);
-EAPI RGBA_Image *evas_common_load_image_from_mmap (Eina_File *f, const char *key, Evas_Image_Load_Opts *lo, int *error);
-EAPI int evas_common_save_image_to_file (RGBA_Image *im, const char *file, const char *key, int quality, int compress, const char *encoding);
+EVAS_API RGBA_Image *evas_common_load_image_from_file (const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error);
+EVAS_API RGBA_Image *evas_common_load_image_from_mmap (Eina_File *f, const char *key, Evas_Image_Load_Opts *lo, int *error);
+EVAS_API int evas_common_save_image_to_file (RGBA_Image *im, const char *file, const char *key, int quality, int compress, const char *encoding);
-EAPI void evas_common_rgba_image_scalecache_init(Image_Entry *ie);
-EAPI void evas_common_rgba_image_scalecache_shutdown(Image_Entry *ie);
-EAPI void evas_common_rgba_image_scalecache_size_set(unsigned int size);
-EAPI unsigned int evas_common_rgba_image_scalecache_size_get(void);
-EAPI void evas_common_rgba_image_scalecache_flush(void);
-EAPI void evas_common_rgba_image_scalecache_dump(void);
-EAPI void evas_common_rgba_image_scalecache_prune(void);
-EAPI Eina_Bool
+EVAS_API void evas_common_rgba_image_scalecache_init(Image_Entry *ie);
+EVAS_API void evas_common_rgba_image_scalecache_shutdown(Image_Entry *ie);
+EVAS_API void evas_common_rgba_image_scalecache_size_set(unsigned int size);
+EVAS_API unsigned int evas_common_rgba_image_scalecache_size_get(void);
+EVAS_API void evas_common_rgba_image_scalecache_flush(void);
+EVAS_API void evas_common_rgba_image_scalecache_dump(void);
+EVAS_API void evas_common_rgba_image_scalecache_prune(void);
+EVAS_API Eina_Bool
evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst,
RGBA_Draw_Context *dc, int smooth,
int src_region_x, int src_region_y,
int src_region_w, int src_region_h,
int dst_region_x, int dst_region_y,
int dst_region_w, int dst_region_h);
-EAPI void
+EVAS_API void
evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
RGBA_Draw_Context *dc, int smooth,
int src_region_x, int src_region_y,
int src_region_w, int src_region_h,
int dst_region_x, int dst_region_y,
int dst_region_w, int dst_region_h);
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_rgba_image_scalecache_do_cbs(Image_Entry *ie, RGBA_Image *dst,
RGBA_Draw_Context *dc, int smooth,
int src_region_x, int src_region_y,
@@ -67,15 +68,15 @@ EAPI Eina_Bool
Evas_Common_Scale_In_To_Out_Clip_Cb cb_smooth);
-EAPI int evas_common_load_rgba_image_module_from_file (Image_Entry *im);
-EAPI int evas_common_load_rgba_image_data_from_file (Image_Entry *im);
-EAPI double evas_common_load_rgba_image_frame_duration_from_file(Image_Entry *im, int start_frame, int frame_num);
+EVAS_API int evas_common_load_rgba_image_module_from_file (Image_Entry *im);
+EVAS_API int evas_common_load_rgba_image_data_from_file (Image_Entry *im);
+EVAS_API double evas_common_load_rgba_image_frame_duration_from_file(Image_Entry *im, int start_frame, int frame_num);
void _evas_common_rgba_image_post_surface(Image_Entry *ie);
-EAPI int _evas_common_rgba_image_surface_size(unsigned int w, unsigned int h, Evas_Colorspace cspace, /* inout */ int *l, int *r, int *t, int *b);
-EAPI int _evas_common_rgba_image_data_offset(int rx, int ry, int rw, int rh, int plane, const RGBA_Image *im);
-EAPI Eina_Bool _evas_common_rgba_image_plane_get(const RGBA_Image *im, int plane, Eina_Slice *slice);
+EVAS_API int _evas_common_rgba_image_surface_size(unsigned int w, unsigned int h, Evas_Colorspace cspace, /* inout */ int *l, int *r, int *t, int *b);
+EVAS_API int _evas_common_rgba_image_data_offset(int rx, int ry, int rw, int rh, int plane, const RGBA_Image *im);
+EVAS_API Eina_Bool _evas_common_rgba_image_plane_get(const RGBA_Image *im, int plane, Eina_Slice *slice);
-EAPI Eina_Bool evas_common_extension_can_load_get(const char *file);
+EVAS_API Eina_Bool evas_common_extension_can_load_get(const char *file);
#endif /* _EVAS_IMAGE_H */
diff --git a/src/lib/evas/common/evas_image_load.c b/src/lib/evas/common/evas_image_load.c
index a969153528..797fae37ea 100644
--- a/src/lib/evas/common/evas_image_load.c
+++ b/src/lib/evas/common/evas_image_load.c
@@ -23,49 +23,56 @@ struct ext_loader_s
static const struct ext_loader_s loaders[] =
{ /* map extensions to loaders to use for good first-guess tries */
MATCHING(".png", "png"),
-
+
MATCHING(".jpg", "jpeg"),
MATCHING(".jpeg", "jpeg"),
MATCHING(".jfif", "jpeg"),
-
+
MATCHING(".j2k", "jp2k"),
MATCHING(".jp2", "jp2k"),
MATCHING(".jpx", "jp2k"),
MATCHING(".jpf", "jp2k"),
-
+
MATCHING(".eet", "eet"),
MATCHING(".edj", "eet"),
MATCHING(".eap", "eet"),
-
+
MATCHING(".xpm", "xpm"),
-
+
MATCHING(".tiff", "tiff"),
MATCHING(".tif", "tiff"),
-
+
MATCHING(".gif", "gif"),
-
+
MATCHING(".pbm", "pmaps"),
MATCHING(".pgm", "pmaps"),
MATCHING(".ppm", "pmaps"),
MATCHING(".pnm", "pmaps"),
-
+
MATCHING(".bmp", "bmp"),
-
+
MATCHING(".tga", "tga"),
-
+
MATCHING(".wbmp", "wbmp"),
-
+
MATCHING(".webp", "webp"),
-
+
MATCHING(".ico", "ico"),
MATCHING(".cur", "ico"),
-
+
MATCHING(".psd", "psd"),
MATCHING(".tgv", "tgv"),
MATCHING(".dds", "dds"),
+ MATCHING(".avif", "avif"),
+ MATCHING(".avifs", "avif"),
+
+ MATCHING(".heif", "heif"),
+ MATCHING(".heic", "heif"),
+ // MATCHING(".avif", "heif"),
+
/* xcf - gefenric */
MATCHING(".xcf", "generic"),
MATCHING(".xcf.gz", "generic"),
@@ -93,6 +100,7 @@ static const struct ext_loader_s loaders[] =
MATCHING(".dcr", "generic"),
MATCHING(".dng", "generic"),
MATCHING(".erf", "generic"),
+ MATCHING(".fff", "generic"),
MATCHING(".k25", "generic"),
MATCHING(".kdc", "generic"),
MATCHING(".mrw", "generic"),
@@ -163,7 +171,8 @@ static const struct ext_loader_s loaders[] =
static const char *loaders_name[] =
{ /* in order of most likely needed */
"png", "jpeg", "eet", "xpm", "tiff", "gif", "svg", "webp", "pmaps",
- "bmp", "tga", "wbmp", "ico", "psd", "jp2k", "dds", "generic"
+ "bmp", "tga", "wbmp", "ico", "psd", "jp2k", "dds", "avif", "heif",
+ "generic"
};
struct evas_image_foreach_loader_data
@@ -262,7 +271,7 @@ _evas_image_foreach_loader(const Eina_Hash *hash EINA_UNUSED, const void *key EI
return r;
}
-EAPI int
+EVAS_API int
evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
{
const char *loader = NULL, *end;
@@ -388,7 +397,7 @@ _timestamp_build(Image_Timestamp *tstamp, struct stat *st)
#endif
}
-EAPI int
+EVAS_API int
evas_common_load_rgba_image_data_from_file(Image_Entry *ie)
{
void *pixels;
@@ -491,7 +500,7 @@ end:
return ret;
}
-EAPI double
+EVAS_API double
evas_common_load_rgba_image_frame_duration_from_file(Image_Entry *ie, const int start, const int frame_num)
{
Evas_Image_Load_Func *evas_image_load_func = NULL;
@@ -508,7 +517,7 @@ evas_common_load_rgba_image_frame_duration_from_file(Image_Entry *ie, const int
return -1;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_extension_can_load_get(const char *file)
{
unsigned int length;
diff --git a/src/lib/evas/common/evas_image_main.c b/src/lib/evas/common/evas_image_main.c
index e06fc9f653..a94be359e3 100644
--- a/src/lib/evas/common/evas_image_main.c
+++ b/src/lib/evas/common/evas_image_main.c
@@ -1,5 +1,5 @@
#ifdef HAVE_CONFIG_H
-# include "config.h" /* so that EAPI in Eet.h is correctly defined */
+# include "config.h" /* so that EVAS_API in Eet.h is correctly defined */
#endif
#ifdef _WIN32
@@ -79,7 +79,7 @@ static const Evas_Cache_Image_Func _evas_common_image_func =
NULL // _evas_common_rgba_image_debug
};
-EAPI int
+EVAS_API int
_evas_common_rgba_image_surface_size(unsigned int w, unsigned int h,
Evas_Colorspace cspace,
/*inout*/int *l, int *r, int *t, int *b)
@@ -152,7 +152,7 @@ _evas_common_rgba_image_surface_size(unsigned int w, unsigned int h,
#undef ALIGN_TO_PAGE
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
_evas_common_rgba_image_plane_get(const RGBA_Image *im, int plane,
Eina_Slice *slice)
{
@@ -306,7 +306,7 @@ _evas_common_rgba_image_plane_get(const RGBA_Image *im, int plane,
}
}
-EAPI int
+EVAS_API int
_evas_common_rgba_image_data_offset(int rx, int ry, int rw, int rh,
int plane, const RGBA_Image *im)
{
@@ -432,7 +432,7 @@ evas_common_rgba_image_surface_munmap(void *data, unsigned int w, unsigned int h
#endif
}
-EAPI void
+EVAS_API void
evas_common_image_init(void)
{
if (!eci) eci = evas_cache_image_init(&_evas_common_image_func);
@@ -441,7 +441,7 @@ evas_common_image_init(void)
evas_common_scalecache_init();
}
-EAPI void
+EVAS_API void
evas_common_image_shutdown(void)
{
if (--reference == 0)
@@ -468,7 +468,7 @@ evas_common_image_shutdown(void)
evas_common_scalecache_shutdown();
}
-EAPI void
+EVAS_API void
evas_common_image_image_all_unload(void)
{
evas_common_rgba_image_scalecache_dump();
@@ -570,7 +570,7 @@ evas_common_rgba_image_unload_real(Image_Entry *ie)
static Eina_List *pending_unloads = NULL;
-EAPI void
+EVAS_API void
evas_common_rgba_pending_unloads_cleanup(void)
{
Image_Entry *ie;
@@ -587,7 +587,7 @@ evas_common_rgba_pending_unloads_cleanup(void)
}
}
-EAPI void
+EVAS_API void
evas_common_rgba_pending_unloads_remove(Image_Entry *ie)
{
if (!ie->need_unload) return;
@@ -595,7 +595,7 @@ evas_common_rgba_pending_unloads_remove(Image_Entry *ie)
pending_unloads = eina_list_remove(pending_unloads, ie);
}
-EAPI void
+EVAS_API void
evas_common_rgba_image_free(Image_Entry *ie)
{
if (ie->references > 0) return;
@@ -628,7 +628,7 @@ surf_debug(void)
}
#endif
-EAPI void
+EVAS_API void
evas_common_rgba_image_unload(Image_Entry *ie)
{
if (!ie->flags.loaded) return;
@@ -886,7 +886,7 @@ evas_common_image_create(unsigned int w, unsigned int h)
return im;
}
-EAPI RGBA_Image *
+EVAS_API RGBA_Image *
evas_common_image_alpha_create(unsigned int w, unsigned int h)
{
RGBA_Image *im;
@@ -905,7 +905,7 @@ evas_common_image_alpha_create(unsigned int w, unsigned int h)
return im;
}
-EAPI RGBA_Image *
+EVAS_API RGBA_Image *
evas_common_image_new(unsigned int w, unsigned int h, unsigned int alpha)
{
if (alpha) return evas_common_image_alpha_create(w, h);
@@ -985,7 +985,7 @@ evas_common_image_colorspace_normalize(RGBA_Image *im)
#endif
}
-EAPI void
+EVAS_API void
evas_common_image_colorspace_dirty(RGBA_Image *im)
{
im->cs.dirty = 1;
@@ -1002,20 +1002,32 @@ evas_common_image_colorspace_dirty(RGBA_Image *im)
#endif
}
-EAPI void
+EVAS_API void
evas_common_image_set_cache(unsigned int size)
{
if (eci)
evas_cache_image_set(eci, size);
}
-EAPI int
+EVAS_API int
evas_common_image_get_cache(void)
{
return evas_cache_image_get(eci);
}
-EAPI RGBA_Image *
+EVAS_API RGBA_Image *
+evas_common_load_image_from_file(const char *file, const char *key,
+ Evas_Image_Load_Opts *lo, int *error)
+{
+ if (!file)
+ {
+ *error = EVAS_LOAD_ERROR_GENERIC;
+ return NULL;
+ }
+ return (RGBA_Image *) evas_cache_image_request(eci, file, key, lo, error);
+}
+
+EVAS_API RGBA_Image *
evas_common_load_image_from_mmap(Eina_File *f, const char *key,
Evas_Image_Load_Opts *lo, int *error)
{
@@ -1027,19 +1039,19 @@ evas_common_load_image_from_mmap(Eina_File *f, const char *key,
return (RGBA_Image *) evas_cache_image_mmap_request(eci, f, key, lo, error);
}
-EAPI void
+EVAS_API void
evas_common_image_cache_free(void)
{
evas_common_image_set_cache(0);
}
-EAPI Evas_Cache_Image*
+EVAS_API Evas_Cache_Image*
evas_common_image_cache_get(void)
{
return eci;
}
-EAPI RGBA_Image *
+EVAS_API RGBA_Image *
evas_common_image_line_buffer_obtain(int len)
{
if (len < 1) return NULL;
@@ -1048,19 +1060,19 @@ evas_common_image_line_buffer_obtain(int len)
return evas_common_image_create(len, 1);
}
-EAPI void
+EVAS_API void
evas_common_image_line_buffer_release(RGBA_Image *im)
{
_evas_common_rgba_image_delete(&im->cache_entry);
}
-EAPI void
+EVAS_API void
evas_common_image_line_buffer_free(RGBA_Image *im)
{
_evas_common_rgba_image_delete(&im->cache_entry);
}
-EAPI RGBA_Image *
+EVAS_API RGBA_Image *
evas_common_image_alpha_line_buffer_obtain(int len)
{
if (len < 1) return NULL;
@@ -1069,13 +1081,13 @@ evas_common_image_alpha_line_buffer_obtain(int len)
return evas_common_image_alpha_create(len, 1);
}
-EAPI void
+EVAS_API void
evas_common_image_alpha_line_buffer_release(RGBA_Image *im)
{
_evas_common_rgba_image_delete(&im->cache_entry);
}
-EAPI void
+EVAS_API void
evas_common_image_premul(Image_Entry *ie)
{
DATA32 nas = 0;
@@ -1099,7 +1111,7 @@ evas_common_image_premul(Image_Entry *ie)
ie->flags.alpha_sparse = 1;
}
-EAPI void
+EVAS_API void
evas_common_image_set_alpha_sparse(Image_Entry *ie)
{
DATA32 *s, *se;
@@ -1110,6 +1122,7 @@ evas_common_image_set_alpha_sparse(Image_Entry *ie)
if (!ie->flags.alpha) return;
s = evas_cache_image_pixels(ie);
+ if (!s) return;
se = s + (ie->w * ie->h);
while (s < se)
{
diff --git a/src/lib/evas/common/evas_image_save.c b/src/lib/evas/common/evas_image_save.c
index 9a6a7621c1..45718c5b9f 100644
--- a/src/lib/evas/common/evas_image_save.c
+++ b/src/lib/evas/common/evas_image_save.c
@@ -33,6 +33,8 @@ evas_common_save_image_to_file(RGBA_Image *im, const char *file, const char *key
saver = "webp";
if (!strcasecmp(p, "tgv"))
saver = "tgv";
+ if (!strcasecmp(p, "avif"))
+ saver = "avif";
}
if (saver)
diff --git a/src/lib/evas/common/evas_image_scalecache.c b/src/lib/evas/common/evas_image_scalecache.c
index 65cb9a3c21..709f0db41f 100644
--- a/src/lib/evas/common/evas_image_scalecache.c
+++ b/src/lib/evas/common/evas_image_scalecache.c
@@ -444,7 +444,7 @@ _cache_prune(Scaleitem *notsci, Eina_Bool copies_only)
}
#endif
-EAPI void
+EVAS_API void
evas_common_rgba_image_scalecache_size_set(unsigned int size)
{
#ifdef SCALECACHE
@@ -455,10 +455,10 @@ evas_common_rgba_image_scalecache_size_set(unsigned int size)
_cache_prune(NULL, 1);
}
SLKU(cache_lock);
-#endif
+#endif
}
-EAPI unsigned int
+EVAS_API unsigned int
evas_common_rgba_image_scalecache_size_get(void)
{
#ifdef SCALECACHE
@@ -469,10 +469,10 @@ evas_common_rgba_image_scalecache_size_get(void)
return t;
#else
return 0;
-#endif
+#endif
}
-EAPI void
+EVAS_API void
evas_common_rgba_image_scalecache_prune(void)
{
#ifdef SCALECACHE
@@ -482,7 +482,7 @@ evas_common_rgba_image_scalecache_prune(void)
#endif
}
-EAPI void
+EVAS_API void
evas_common_rgba_image_scalecache_dump(void)
{
#ifdef SCALECACHE
@@ -493,10 +493,10 @@ evas_common_rgba_image_scalecache_dump(void)
_cache_prune(NULL, 0);
max_cache_size = t;
SLKU(cache_lock);
-#endif
+#endif
}
-EAPI void
+EVAS_API void
evas_common_rgba_image_scalecache_flush(void)
{
#ifdef SCALECACHE
@@ -507,10 +507,10 @@ evas_common_rgba_image_scalecache_flush(void)
_cache_prune(NULL, 1);
max_cache_size = t;
SLKU(cache_lock);
-#endif
+#endif
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst EINA_UNUSED,
RGBA_Draw_Context *dc, int smooth,
int src_region_x, int src_region_y,
@@ -534,7 +534,7 @@ evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst EINA_
if (ret == EINA_FALSE) /* can't get image lock */
{
useconds_t slp = 1, slpt = 0;
-
+
while (slpt < 500000)
{
#ifdef _WIN32
@@ -567,7 +567,7 @@ evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst EINA_
printf("WARNING: DEADLOCK on image %p (%s)\n", im, ie->file);
}
else locked = 1;
-#endif
+#endif
if (!locked) { SLKL(im->cache.lock); locked = 1; }
use_counter++;
if ((src_region_w == dst_region_w) && (src_region_h == dst_region_h))
@@ -588,8 +588,8 @@ evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst EINA_
return EINA_FALSE;
}
SLKL(cache_lock);
- sci = _sci_find(im, dc, smooth,
- src_region_x, src_region_y, src_region_w, src_region_h,
+ sci = _sci_find(im, dc, smooth,
+ src_region_x, src_region_y, src_region_w, src_region_h,
dst_region_w, dst_region_h);
if (!sci)
{
@@ -609,7 +609,7 @@ evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst EINA_
{
if (!sci->im)
{
- if ((sci->key.dst_w < max_dimension) &&
+ if ((sci->key.dst_w < max_dimension) &&
(sci->key.dst_h < max_dimension))
{
if (sci->flop <= max_flop_count)
@@ -623,12 +623,12 @@ evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst EINA_
sci->usage++;
sci->usage_count = use_counter;
SLKU(cache_lock);
- if (sci->usage > im->cache.newest_usage)
+ if (sci->usage > im->cache.newest_usage)
im->cache.newest_usage = sci->usage;
-// INF("newset? %p %i > %i", im,
-// (int)sci->usage,
+// INF("newset? %p %i > %i", im,
+// (int)sci->usage,
// (int)im->cache.newest_usage);
- if (sci->usage_count > im->cache.newest_usage_count)
+ if (sci->usage_count > im->cache.newest_usage_count)
im->cache.newest_usage_count = sci->usage_count;
// INF(" -------------- used %8i#, %8i@", (int)sci->usage, (int)sci->usage_count);
if (locked) SLKU(im->cache.lock);
@@ -644,7 +644,7 @@ evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst EINA_
//static int noscales = 0;
#endif
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_rgba_image_scalecache_do_cbs(Image_Entry *ie, RGBA_Image *dst,
RGBA_Draw_Context *dc, int smooth,
int src_region_x, int src_region_y,
@@ -953,7 +953,7 @@ evas_common_rgba_image_scalecache_do_cbs(Image_Entry *ie, RGBA_Image *dst,
}
-EAPI void
+EVAS_API void
evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
RGBA_Draw_Context *dc, int smooth,
int src_region_x, int src_region_y,
diff --git a/src/lib/evas/common/evas_line.h b/src/lib/evas/common/evas_line.h
index a19dbd8529..d518f63939 100644
--- a/src/lib/evas/common/evas_line.h
+++ b/src/lib/evas/common/evas_line.h
@@ -3,14 +3,14 @@
typedef void (*Evas_Common_Line_Draw_Cb)(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
-EAPI void evas_common_line_point_draw (RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 color, int render_op, int x, int y, RGBA_Image *mask_ie, int mask_x, int mask_y);
+EVAS_API void evas_common_line_point_draw (RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 color, int render_op, int x, int y, RGBA_Image *mask_ie, int mask_x, int mask_y);
-EAPI void evas_common_line_init (void);
+EVAS_API void evas_common_line_init (void);
-EAPI void evas_common_line_draw_line (RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 color, int render_op, int x1, int y1, int x2, int y2, RGBA_Image *mask_ie, int mask_x, int mask_y);
-EAPI void evas_common_line_draw_line_aa (RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 color, int render_op, int x1, int y1, int x2, int y2, RGBA_Image *mask_ie, int mask_x, int mask_y);
-EAPI void evas_common_line_draw_cb (RGBA_Image *dst, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2, Evas_Common_Line_Draw_Cb cb);
-EAPI void evas_common_line_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2);
+EVAS_API void evas_common_line_draw_line (RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 color, int render_op, int x1, int y1, int x2, int y2, RGBA_Image *mask_ie, int mask_x, int mask_y);
+EVAS_API void evas_common_line_draw_line_aa (RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 color, int render_op, int x1, int y1, int x2, int y2, RGBA_Image *mask_ie, int mask_x, int mask_y);
+EVAS_API void evas_common_line_draw_cb (RGBA_Image *dst, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2, Evas_Common_Line_Draw_Cb cb);
+EVAS_API void evas_common_line_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2);
#endif /* _EVAS_LINE_H */
diff --git a/src/lib/evas/common/evas_line_main.c b/src/lib/evas/common/evas_line_main.c
index 21dd74277d..7c8072adfa 100644
--- a/src/lib/evas/common/evas_line_main.c
+++ b/src/lib/evas/common/evas_line_main.c
@@ -20,7 +20,7 @@
x1 = _tmp; \
}
-EAPI void
+EVAS_API void
evas_common_line_init(void)
{
}
@@ -37,17 +37,17 @@ _evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y)
if ((dc->clip.use) && (!IN_RECT(x, y, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h)))
return;
#ifdef HAVE_PIXMAN
-# ifdef PIXMAN_LINE
+# ifdef PIXMAN_LINE
pixman_op_t op = PIXMAN_OP_SRC;
-
+
if (dc->render_op == _EVAS_RENDER_BLEND)
op = PIXMAN_OP_OVER;
if ((dst->pixman.im) && (dc->col.pixman_color_image))
- pixman_image_composite(op, dc->col.pixman_color_image, NULL,
+ pixman_image_composite(op, dc->col.pixman_color_image, NULL,
dst->pixman.im, x, y, 0, 0, x, y, 1, 1);
else
-# endif
+# endif
#endif
{
if (dc->clip.mask)
@@ -69,7 +69,7 @@ _evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y)
}
}
-EAPI void
+EVAS_API void
evas_common_line_point_draw(RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 color, int render_op, int x, int y, RGBA_Image *mask_ie, int mask_x, int mask_y)
{
Eina_Bool no_cuse;
@@ -166,7 +166,7 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
len = x1 - x0 + 1;
p = dst->image.data + (dstw * y0) + x0;
#ifdef HAVE_PIXMAN
-# ifdef PIXMAN_LINE
+# ifdef PIXMAN_LINE
if ((dst->pixman.im) && (dc->col.pixman_color_image))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
@@ -211,7 +211,7 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
len = y1 - y0 + 1;
p = dst->image.data + (dstw * y0) + x0;
#ifdef HAVE_PIXMAN
-# ifdef PIXMAN_LINE
+# ifdef PIXMAN_LINE
if ((dst->pixman.im) && (dc->col.pixman_color_image))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
@@ -343,7 +343,7 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
}
}
#ifdef HAVE_PIXMAN
-# ifdef PIXMAN_LINE
+# ifdef PIXMAN_LINE
int pixman_x_position = x0;
int pixman_y_position = y0;
int x_unit = dstw - dst->cache_entry.w;
@@ -352,7 +352,7 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
while (len--)
{
#ifdef HAVE_PIXMAN
-# ifdef PIXMAN_LINE
+# ifdef PIXMAN_LINE
if ((dst->pixman.im) && (dc->col.pixman_color_image))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
@@ -373,7 +373,7 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i
pfunc(0, 255, color, p);
}
#ifdef HAVE_PIXMAN
-# ifdef PIXMAN_LINE
+# ifdef PIXMAN_LINE
pixman_x_position += x_unit;
pixman_y_position += 1;
# endif
@@ -747,7 +747,7 @@ _draw_render_thread_simple_line(RGBA_Image *dst, int clip_x, int clip_y, int cli
}
}
-EAPI void
+EVAS_API void
evas_common_line_draw_line(RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 color, int render_op, int x0, int y0, int x1, int y1, RGBA_Image *mask_ie, int mask_x, int mask_y)
{
int px, py, x, y, prev_x, prev_y;
@@ -1050,14 +1050,14 @@ next_x:
if (IN_RANGE(px, py, clw, clh))
{
#ifdef HAVE_PIXMAN
-# ifdef PIXMAN_LINE
+# ifdef PIXMAN_LINE
if ((dst->pixman.im) && (dc->col.pixman_color_image))
pixman_image_composite(op, dc->col.pixman_color_image,
NULL, dst->pixman.im,
pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1);
else
-# endif
+# endif
#endif
{
if (mask) pfunc(0, *mask, color, p);
@@ -1070,14 +1070,14 @@ next_y:
p += dstw;
if (mask) mask += mask_w;
#ifdef HAVE_PIXMAN
-# ifdef PIXMAN_LINE
+# ifdef PIXMAN_LINE
pix_y += pix_y_unit;
-# endif
+# endif
#endif
}
}
-EAPI void
+EVAS_API void
evas_common_line_draw_line_aa(RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 color, int render_op, int x0, int y0, int x1, int y1, RGBA_Image *mask_ie, int mask_x, int mask_y)
{
int px, py, x, y, prev_x, prev_y;
@@ -1249,7 +1249,7 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
dy = y1 - y0;
#ifdef HAVE_PIXMAN
-# ifdef PIXMAN_LINE
+# ifdef PIXMAN_LINE
int pix_x;
int pix_y;
int pix_x_unit;
@@ -1257,7 +1257,7 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
pixman_image_t *aa_mask_image;
int alpha_data_buffer;
-
+
pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
if (dc->render_op == _EVAS_RENDER_BLEND)
op = PIXMAN_OP_OVER;
@@ -1331,9 +1331,9 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
if (mask) mask += mask_w;
py += dely;
#ifdef HAVE_PIXMAN
-# ifdef PIXMAN_LINE
+# ifdef PIXMAN_LINE
pix_y += pix_y_unit;
-# endif
+# endif
#endif
}
if (!p1_in)
@@ -1351,11 +1351,11 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
if ((py) < clh)
{
#ifdef HAVE_PIXMAN
-# ifdef PIXMAN_LINE
+# ifdef PIXMAN_LINE
alpha_data_buffer = 255 - aa;
aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1,
(uint32_t *)&alpha_data_buffer, 4);
-
+
if ((dst->pixman.im) && (dc->col.pixman_color_image))
pixman_image_composite(op, dc->col.pixman_color_image,
aa_mask_image, dst->pixman.im,
@@ -1369,7 +1369,7 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
else pfunc(0, 255 - aa, color, p);
}
#ifdef HAVE_PIXMAN
-# ifdef PIXMAN_LINE
+# ifdef PIXMAN_LINE
pixman_image_unref(aa_mask_image);
# endif
#endif
@@ -1377,11 +1377,11 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
if ((py + 1) < clh)
{
#ifdef HAVE_PIXMAN
-# ifdef PIXMAN_LINE
+# ifdef PIXMAN_LINE
alpha_data_buffer = aa;
aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1,
(uint32_t *)&alpha_data_buffer, 4);
-
+
if ((dst->pixman.im) && (dc->col.pixman_color_image))
pixman_image_composite(op, dc->col.pixman_color_image,
aa_mask_image, dst->pixman.im,
@@ -1395,27 +1395,27 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x
else pfunc(0, aa, color, p + dstw);
}
#ifdef HAVE_PIXMAN
-# ifdef PIXMAN_LINE
+# ifdef PIXMAN_LINE
pixman_image_unref(aa_mask_image);
# endif
#endif
}
}
-
+
next_x:
yy += dyy;
px++;
p++;
if (mask) mask++;
#ifdef HAVE_PIXMAN
-# ifdef PIXMAN_LINE
+# ifdef PIXMAN_LINE
pix_x += pix_x_unit;
# endif
#endif
}
return;
}
-
+
/* steep: y-parametric */
SETUP_LINE_STEEP;
if (mask) mask += (py * mask_w) + px;
@@ -1423,7 +1423,7 @@ next_x:
while (py < by)
{
DATA8 aa;
-
+
x = (xx >> 16);
if (prev_x != x)
{
@@ -1455,7 +1455,7 @@ next_x:
# ifdef PIXMAN_LINE
alpha_data_buffer = 255 - aa;
aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, (uint32_t *)&alpha_data_buffer, 4);
-
+
if ((dst->pixman.im) && (dc->col.pixman_color_image))
pixman_image_composite(op, dc->col.pixman_color_image,
aa_mask_image, dst->pixman.im,
@@ -1473,14 +1473,14 @@ next_x:
pixman_image_unref(aa_mask_image);
# endif
#endif
-
+
}
if ((px + 1) < clw)
{
#ifdef HAVE_PIXMAN
# ifdef PIXMAN_LINE
alpha_data_buffer = aa;
- aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1,
+ aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1,
(uint32_t *)&alpha_data_buffer, 4);
if ((dst->pixman.im) && (dc->col.pixman_color_image))
@@ -1515,7 +1515,7 @@ next_x:
}
}
-EAPI void
+EVAS_API void
evas_common_line_draw_cb(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1, Evas_Common_Line_Draw_Cb cb)
{
int x, y, w, h;
@@ -1573,7 +1573,7 @@ evas_common_line_draw_cb(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0,
dc->clip.h = ch;
}
-EAPI void
+EVAS_API void
evas_common_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
{
Evas_Common_Line_Draw_Cb cb;
diff --git a/src/lib/evas/common/evas_map_image.c b/src/lib/evas/common/evas_map_image.c
index dbd981750f..19eb165052 100644
--- a/src/lib/evas/common/evas_map_image.c
+++ b/src/lib/evas/common/evas_map_image.c
@@ -188,43 +188,43 @@ _calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy
x = p[e1].x + temp; // intersected x point
-/*
+/*
// FIXME: 3d accuracy here
// XXX t needs adjusting. above its a linear interp point
// only.
- //
+ //
// // FIXME: do in fixed pt. reduce divides
evas_common_cpu_end_opt();
- //
+ //
int foc = 512, z0 = 0, px = 320, py = 240; // FIXME: need from map points
//
float focf, hf;
float z1, z2, y1, y2, dz, dy, zt, dydz, yt;
-
+
focf = foc;
hf = h;
-
+
// adjust for fixed point and focal length and z0 for map
z1 = (p[e1].z >> FP) - z0 + foc;
z2 = (p[e2].z >> FP) - z0 + foc;
// deltas
dz = z1 - z2;
-
+
if (dz != 0)
{
int pt;
-
+
// adjust for perspective point (being 0 0)
y1 = (p[e1].y >> FP) - py;
y2 = (p[e2].y >> FP) - py;
-
+
// correct for x &y not being in world coords - screen coords
y1 = (y1 * z1) / focf;
y2 = (y2 * z2) / focf;
-
+
// deltas
dy = y1 - y2;
-
+
yt = y - py;
dydz = dy / dz;
@@ -416,7 +416,7 @@ struct _RGBA_Map_Cutout
RGBA_Map_Spans spans[1];
};
-EAPI void
+EVAS_API void
evas_common_map_rgba_clean(RGBA_Map *m)
{
RGBA_Map_Cutout *spans = m->engine_data;
@@ -506,14 +506,14 @@ _evas_common_map_rgba_span(RGBA_Map_Spans *span,
{
if (p[i].y > ybottom) ybottom = p[i].y;
}
-
+
// convert to screen space from fixed point
ytop = ytop >> FP;
ybottom = ybottom >> FP;
-
+
// if its outside the clip vertical bounds - don't bother
if ((ytop >= (cy + ch)) || (ybottom < cy)) return;
-
+
// limit to the clip vertical bounds
if (ytop < cy) span->ystart = cy;
else span->ystart = ytop;
@@ -529,12 +529,12 @@ _evas_common_map_rgba_span(RGBA_Map_Spans *span,
if (p[i].u < 0) p[i].u = 0;
else if (p[i].u > (int)(sw << FP))
p[i].u = src->cache_entry.w << FP;
-
+
if (p[i].v < 0) p[i].v = 0;
else if (p[i].v > (int)(sw << FP))
p[i].v = src->cache_entry.h << FP;
}
-
+
// allocate some spans to hold out span list
if (span->size < (span->yend - span->ystart + 1))
{
@@ -555,7 +555,7 @@ _evas_common_map_rgba_span(RGBA_Map_Spans *span,
}
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_map_rgba_prepare(RGBA_Image *src, RGBA_Image *dst,
RGBA_Draw_Context *dc,
RGBA_Map *m)
@@ -651,7 +651,7 @@ evas_common_map_rgba_prepare(RGBA_Image *src, RGBA_Image *dst,
# undef SCALE_USING_NEON
#endif
-//#include "evas_map_image_internal_high.c"
+#include "evas_map_image_internal_high.c"
#ifdef BUILD_MMX
void evas_common_map_rgba_internal_mmx(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Map_Point *p, int smooth, int level)
@@ -683,7 +683,6 @@ void evas_common_map_rgba_internal_mmx(RGBA_Image *src, RGBA_Image *dst, RGBA_Dr
}
#endif
-#if 0
void evas_common_map_rgba_internal_high(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Map_Point *p, int smooth, int level)
{
int clip_x, clip_y, clip_w, clip_h;
@@ -711,7 +710,6 @@ void evas_common_map_rgba_internal_high(RGBA_Image *src, RGBA_Image *dst, RGBA_D
p, smooth, dc->anti_alias, level,
dc->clip.mask, dc->clip.mask_x, dc->clip.mask_y);
}
-#endif
void evas_common_map_rgba_internal(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Map_Point *p, int smooth, int level)
{
@@ -771,7 +769,7 @@ void evas_common_map_rgba_internal_neon(RGBA_Image *src, RGBA_Image *dst, RGBA_D
}
#endif
-EAPI void
+EVAS_API void
evas_common_map_rgba_cb(RGBA_Image *src, RGBA_Image *dst,
RGBA_Draw_Context *dc,
int npoints EINA_UNUSED, RGBA_Map_Point *p,
@@ -814,7 +812,7 @@ evas_common_map_rgba_cb(RGBA_Image *src, RGBA_Image *dst,
dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_map_thread_rgba_cb(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Map *map, int smooth, int level, int offset, Evas_Common_Map_Thread_RGBA_Cb cb)
{
Cutout_Rect *r;
@@ -858,7 +856,7 @@ evas_common_map_thread_rgba_cb(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Conte
return ret;
}
-EAPI void
+EVAS_API void
evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst,
RGBA_Draw_Context *dc,
int npoints, RGBA_Map_Point *p,
@@ -866,13 +864,11 @@ evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst,
{
Evas_Common_Map_RGBA_Cb cb;
-#if 0
if (dc->anti_alias && smooth)
{
cb = evas_common_map_rgba_internal_high;
}
else
-#endif
{
#ifdef BUILD_MMX
int mmx, sse, sse2;
@@ -893,11 +889,10 @@ evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst,
evas_common_map_rgba_cb(src, dst, dc, npoints, p, smooth, level, cb);
}
-EAPI void
+EVAS_API void
evas_common_map_rgba_draw(RGBA_Image *src, RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 mul_col, int render_op, int npoints EINA_UNUSED, RGBA_Map_Point *p, int smooth, Eina_Bool anti_alias, int level, RGBA_Image *mask_ie, int mask_x, int mask_y)
{
//The best quaility requsted.
-#if 0
if (anti_alias && smooth)
{
_evas_common_map_rgba_internal_high(src, dst,
@@ -907,7 +902,6 @@ evas_common_map_rgba_draw(RGBA_Image *src, RGBA_Image *dst, int clip_x, int clip
mask_ie, mask_x, mask_y);
}
else
-#endif
{
#ifdef BUILD_MMX
int mmx, sse, sse2;
@@ -938,7 +932,7 @@ evas_common_map_rgba_draw(RGBA_Image *src, RGBA_Image *dst, int clip_x, int clip
}
}
-EAPI void
+EVAS_API void
evas_common_map_rgba_do(const Eina_Rectangle *clip,
RGBA_Image *src, RGBA_Image *dst,
RGBA_Draw_Context *dc,
@@ -956,7 +950,7 @@ evas_common_map_rgba_do(const Eina_Rectangle *clip,
#ifdef BUILD_MMX
evas_common_cpu_can_do(&mmx, &sse, &sse2);
-#endif
+#endif
spans = m->engine_data;
rects = spans->rects;
diff --git a/src/lib/evas/common/evas_map_image.h b/src/lib/evas/common/evas_map_image.h
index 2bca78b0a2..3c46aec07c 100644
--- a/src/lib/evas/common/evas_map_image.h
+++ b/src/lib/evas/common/evas_map_image.h
@@ -4,34 +4,34 @@
typedef void (*Evas_Common_Map_RGBA_Cb) (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Map_Point *p, int smooth, int level);
typedef Eina_Bool (*Evas_Common_Map_Thread_RGBA_Cb) (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Map *map, int smooth, int level, int offset);
-EAPI void
+EVAS_API void
evas_common_map_rgba_cb(RGBA_Image *src, RGBA_Image *dst,
RGBA_Draw_Context *dc,
int npoints, RGBA_Map_Point *points,
int smooth, int level,
Evas_Common_Map_RGBA_Cb cb);
-EAPI Eina_Bool evas_common_map_thread_rgba_cb(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Map *map, int smooth, int level, int offset, Evas_Common_Map_Thread_RGBA_Cb cb);
+EVAS_API Eina_Bool evas_common_map_thread_rgba_cb(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Map *map, int smooth, int level, int offset, Evas_Common_Map_Thread_RGBA_Cb cb);
-EAPI void
+EVAS_API void
evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst,
RGBA_Draw_Context *dc,
int npoints, RGBA_Map_Point *points,
int smooth, int level);
-EAPI void evas_common_map_rgba_draw(RGBA_Image *src, RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 mul_col, int render_op, int npoints, RGBA_Map_Point *p, int smooth, Eina_Bool anti_alias, int level, RGBA_Image *mask_ie, int mask_x, int mask_y);
+EVAS_API void evas_common_map_rgba_draw(RGBA_Image *src, RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 mul_col, int render_op, int npoints, RGBA_Map_Point *p, int smooth, Eina_Bool anti_alias, int level, RGBA_Image *mask_ie, int mask_x, int mask_y);
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_map_rgba_prepare(RGBA_Image *src, RGBA_Image *dst,
RGBA_Draw_Context *dc,
RGBA_Map *m);
-EAPI void
+EVAS_API void
evas_common_map_rgba_do(const Eina_Rectangle *clip,
RGBA_Image *src, RGBA_Image *dst,
RGBA_Draw_Context *dc,
const RGBA_Map *m,
int smooth, int level);
-EAPI void
+EVAS_API void
evas_common_map_rgba_clean(RGBA_Map *m);
#endif /* _EVAS_MAP_H */
diff --git a/src/lib/evas/common/evas_map_image_core.c b/src/lib/evas/common/evas_map_image_core.c
index 14c46aa141..5e20fe7851 100644
--- a/src/lib/evas/common/evas_map_image_core.c
+++ b/src/lib/evas/common/evas_map_image_core.c
@@ -76,7 +76,7 @@
c2 = span->col[1]; // col
cv = 0; // col
cd = (255 << 16) / w; // col
-
+
if (c1 == c2)
{
if (c1 == 0xffffffff)
diff --git a/src/lib/evas/common/evas_map_image_internal_high.c b/src/lib/evas/common/evas_map_image_internal_high.c
index 3d23782f63..ecd08026d2 100644
--- a/src/lib/evas/common/evas_map_image_internal_high.c
+++ b/src/lib/evas/common/evas_map_image_internal_high.c
@@ -87,7 +87,7 @@ _map_aa_edge_calc_internal(AALine *spans, int eidx, int ystart, int yend)
{
int y = 0;
Evas_Coord_Point p_edge = {-1, -1}; //previous edge point
- Evas_Coord_Point edge_diff = {0, 0}; //temporary used for point distance
+ Evas_Coord_Point edge_diff = {0, 0}; //temporary used for point distance
/* store bigger to tx[0] between prev and current edge's x positions. */
int tx[2] = {0, 0};
@@ -391,8 +391,8 @@ _map_triangle_draw_linear(RGBA_Image *src, RGBA_Image *dst,
if (aa_spans->lines[ay].x[0] > x1) aa_spans->lines[ay].x[0] = x1;
if (aa_spans->lines[ay].x[1] < x2) aa_spans->lines[ay].x[1] = x2;
}
-
if ((x2 - x1) < 1) goto next;
+ if ((x1 >= (cx + cw)) || (x2 <= cx)) goto next;
//Perform subtexel pre-stepping on UV
dx = 1 - (_xa - x1);
@@ -587,7 +587,7 @@ _map_triangle_draw(RGBA_Image *src, RGBA_Image *dst,
denom = ((x[2] - x[0]) * (y[1] - y[0]) - (x[1] - x[0]) * (y[2] - y[0]));
//Skip poly if it's an infinitely thin line
- if (denom == 0) return;
+ if (EINA_DBL_EQ(denom, 0)) return;
denom = 1 / denom; //Reciprocal for speeding up
dudx = ((u[2] - u[0]) * (y[1] - y[0]) - (u[1] - u[0]) * (y[2] - y[0])) * denom;
@@ -619,8 +619,8 @@ _map_triangle_draw(RGBA_Image *src, RGBA_Image *dst,
//Determine which side of the polygon the longer edge is on
side = (dxdy[1] > dxdy[0]) ? EINA_TRUE:EINA_FALSE;
- if (y[0] == y[1]) side = x[0] > x[1];
- if (y[1] == y[2]) side = x[2] > x[1];
+ if (EINA_DBL_EQ(y[0], y[1])) side = x[0] > x[1];
+ if (EINA_DBL_EQ(y[1], y[2])) side = x[2] > x[1];
//Longer edge is on the left side
if (!side)
@@ -763,7 +763,7 @@ _evas_common_map_rgba_internal_high(RGBA_Image *src, RGBA_Image *dst,
DATA32 c[4];
RGBA_Gfx_Func func = NULL;
RGBA_Gfx_Func func2 = NULL;
- DATA32 *tbuf = NULL; //Temporarily used span buffer
+ DATA32 *tbuf = NULL; //Temporarily used span buffer
Eina_Bool have_alpha = EINA_FALSE;
Eina_Bool src_alpha = src->cache_entry.flags.alpha;
Eina_Bool ssrc_alpha = src->cache_entry.flags.alpha_sparse;
@@ -773,8 +773,8 @@ _evas_common_map_rgba_internal_high(RGBA_Image *src, RGBA_Image *dst,
//FIXME: we cannot apply anti_aliasing per polygons.
anti_alias = EINA_FALSE;
- /* Prepare points data.
- Convert to float,
+ /* Prepare points data.
+ Convert to float,
shift XY coordinates to match the sub-pixeling technique.
Check alpha transparency. */
for (int i = 0; i < 4; i++)
@@ -844,7 +844,7 @@ _evas_common_map_rgba_internal_high(RGBA_Image *src, RGBA_Image *dst,
}
#endif
- /*
+ /*
1 polygon is consisted of 2 triangles, 4 polygons constructs 1 mesh.
below figure illustrates vert[9] index info.
If you need better quality, please divide a mesh by more number of triangles.
diff --git a/src/lib/evas/common/evas_op_blend/op_blend_mask_color_neon.c b/src/lib/evas/common/evas_op_blend/op_blend_mask_color_neon.c
index 2a86d271cb..78f58b5315 100644
--- a/src/lib/evas/common/evas_op_blend/op_blend_mask_color_neon.c
+++ b/src/lib/evas/common/evas_op_blend/op_blend_mask_color_neon.c
@@ -9,7 +9,7 @@
do { \
static int _foo = 0; \
if (_foo++%10000 ==0) \
- printf("%s %+d %s: %d (%s)\n",__FILE__,__LINE__,__FUNCTION__,\
+ printf("%s %+d %s: %d (%s)\n",__FILE__,__LINE__,__func__,\
_foo, x " optimised");\
} while (0)
#else
diff --git a/src/lib/evas/common/evas_op_blend/op_blend_mask_color_sse3.c b/src/lib/evas/common/evas_op_blend/op_blend_mask_color_sse3.c
index 576220db2d..2879637157 100644
--- a/src/lib/evas/common/evas_op_blend/op_blend_mask_color_sse3.c
+++ b/src/lib/evas/common/evas_op_blend/op_blend_mask_color_sse3.c
@@ -174,7 +174,7 @@ init_blend_mask_color_span_funcs_sse3(void)
op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_mas_can_dp_sse3;
op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_mas_caa_dp_sse3;
-// FIXME: BUGGY BUGGY Core i5 2500 (64bit), gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text)
+// FIXME: BUGGY BUGGY Core i5 2500 (64bit), gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text)
// op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_mas_c_dpan_sse3;
op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_mas_cn_dpan_sse3;
op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_mas_can_dpan_sse3;
diff --git a/src/lib/evas/common/evas_op_blend/op_blend_master_sse3.c b/src/lib/evas/common/evas_op_blend/op_blend_master_sse3.c
index 6065054c15..97413575db 100644
--- a/src/lib/evas/common/evas_op_blend/op_blend_master_sse3.c
+++ b/src/lib/evas/common/evas_op_blend/op_blend_master_sse3.c
@@ -1,10 +1,10 @@
#define NEED_SSE3 1
#include "Eina.h"
-
+#include "Evas.h"
#include "evas_common_types.h"
-EAPI void evas_common_cpu_end_opt(void);
+EXPORTAPI void evas_common_cpu_end_opt(void);
#include "config.h"
#include "evas_blend_ops.h"
@@ -47,7 +47,7 @@ evas_common_op_blend_init_sse3(void)
init_blend_pixel_mask_pt_funcs_sse3();
init_blend_color_pt_funcs_sse3();
init_blend_mask_color_pt_funcs_sse3();
-#endif
+#endif
}
void
@@ -65,7 +65,7 @@ evas_common_op_blend_rel_init_sse3(void)
init_blend_rel_pixel_mask_pt_funcs_sse3();
init_blend_rel_color_pt_funcs_sse3();
init_blend_rel_mask_color_pt_funcs_sse3();
-#endif
+#endif
}
//#pragma GCC push_options
@@ -75,10 +75,10 @@ evas_common_op_sse3_test(void)
{
#ifdef BUILD_SSE3
DATA32 s[64] = {0x11883399}, d[64] = {0xff88cc33};
-
+
s[0] = rand(); d[1] = rand();
_op_blend_pas_dp_sse3(s, NULL, 0, d, 64);
evas_common_cpu_end_opt();
-#endif
+#endif
}
//#pragma GCC pop_options
diff --git a/src/lib/evas/common/evas_op_blend/op_blend_pixel_i386.c b/src/lib/evas/common/evas_op_blend/op_blend_pixel_i386.c
index 66771668cf..9e054d010b 100644
--- a/src/lib/evas/common/evas_op_blend/op_blend_pixel_i386.c
+++ b/src/lib/evas/common/evas_op_blend/op_blend_pixel_i386.c
@@ -26,7 +26,7 @@ static void
_op_blend_pas_dp_mmx(DATA32 *s, DATA8 *m EINA_UNUSED, DATA32 c EINA_UNUSED, DATA32 *d, int l) {
_op_blend_p_dp_mmx(s, m, c, d, l);
return;
-/*
+/*
DATA32 *e = d + l;
pxor_r2r(mm0, mm0);
MOV_A2R(ALPHA_256, mm6)
diff --git a/src/lib/evas/common/evas_op_blend/op_blend_pixel_neon.c b/src/lib/evas/common/evas_op_blend/op_blend_pixel_neon.c
index af0a893510..31ad6b21ba 100644
--- a/src/lib/evas/common/evas_op_blend/op_blend_pixel_neon.c
+++ b/src/lib/evas/common/evas_op_blend/op_blend_pixel_neon.c
@@ -245,7 +245,7 @@ _op_blend_p_dp_neon(DATA32 *s, DATA8 *m EINA_UNUSED, DATA32 c EINA_UNUSED, DATA3
"vldm %[s]!, {d0,d1,d2,d3) \n\t"
"vldm %[d], {d4,d5,d6,d7} \n\t"
"pld [%[s], #64] \n\t"
-
+
// Copy s.a into q2 (>> 24) & subtract from 255
"vmvn.u8 q4, q0 \n\t"
@@ -302,7 +302,7 @@ _op_blend_p_dp_neon(DATA32 *s, DATA8 *m EINA_UNUSED, DATA32 c EINA_UNUSED, DATA3
"sub %[tmp],%[e],$0x7 \n\t"
AP "dualloop2int: \n\t"
//** Trailing double
-
+
"vldm %[s]!, {d0} \n\t"
"vldm %[d], {d4} \n\t"
diff --git a/src/lib/evas/common/evas_op_blend_main_.c b/src/lib/evas/common/evas_op_blend_main_.c
index 035f4018fa..c7b629346d 100644
--- a/src/lib/evas/common/evas_op_blend_main_.c
+++ b/src/lib/evas/common/evas_op_blend_main_.c
@@ -112,7 +112,7 @@ op_blend_init(void)
init_blend_pixel_mask_span_funcs_mmx(); // FIXME
init_blend_color_span_funcs_mmx();
init_blend_mask_color_span_funcs_mmx();
-
+
init_blend_pixel_pt_funcs_mmx();
init_blend_pixel_color_pt_funcs_mmx();
init_blend_pixel_mask_pt_funcs_mmx();
@@ -128,7 +128,7 @@ op_blend_init(void)
init_blend_pixel_mask_span_funcs_neon(); // FIXME
init_blend_color_span_funcs_neon();
init_blend_mask_color_span_funcs_neon();
-
+
init_blend_pixel_pt_funcs_neon();
init_blend_pixel_color_pt_funcs_neon();
init_blend_pixel_mask_pt_funcs_neon();
diff --git a/src/lib/evas/common/evas_op_copy/op_copy_color_.c b/src/lib/evas/common/evas_op_copy/op_copy_color_.c
index 3dc5582f6e..c8e46ae792 100644
--- a/src/lib/evas/common/evas_op_copy/op_copy_color_.c
+++ b/src/lib/evas/common/evas_op_copy/op_copy_color_.c
@@ -32,7 +32,7 @@ init_copy_color_span_funcs_c(void)
op_copy_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_can_dpan;
op_copy_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_caa_dpan;
}
-
+
static void
_op_copy_pt_c_dp(DATA32 s EINA_UNUSED, DATA8 m EINA_UNUSED, DATA32 c, DATA32 *d) {
*d = c;
diff --git a/src/lib/evas/common/evas_op_copy/op_copy_pixel_mask_.c b/src/lib/evas/common/evas_op_copy/op_copy_pixel_mask_.c
index 5a861b2590..12c2dace3a 100644
--- a/src/lib/evas/common/evas_op_copy/op_copy_pixel_mask_.c
+++ b/src/lib/evas/common/evas_op_copy/op_copy_pixel_mask_.c
@@ -1,6 +1,6 @@
/* copy pixel x mask --> dst */
-static void
+static void
_op_copy_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c EINA_UNUSED, DATA32 *d, int l) {
DATA32 *e;
int color;
diff --git a/src/lib/evas/common/evas_op_copy/op_copy_pixel_mask_i386.c b/src/lib/evas/common/evas_op_copy/op_copy_pixel_mask_i386.c
index a10289d4d8..ae30339233 100644
--- a/src/lib/evas/common/evas_op_copy/op_copy_pixel_mask_i386.c
+++ b/src/lib/evas/common/evas_op_copy/op_copy_pixel_mask_i386.c
@@ -86,7 +86,7 @@ init_copy_pixel_mask_pt_funcs_mmx(void)
/* copy_rel pixel x mask --> dst */
#ifdef BUILD_MMX
-static void
+static void
_op_copy_rel_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c EINA_UNUSED, DATA32 *d, int l) {
DATA32 *e = d + l;
pxor_r2r(mm0, mm0);
@@ -139,7 +139,7 @@ init_copy_rel_pixel_mask_span_funcs_mmx(void)
#endif
#ifdef BUILD_MMX
-static void
+static void
_op_copy_rel_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
c = m + 1;
pxor_r2r(mm0, mm0);
diff --git a/src/lib/evas/common/evas_op_copy/op_copy_pixel_mask_neon.c b/src/lib/evas/common/evas_op_copy/op_copy_pixel_mask_neon.c
index f6a9528a3c..c3b35ee8c8 100644
--- a/src/lib/evas/common/evas_op_copy/op_copy_pixel_mask_neon.c
+++ b/src/lib/evas/common/evas_op_copy/op_copy_pixel_mask_neon.c
@@ -76,7 +76,7 @@ init_copy_pixel_mask_pt_funcs_neon(void)
/* copy_rel pixel x mask --> dst */
#ifdef BUILD_NEON
-static void
+static void
_op_copy_rel_p_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c EINA_UNUSED, DATA32 *d, int l) {
// FIXME: neon-it
DATA32 *e;
@@ -122,7 +122,7 @@ init_copy_rel_pixel_mask_span_funcs_neon(void)
#endif
#ifdef BUILD_NEON
-static void
+static void
_op_copy_rel_pt_p_mas_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
c = MUL_SYM(*d >> 24, s);
*d = INTERP_256(m + 1, c, *d);
diff --git a/src/lib/evas/common/evas_op_copy/op_copy_pixel_neon.c b/src/lib/evas/common/evas_op_copy/op_copy_pixel_neon.c
index c2eb12dae2..d2703c19d5 100644
--- a/src/lib/evas/common/evas_op_copy/op_copy_pixel_neon.c
+++ b/src/lib/evas/common/evas_op_copy/op_copy_pixel_neon.c
@@ -13,8 +13,8 @@ _op_copy_p_dp_neon(DATA32 *s, DATA8 *m EINA_UNUSED, DATA32 c EINA_UNUSED, DATA32
if (e > d)
{
int dl;
-
- asm volatile
+
+ asm volatile
(".fpu neon \n\t"
"_op_copy_p_dp_neon_asmloop: \n\t"
"pld [%[s], #192] \n\t" // preload 256 bytes ahead
@@ -31,12 +31,12 @@ _op_copy_p_dp_neon(DATA32 *s, DATA8 *m EINA_UNUSED, DATA32 c EINA_UNUSED, DATA32
: /*in */ [s] "r" (s), [e] "r" (e), [d] "r" (d)
: /*clobber*/
"q0", "q1", "q2","q3", "q4", "q5", "q6",
- "d0", "d1", "d2", "d3",
- "d4", "d5", "d6", "d7",
+ "d0", "d1", "d2", "d3",
+ "d4", "d5", "d6", "d7",
"d8", "d9", "d10", "d11",
"memory" // clobbered
);
- dl = l % 24; // dl is how many pixels at end that is not a multiple of 24
+ dl = l % 24; // dl is how many pixels at end that is not a multiple of 24
l = l - dl; // jump to there at the end of the run?
s = s + l;
d = d + l;
diff --git a/src/lib/evas/common/evas_op_mask/op_mask_pixel_mask_.c b/src/lib/evas/common/evas_op_mask/op_mask_pixel_mask_.c
index c6f08a98e5..10e8b8a705 100644
--- a/src/lib/evas/common/evas_op_mask/op_mask_pixel_mask_.c
+++ b/src/lib/evas/common/evas_op_mask/op_mask_pixel_mask_.c
@@ -1,6 +1,6 @@
/* mask pixel x mask --> dst */
-static void
+static void
_op_mask_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c EINA_UNUSED, DATA32 *d, int l) {
DATA32 *e = d + l;
while (d < e) {
@@ -36,7 +36,7 @@ init_mask_pixel_mask_span_funcs_c(void)
op_mask_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_pas_mas_dpan;
}
-static void
+static void
_op_mask_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c EINA_UNUSED, DATA32 *d) {
s = 256 - (((256 - (s >> 24)) * m) >> 8);
*d = MUL_256(s, *d);
diff --git a/src/lib/evas/common/evas_pipe.c b/src/lib/evas/common/evas_pipe.c
index 55e551ba50..3260752b9c 100644
--- a/src/lib/evas/common/evas_pipe.c
+++ b/src/lib/evas/common/evas_pipe.c
@@ -218,7 +218,7 @@ evas_common_pipe_begin(RGBA_Image *im)
eina_barrier_wait(&(thbarrier[0]));
}
-EAPI void
+EVAS_API void
evas_common_pipe_flush(RGBA_Image *im)
{
if (!im->cache_entry.pipe) return;
@@ -252,7 +252,7 @@ evas_common_pipe_flush(RGBA_Image *im)
evas_common_pipe_free(im);
}
-EAPI void
+EVAS_API void
evas_common_pipe_free(RGBA_Image *im)
{
@@ -311,7 +311,7 @@ evas_common_pipe_rectangle_prepare(void *data, RGBA_Image *dst, RGBA_Pipe_Op *op
return r;
}
-EAPI void
+EVAS_API void
evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h)
{
RGBA_Pipe_Op *op;
@@ -343,7 +343,7 @@ evas_common_pipe_line_draw_do(RGBA_Image *dst, const RGBA_Pipe_Op *op, const RGB
op->op.line.x1, op->op.line.y1);
}
-EAPI void
+EVAS_API void
evas_common_pipe_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
int x0, int y0, int x1, int y1)
{
@@ -391,7 +391,7 @@ evas_common_pipe_poly_draw_do(RGBA_Image *dst, const RGBA_Pipe_Op *op, const RGB
op->op.poly.points, op->op.poly.x, op->op.poly.y);
}
-EAPI void
+EVAS_API void
evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
RGBA_Polygon_Point *points, int x, int y)
{
@@ -457,7 +457,7 @@ evas_common_pipe_text_draw_prepare(void *data, RGBA_Image *dst, RGBA_Pipe_Op *op
return r;
}
-EAPI void
+EVAS_API void
evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
int x, int y, Evas_Text_Props *intl_props)
{
@@ -561,7 +561,7 @@ evas_common_pipe_image_draw_do(RGBA_Image *dst, const RGBA_Pipe_Op *op, const RG
#endif
}
-EAPI void
+EVAS_API void
evas_common_pipe_image_draw(RGBA_Image *src, RGBA_Image *dst,
RGBA_Draw_Context *dc, int smooth,
int src_region_x, int src_region_y,
@@ -621,7 +621,7 @@ static Eina_Bool
evas_common_pipe_map_draw_prepare(void *data EINA_UNUSED, RGBA_Image *dst, RGBA_Pipe_Op *op)
{
RGBA_Draw_Context context;
- Eina_Bool r;
+ Eina_Bool r;
memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
r = evas_common_map_rgba_prepare(op->op.map.src, dst,
@@ -629,7 +629,7 @@ evas_common_pipe_map_draw_prepare(void *data EINA_UNUSED, RGBA_Image *dst, RGBA_
return r;
}
-EAPI void
+EVAS_API void
evas_common_pipe_map_draw(RGBA_Image *src, RGBA_Image *dst,
RGBA_Draw_Context *dc, RGBA_Map *m,
int smooth, int level)
@@ -641,10 +641,10 @@ evas_common_pipe_map_draw(RGBA_Image *src, RGBA_Image *dst,
/* pts_copy = malloc(sizeof (RGBA_Map_Point) * 4); */
/* if (!pts_copy) return; */
dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op);
- if (!dst->cache_entry.pipe)
+ if (!dst->cache_entry.pipe)
{
/* free(pts_copy); */
- return;
+ return;
}
/* for (i = 0; i < 4; ++i) */
@@ -777,7 +777,7 @@ evas_common_pipe_load_do(RGBA_Image *im)
eina_barrier_wait(&(task_thbarrier[1]));
}
-EAPI void
+EVAS_API void
evas_common_pipe_image_load(RGBA_Image *im)
{
if (im->flags & RGBA_IMAGE_TODO_LOAD)
@@ -799,7 +799,7 @@ evas_common_pipe_image_load(RGBA_Image *im)
im->flags |= RGBA_IMAGE_TODO_LOAD;
}
-EAPI void
+EVAS_API void
evas_common_pipe_text_prepare(Evas_Text_Props *text_props)
{
RGBA_Font_Int *fi;
@@ -827,7 +827,7 @@ evas_common_pipe_text_prepare(Evas_Text_Props *text_props)
LKU(fi->ft_mutex);
}
-EAPI void
+EVAS_API void
evas_common_pipe_map_begin(RGBA_Image *root)
{
if (!evas_common_pipe_init())
@@ -850,7 +850,7 @@ evas_common_pipe_map_begin(RGBA_Image *root)
}
#endif
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_pipe_init(void)
{
#ifdef BUILD_PIPE_RENDER
diff --git a/src/lib/evas/common/evas_pipe.h b/src/lib/evas/common/evas_pipe.h
index a2fdb17279..3cf0e71356 100644
--- a/src/lib/evas/common/evas_pipe.h
+++ b/src/lib/evas/common/evas_pipe.h
@@ -8,20 +8,20 @@
* threadable
*/
-EAPI Eina_Bool evas_common_pipe_init(void);
+EVAS_API Eina_Bool evas_common_pipe_init(void);
-EAPI void evas_common_pipe_free(RGBA_Image *im);
-EAPI void evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
-EAPI void evas_common_pipe_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
-EAPI void evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
-EAPI void evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, Evas_Text_Props *intl_props);
-EAPI void evas_common_pipe_text_prepare(Evas_Text_Props *text_props);
-EAPI void evas_common_pipe_image_load(RGBA_Image *im);
-EAPI void evas_common_pipe_image_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int smooth, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
-EAPI void evas_common_pipe_map_begin(RGBA_Image *root);
-EAPI void evas_common_pipe_map_draw(RGBA_Image *src, RGBA_Image *dst,
+EVAS_API void evas_common_pipe_free(RGBA_Image *im);
+EVAS_API void evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
+EVAS_API void evas_common_pipe_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
+EVAS_API void evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
+EVAS_API void evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, Evas_Text_Props *intl_props);
+EVAS_API void evas_common_pipe_text_prepare(Evas_Text_Props *text_props);
+EVAS_API void evas_common_pipe_image_load(RGBA_Image *im);
+EVAS_API void evas_common_pipe_image_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int smooth, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
+EVAS_API void evas_common_pipe_map_begin(RGBA_Image *root);
+EVAS_API void evas_common_pipe_map_draw(RGBA_Image *src, RGBA_Image *dst,
RGBA_Draw_Context *dc, RGBA_Map *m,
int smooth, int level);
-EAPI void evas_common_pipe_flush(RGBA_Image *im);
+EVAS_API void evas_common_pipe_flush(RGBA_Image *im);
#endif /* _EVAS_PIPE_H */
diff --git a/src/lib/evas/common/evas_polygon.h b/src/lib/evas/common/evas_polygon.h
index dee63c1ff6..7780aea4f9 100644
--- a/src/lib/evas/common/evas_polygon.h
+++ b/src/lib/evas/common/evas_polygon.h
@@ -2,13 +2,13 @@
#define _EVAS_POLYGON_H
-EAPI void evas_common_polygon_init (void);
+EVAS_API void evas_common_polygon_init (void);
-EAPI RGBA_Polygon_Point *evas_common_polygon_point_add (RGBA_Polygon_Point *points, int x, int y);
-EAPI RGBA_Polygon_Point *evas_common_polygon_points_clear (RGBA_Polygon_Point *points);
-EAPI void evas_common_polygon_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
+EVAS_API RGBA_Polygon_Point *evas_common_polygon_point_add (RGBA_Polygon_Point *points, int x, int y);
+EVAS_API RGBA_Polygon_Point *evas_common_polygon_points_clear (RGBA_Polygon_Point *points);
+EVAS_API void evas_common_polygon_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
-EAPI void evas_common_polygon_rgba_draw (RGBA_Image *dst, int ext_x, int ext_y, int ext_w, int ext_h, DATA32 col, int render_op, RGBA_Polygon_Point *points, int x, int y, RGBA_Image *mask_ie, int mask_x, int mask_y);
+EVAS_API void evas_common_polygon_rgba_draw (RGBA_Image *dst, int ext_x, int ext_y, int ext_w, int ext_h, DATA32 col, int render_op, RGBA_Polygon_Point *points, int x, int y, RGBA_Image *mask_ie, int mask_x, int mask_y);
#endif /* _EVAS_POLYGON_H */
diff --git a/src/lib/evas/common/evas_polygon_main.c b/src/lib/evas/common/evas_polygon_main.c
index 3b8690427a..c867d3b390 100644
--- a/src/lib/evas/common/evas_polygon_main.c
+++ b/src/lib/evas/common/evas_polygon_main.c
@@ -65,12 +65,12 @@ struct _RGBA_Vertex
num_active_edges++; \
}
-EAPI void
+EVAS_API void
evas_common_polygon_init(void)
{
}
-EAPI RGBA_Polygon_Point *
+EVAS_API RGBA_Polygon_Point *
evas_common_polygon_point_add(RGBA_Polygon_Point *points, int x, int y)
{
RGBA_Polygon_Point *pt;
@@ -83,7 +83,7 @@ evas_common_polygon_point_add(RGBA_Polygon_Point *points, int x, int y)
return points;
}
-EAPI RGBA_Polygon_Point *
+EVAS_API RGBA_Polygon_Point *
evas_common_polygon_points_clear(RGBA_Polygon_Point *points)
{
if (points)
@@ -122,7 +122,7 @@ polygon_edge_sorter(const void *a, const void *b)
return 1;
}
-EAPI void
+EVAS_API void
evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y)
{
RGBA_Gfx_Func func;
@@ -143,7 +143,7 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
if (dc->render_op == _EVAS_RENDER_BLEND)
op = PIXMAN_OP_OVER;
-# endif
+# endif
#endif
ext_x = 0;
@@ -326,7 +326,7 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po
}
}
-EAPI void
+EVAS_API void
evas_common_polygon_rgba_draw(RGBA_Image *dst, int ext_x, int ext_y, int ext_w, int ext_h, DATA32 col, int render_op, RGBA_Polygon_Point *points, int x, int y, RGBA_Image *mask_ie, int mask_x, int mask_y)
{
RGBA_Gfx_Func func;
diff --git a/src/lib/evas/common/evas_rectangle.h b/src/lib/evas/common/evas_rectangle.h
index e79afd586d..935f67392a 100644
--- a/src/lib/evas/common/evas_rectangle.h
+++ b/src/lib/evas/common/evas_rectangle.h
@@ -3,14 +3,14 @@
typedef void (*Evas_Common_Rectangle_Draw_Cb)(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
-EAPI void evas_common_rectangle_init (void);
-EAPI void evas_common_rectangle_draw_cb (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h, Evas_Common_Rectangle_Draw_Cb cb);
-EAPI void evas_common_rectangle_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
+EVAS_API void evas_common_rectangle_init (void);
+EVAS_API void evas_common_rectangle_draw_cb (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h, Evas_Common_Rectangle_Draw_Cb cb);
+EVAS_API void evas_common_rectangle_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
-EAPI void evas_common_rectangle_draw_do(const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
-EAPI Eina_Bool evas_common_rectangle_draw_prepare(Cutout_Rects **reuse, const RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
+EVAS_API void evas_common_rectangle_draw_do(const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
+EVAS_API Eina_Bool evas_common_rectangle_draw_prepare(Cutout_Rects **reuse, const RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
-EAPI void evas_common_rectangle_rgba_draw (RGBA_Image *dst, DATA32 color, int render_op, int x, int y, int w, int h, RGBA_Image *mask_ie, int mask_x, int mask_y);
+EVAS_API void evas_common_rectangle_rgba_draw (RGBA_Image *dst, DATA32 color, int render_op, int x, int y, int w, int h, RGBA_Image *mask_ie, int mask_x, int mask_y);
#endif /* _EVAS_RECTANGLE_H */
diff --git a/src/lib/evas/common/evas_rectangle_main.c b/src/lib/evas/common/evas_rectangle_main.c
index 443e39fe61..ab372cfa76 100644
--- a/src/lib/evas/common/evas_rectangle_main.c
+++ b/src/lib/evas/common/evas_rectangle_main.c
@@ -4,12 +4,12 @@
static void rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
-EAPI void
+EVAS_API void
evas_common_rectangle_init(void)
{
}
-EAPI void
+EVAS_API void
evas_common_rectangle_draw_cb(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h, Evas_Common_Rectangle_Draw_Cb cb)
{
Cutout_Rect *r;
@@ -48,13 +48,13 @@ evas_common_rectangle_draw_cb(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int
dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
}
-EAPI void
+EVAS_API void
evas_common_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h)
{
evas_common_rectangle_draw_cb(dst, dc, x, y, w, h, rectangle_draw_internal);
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_rectangle_draw_prepare(Cutout_Rects **reuse, const RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h)
{
if ((w <= 0) || (h <= 0)) return EINA_FALSE;
@@ -74,7 +74,7 @@ evas_common_rectangle_draw_prepare(Cutout_Rects **reuse, const RGBA_Image *dst,
return EINA_TRUE;
}
-EAPI void
+EVAS_API void
evas_common_rectangle_draw_do(const Cutout_Rects *reuse,
const Eina_Rectangle *clip,
RGBA_Image *dst, RGBA_Draw_Context *dc,
@@ -167,7 +167,7 @@ rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, in
}
}
-EAPI void
+EVAS_API void
evas_common_rectangle_rgba_draw(RGBA_Image *dst, DATA32 color, int render_op, int x, int y, int w, int h, RGBA_Image *mask_ie, int mask_x, int mask_y)
{
RGBA_Gfx_Func func;
diff --git a/src/lib/evas/common/evas_scale_main.c b/src/lib/evas/common/evas_scale_main.c
index 06b20f30e6..9facea2b6e 100644
--- a/src/lib/evas/common/evas_scale_main.c
+++ b/src/lib/evas/common/evas_scale_main.c
@@ -1,12 +1,12 @@
#include "evas_common_private.h"
#include "evas_private.h"
-EAPI void
+EVAS_API void
evas_common_scale_init(void)
{
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_scale_rgba_in_to_out_clip_prepare(Cutout_Rects **reuse, const RGBA_Image *src EINA_UNUSED,
const RGBA_Image *dst,
RGBA_Draw_Context *dc,
@@ -31,7 +31,7 @@ evas_common_scale_rgba_in_to_out_clip_prepare(Cutout_Rects **reuse, const RGBA_I
return EINA_TRUE;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_scale_rgba_in_to_out_clip_cb(RGBA_Image *src, RGBA_Image *dst,
RGBA_Draw_Context *dc,
int src_region_x, int src_region_y,
diff --git a/src/lib/evas/common/evas_scale_main.h b/src/lib/evas/common/evas_scale_main.h
index 76c46c8c70..85db6de0d8 100644
--- a/src/lib/evas/common/evas_scale_main.h
+++ b/src/lib/evas/common/evas_scale_main.h
@@ -3,20 +3,20 @@
typedef Eina_Bool (*Evas_Common_Scale_In_To_Out_Clip_Cb)(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
-EAPI void evas_common_scale_init (void);
-EAPI void evas_common_scale_sample_init (void);
-EAPI void evas_common_scale_sample_shutdown (void);
+EVAS_API void evas_common_scale_init (void);
+EVAS_API void evas_common_scale_sample_init (void);
+EVAS_API void evas_common_scale_sample_shutdown (void);
-EAPI Eina_Bool evas_common_scale_rgba_in_to_out_clip_cb (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, Evas_Common_Scale_In_To_Out_Clip_Cb cb);
-EAPI Eina_Bool evas_common_scale_rgba_in_to_out_clip_smooth (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
-EAPI Eina_Bool evas_common_scale_rgba_in_to_out_clip_sample (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
+EVAS_API Eina_Bool evas_common_scale_rgba_in_to_out_clip_cb (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, Evas_Common_Scale_In_To_Out_Clip_Cb cb);
+EVAS_API Eina_Bool evas_common_scale_rgba_in_to_out_clip_smooth (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
+EVAS_API Eina_Bool evas_common_scale_rgba_in_to_out_clip_sample (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
-EAPI void evas_common_rgba_image_scalecache_dump(void);
+EVAS_API void evas_common_rgba_image_scalecache_dump(void);
-EAPI void evas_common_scale_rgba_in_to_out_clip_sample_do (const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
-EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_do (const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
-EAPI void evas_common_scale_rgba_sample_draw (RGBA_Image *src, RGBA_Image *dst, int dst_clip_x, int dst_clip_y, int dst_clip_w, int dst_clip_h, DATA32 mul_col, int render_op, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, RGBA_Image *mask, int mask_x, int mask_y);
-EAPI void evas_common_scale_rgba_smooth_draw (RGBA_Image *src, RGBA_Image *dst, int dst_clip_x, int dst_clip_y, int dst_clip_w, int dst_clip_h, DATA32 mul_col, int render_op, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, RGBA_Image *mask_ie, int mask_x, int mask_y);
-EAPI Eina_Bool evas_common_scale_rgba_in_to_out_clip_prepare (Cutout_Rects **reuse, const RGBA_Image *src, const RGBA_Image *dst, RGBA_Draw_Context *dc, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
+EVAS_API void evas_common_scale_rgba_in_to_out_clip_sample_do (const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
+EVAS_API void evas_common_scale_rgba_in_to_out_clip_smooth_do (const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
+EVAS_API void evas_common_scale_rgba_sample_draw (RGBA_Image *src, RGBA_Image *dst, int dst_clip_x, int dst_clip_y, int dst_clip_w, int dst_clip_h, DATA32 mul_col, int render_op, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, RGBA_Image *mask, int mask_x, int mask_y);
+EVAS_API void evas_common_scale_rgba_smooth_draw (RGBA_Image *src, RGBA_Image *dst, int dst_clip_x, int dst_clip_y, int dst_clip_w, int dst_clip_h, DATA32 mul_col, int render_op, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, RGBA_Image *mask_ie, int mask_x, int mask_y);
+EVAS_API Eina_Bool evas_common_scale_rgba_in_to_out_clip_prepare (Cutout_Rects **reuse, const RGBA_Image *src, const RGBA_Image *dst, RGBA_Draw_Context *dc, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
#endif /* _EVAS_SCALE_MAIN_H */
diff --git a/src/lib/evas/common/evas_scale_sample.c b/src/lib/evas/common/evas_scale_sample.c
index cfd59726fc..cd59ed20b0 100644
--- a/src/lib/evas/common/evas_scale_sample.c
+++ b/src/lib/evas/common/evas_scale_sample.c
@@ -41,7 +41,7 @@ static Eina_Thread scaling_thread;
static Eina_Thread_Queue *thread_queue = NULL;
static Eina_Thread_Queue *main_queue = NULL;
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst,
RGBA_Draw_Context *dc,
int src_region_x, int src_region_y,
@@ -56,7 +56,7 @@ evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst,
scale_rgba_in_to_out_clip_sample_internal);
}
-EAPI void
+EVAS_API void
evas_common_scale_rgba_in_to_out_clip_sample_do(const Cutout_Rects *reuse,
const Eina_Rectangle *clip,
RGBA_Image *src, RGBA_Image *dst,
@@ -197,7 +197,7 @@ _evas_common_scale_rgba_sample_scale_mask(int y,
}
}
-EAPI void
+EVAS_API void
evas_common_scale_rgba_sample_draw(RGBA_Image *src, RGBA_Image *dst, int dst_clip_x, int dst_clip_y, int dst_clip_w, int dst_clip_h, DATA32 mul_col, int render_op, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, RGBA_Image *mask_ie, int mask_x, int mask_y)
{
int x, y;
@@ -806,7 +806,7 @@ evas_common_scale_sample_fork_reset(void *data EINA_UNUSED)
}
}
-EAPI void
+EVAS_API void
evas_common_scale_sample_init(void)
{
if (eina_cpu_count() <= 2) return ;
@@ -846,7 +846,7 @@ cleanup:
if (main_queue) eina_thread_queue_free(main_queue);
}
-EAPI void
+EVAS_API void
evas_common_scale_sample_shutdown(void)
{
Evas_Scale_Msg *msg;
diff --git a/src/lib/evas/common/evas_scale_smooth.c b/src/lib/evas/common/evas_scale_smooth.c
index 781c13d1df..f5d8e93cd5 100644
--- a/src/lib/evas/common/evas_scale_smooth.c
+++ b/src/lib/evas/common/evas_scale_smooth.c
@@ -235,7 +235,7 @@ evas_common_scale_rgba_in_to_out_clip_smooth_c(RGBA_Image *src, RGBA_Image *dst,
return EINA_TRUE;
}
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst,
RGBA_Draw_Context *dc,
int src_region_x, int src_region_y,
@@ -267,7 +267,7 @@ evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst,
cb);
}
-EAPI void
+EVAS_API void
evas_common_scale_rgba_smooth_draw(RGBA_Image *src, RGBA_Image *dst, int dst_clip_x, int dst_clip_y, int dst_clip_w, int dst_clip_h, DATA32 mul_col, int render_op, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, RGBA_Image *mask_ie, int mask_x, int mask_y)
{
#ifdef BUILD_MMX
@@ -304,7 +304,7 @@ evas_common_scale_rgba_smooth_draw(RGBA_Image *src, RGBA_Image *dst, int dst_cli
mask_ie, mask_x, mask_y);
}
-EAPI void
+EVAS_API void
evas_common_scale_rgba_in_to_out_clip_smooth_do(const Cutout_Rects *reuse,
const Eina_Rectangle *clip,
RGBA_Image *src, RGBA_Image *dst,
diff --git a/src/lib/evas/common/evas_scale_smooth.h b/src/lib/evas/common/evas_scale_smooth.h
index faa8ad3bd2..d43d03fcf9 100644
--- a/src/lib/evas/common/evas_scale_smooth.h
+++ b/src/lib/evas/common/evas_scale_smooth.h
@@ -1,7 +1,7 @@
#ifndef _EVAS_SCALE_SMOOTH_H
#define _EVAS_SCALE_SMOOTH_H
-EAPI Eina_Bool evas_common_scale_rgba_in_to_out_clip_smooth_mmx (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
-EAPI Eina_Bool evas_common_scale_rgba_in_to_out_clip_smooth_c (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
+EVAS_API Eina_Bool evas_common_scale_rgba_in_to_out_clip_smooth_mmx (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
+EVAS_API Eina_Bool evas_common_scale_rgba_in_to_out_clip_smooth_c (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
#endif /* _EVAS_SCALE_SMOOTH_H */
diff --git a/src/lib/evas/common/evas_scale_smooth_scaler_downx_downy.c b/src/lib/evas/common/evas_scale_smooth_scaler_downx_downy.c
index dfe0e5dc31..07ca8b0abf 100644
--- a/src/lib/evas/common/evas_scale_smooth_scaler_downx_downy.c
+++ b/src/lib/evas/common/evas_scale_smooth_scaler_downx_downy.c
@@ -17,7 +17,7 @@
#ifdef BILINEAR_HALF_TO_FULL_SCALE
if (// image is not too big so that cululative error on steps might be
- // noticable
+ // noticeable
(dst_region_w <= 4096) &&
(dst_region_h <= 4096) &&
(src_region_w <= 4096) &&
diff --git a/src/lib/evas/common/evas_scale_span.c b/src/lib/evas/common/evas_scale_span.c
index 8e5bf6c0bd..616dba3ba8 100644
--- a/src/lib/evas/common/evas_scale_span.c
+++ b/src/lib/evas/common/evas_scale_span.c
@@ -447,35 +447,35 @@ evas_common_scale_clip_a8_span_(DATA32 *src EINA_UNUSED, DATA8 *mask, int src_le
}
}
-EAPI void
+EVAS_API void
evas_common_scale_rgba_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
{
evas_common_scale_rgba_span_(src, mask, src_len, mul_col, dst, dst_len, dir);
evas_common_cpu_end_opt();
}
-EAPI void
+EVAS_API void
evas_common_scale_rgba_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
{
evas_common_scale_rgba_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir);
evas_common_cpu_end_opt();
}
-EAPI void
+EVAS_API void
evas_common_scale_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
{
evas_common_scale_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir);
evas_common_cpu_end_opt();
}
-EAPI void
+EVAS_API void
evas_common_scale_clip_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
{
evas_common_scale_clip_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir);
evas_common_cpu_end_opt();
}
-EAPI void
+EVAS_API void
evas_common_scale_hsva_span(DATA32 *src, DATA8 *mask EINA_UNUSED, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
{
int mul = 0, step = 1;
@@ -558,7 +558,7 @@ evas_common_scale_hsva_span(DATA32 *src, DATA8 *mask EINA_UNUSED, int src_len, D
}
}
-EAPI void
+EVAS_API void
evas_common_scale_hsva_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
{
int mul = 0, step = 1;
diff --git a/src/lib/evas/common/evas_scale_span.h b/src/lib/evas/common/evas_scale_span.h
index 874c594b57..90e263f13c 100644
--- a/src/lib/evas/common/evas_scale_span.h
+++ b/src/lib/evas/common/evas_scale_span.h
@@ -2,13 +2,13 @@
#define _EVAS_SCALE_SPAN_H
-EAPI void evas_common_scale_rgba_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
-EAPI void evas_common_scale_rgba_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
-EAPI void evas_common_scale_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
-EAPI void evas_common_scale_clip_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
+EVAS_API void evas_common_scale_rgba_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
+EVAS_API void evas_common_scale_rgba_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
+EVAS_API void evas_common_scale_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
+EVAS_API void evas_common_scale_clip_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
-EAPI void evas_common_scale_hsva_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
-EAPI void evas_common_scale_hsva_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
+EVAS_API void evas_common_scale_hsva_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
+EVAS_API void evas_common_scale_hsva_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
#endif /* _EVAS_SCALE_SPAN_H */
diff --git a/src/lib/evas/common/evas_text_utils.c b/src/lib/evas/common/evas_text_utils.c
index acf7cf8fb7..99a9c3e3b3 100644
--- a/src/lib/evas/common/evas_text_utils.c
+++ b/src/lib/evas/common/evas_text_utils.c
@@ -858,7 +858,7 @@ _evas_common_text_props_cluster_move(const Evas_Text_Props *props, int pos,
return pos;
}
-EAPI int
+EVAS_API int
evas_common_text_props_cluster_next(const Evas_Text_Props *props, int pos)
{
Eina_Bool right;
@@ -867,7 +867,7 @@ evas_common_text_props_cluster_next(const Evas_Text_Props *props, int pos)
return _evas_common_text_props_cluster_move(props, pos, right);
}
-EAPI int
+EVAS_API int
evas_common_text_props_cluster_prev(const Evas_Text_Props *props, int pos)
{
Eina_Bool right;
@@ -877,7 +877,7 @@ evas_common_text_props_cluster_prev(const Evas_Text_Props *props, int pos)
}
/* Returns the index of the logical char in the props. */
-EAPI int
+EVAS_API int
evas_common_text_props_index_find(const Evas_Text_Props *props, int _cutoff)
{
#ifdef OT_SUPPORT
@@ -973,7 +973,7 @@ evas_common_text_props_index_find(const Evas_Text_Props *props, int _cutoff)
/* Won't work in the middle of ligatures, assumes cutoff < len.
* Also won't work in the middle of indic words, should handle that in a
* smart way. */
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_text_props_split(Evas_Text_Props *base,
Evas_Text_Props *ext, int _cutoff)
{
@@ -1027,7 +1027,7 @@ evas_common_text_props_split(Evas_Text_Props *base,
}
/* Won't work in the middle of ligatures */
-EAPI void
+EVAS_API void
evas_common_text_props_merge(Evas_Text_Props *item1,
const Evas_Text_Props *item2)
{
@@ -1104,7 +1104,7 @@ _content_create_ot(RGBA_Font_Int *fi, const Eina_Unicode *text,
if (is_replacement)
{
/* Update the advance accordingly */
- adjust_x += (pen_x + (fg->glyph->advance.x >> 16)) -
+ adjust_x += (pen_x + (fg->advance.x >> 16)) -
gl_itr->pen_after;
}
pen_x = gl_itr->pen_after;
@@ -1198,7 +1198,7 @@ _content_create_regular(RGBA_Font_Int *fi, const Eina_Unicode *text,
gl_itr->index = idx;
gl_itr->x_bear = fg->x_bear;
gl_itr->y_bear = fg->y_bear;
- adv = fg->glyph->advance.x >> 10;
+ adv = fg->advance.x >> 10;
gl_itr->width = fg->width;
if (EVAS_FONT_CHARACTER_IS_INVISIBLE(_gl))
@@ -1222,7 +1222,7 @@ _content_create_regular(RGBA_Font_Int *fi, const Eina_Unicode *text,
}
#endif
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_text_props_content_create(void *_fi, const Eina_Unicode *text,
Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props,
size_t par_pos, int len, Evas_Text_Props_Mode mode, const char *lang)
@@ -1430,7 +1430,7 @@ evas_common_format_color_parse(const char *str, int slen,
if ((strncmp(color_name,"rgb(",4) == 0) && color_name[slen-1] == ')'&& slen >= 10 && slen <=16) /* rgb() */
{
- char * p_color = &color_name[3];
+ char * p_color = &color_name[3];
if (
(!read_byte_color_component(++p_color,&p_color,r) || !p_color || *p_color != ',') ||
@@ -1448,7 +1448,7 @@ evas_common_format_color_parse(const char *str, int slen,
}
else if ((strncmp(color_name,"rgba(",4) == 0) && color_name[slen-1] == ')'&& slen >= 13 && slen <=21) /* rgba() */
{
- char * p_color = &color_name[4];
+ char * p_color = &color_name[4];
if (
(!read_byte_color_component(++p_color,&p_color,r) || !p_color || *p_color != ',') ||
diff --git a/src/lib/evas/common/evas_text_utils.h b/src/lib/evas/common/evas_text_utils.h
index 09c51e0c5e..faec37435e 100644
--- a/src/lib/evas/common/evas_text_utils.h
+++ b/src/lib/evas/common/evas_text_utils.h
@@ -153,7 +153,7 @@ evas_common_text_props_bidi_set(Evas_Text_Props *props,
void
evas_common_text_props_script_set(Evas_Text_Props *props, Evas_Script_Type scr);
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_text_props_content_create(void *_fi, const Eina_Unicode *text,
Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props,
size_t par_pos, int len, Evas_Text_Props_Mode mode, const char *lang);
@@ -171,19 +171,19 @@ evas_common_text_props_content_nofree_unref(Evas_Text_Props *props);
void
evas_common_text_props_content_unref(Evas_Text_Props *props);
-EAPI int
+EVAS_API int
evas_common_text_props_cluster_next(const Evas_Text_Props *props, int pos);
-EAPI int
+EVAS_API int
evas_common_text_props_cluster_prev(const Evas_Text_Props *props, int pos);
-EAPI int
+EVAS_API int
evas_common_text_props_index_find(const Evas_Text_Props *props, int _cutoff);
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_common_text_props_split(Evas_Text_Props *base, Evas_Text_Props *ext,
int cutoff);
-EAPI void
+EVAS_API void
evas_common_text_props_merge(Evas_Text_Props *item1, const Evas_Text_Props *item2);
/* Common to Textblock and Filters */
diff --git a/src/lib/evas/common/evas_thread_render.c b/src/lib/evas/common/evas_thread_render.c
index 324f6e9e3b..ded914e93d 100644
--- a/src/lib/evas/common/evas_thread_render.c
+++ b/src/lib/evas/common/evas_thread_render.c
@@ -37,7 +37,7 @@ _evas_thread_queue_fence(void *data)
eina_lock_release(&f->lock);
}
-EAPI void
+EVAS_API void
evas_thread_queue_wait(void)
{
struct fence_stuff f;
@@ -103,13 +103,13 @@ out:
eina_lock_release(&evas_thread_queue_lock);
}
-EAPI void
+EVAS_API void
evas_thread_cmd_enqueue(Evas_Thread_Command_Cb cb, void *data)
{
evas_thread_queue_append(cb, data, EINA_FALSE);
}
-EAPI void
+EVAS_API void
evas_thread_queue_flush(Evas_Thread_Command_Cb cb, void *data)
{
evas_thread_queue_append(cb, data, EINA_TRUE);
diff --git a/src/lib/evas/common/evas_tiler.c b/src/lib/evas/common/evas_tiler.c
index 0aff533b40..a9a367420b 100644
--- a/src/lib/evas/common/evas_tiler.c
+++ b/src/lib/evas/common/evas_tiler.c
@@ -3,12 +3,14 @@
#ifdef NEWTILER
-EAPI void
+#define MAXREG 24
+
+EVAS_API void
evas_common_tilebuf_init(void)
{
}
-EAPI Tilebuf *
+EVAS_API Tilebuf *
evas_common_tilebuf_new(int w, int h)
{
Tilebuf *tb = malloc(sizeof(Tilebuf));
@@ -18,51 +20,51 @@ evas_common_tilebuf_new(int w, int h)
return tb;
}
-EAPI void
+EVAS_API void
evas_common_tilebuf_free(Tilebuf *tb)
{
region_free(tb->region);
free(tb);
}
-EAPI void
+EVAS_API void
evas_common_tilebuf_set_tile_size(Tilebuf *tb EINA_UNUSED, int tw EINA_UNUSED, int th EINA_UNUSED)
{
}
-EAPI void
+EVAS_API void
evas_common_tilebuf_get_tile_size(Tilebuf *tb EINA_UNUSED, int *tw, int *th)
{
if (tw) *tw = 1;
if (th) *th = 1;
}
-EAPI void
+EVAS_API void
evas_common_tilebuf_tile_strict_set(Tilebuf *tb EINA_UNUSED, Eina_Bool strict EINA_UNUSED)
{
}
-EAPI int
+EVAS_API int
evas_common_tilebuf_add_redraw(Tilebuf *tb, int x, int y, int w, int h)
{
region_rect_add(tb->region, x, y, w, h);
return 1;
}
-EAPI int
+EVAS_API int
evas_common_tilebuf_del_redraw(Tilebuf *tb, int x, int y, int w, int h)
{
region_rect_del(tb->region, x, y, w, h);
return 1;
}
-EAPI int
+EVAS_API int
evas_common_tilebuf_add_motion_vector(Tilebuf *tb EINA_UNUSED, int x EINA_UNUSED, int y EINA_UNUSED, int w EINA_UNUSED, int h EINA_UNUSED, int dx EINA_UNUSED, int dy EINA_UNUSED, int alpha EINA_UNUSED)
{
return 0;
}
-EAPI void
+EVAS_API void
evas_common_tilebuf_clear(Tilebuf *tb)
{
region_free(tb->region);
@@ -93,13 +95,13 @@ _region_round(Region *region, int tsize)
return region2;
}
-EAPI Tilebuf_Rect *
+EVAS_API Tilebuf_Rect *
evas_common_tilebuf_get_render_rects(Tilebuf *tb)
{
Tilebuf_Rect *rects = NULL, *r, *rend, *rbuf;
Region *region2;
Box *rects2, *rs;
- int n;
+ int n, num, minx, miny, maxx, maxy;
region2 = _region_round(tb->region, 16);
if (!region2) return NULL;
@@ -126,8 +128,18 @@ evas_common_tilebuf_get_render_rects(Tilebuf *tb)
rend = rbuf + n;
rs = rects2;
+ num = 0;
+
+ minx = rs->x1;
+ miny = rs->y1;
+ maxx = rs->x2;
+ maxy = rs->y2;
for (r = rbuf; r < rend; r++)
{
+ if (rs->x1 < minx) minx = rs->x1;
+ if (rs->y1 < miny) miny = rs->y1;
+ if (rs->x2 > maxx) maxx = rs->x2;
+ if (rs->y2 > maxy) maxy = rs->y2;
EINA_INLIST_GET(r)->next = NULL;
EINA_INLIST_GET(r)->prev = NULL;
EINA_INLIST_GET(r)->last = NULL;
@@ -139,12 +151,25 @@ evas_common_tilebuf_get_render_rects(Tilebuf *tb)
rects = (Tilebuf_Rect *)
eina_inlist_append(EINA_INLIST_GET(rects),
EINA_INLIST_GET(r));
+ num++;
+ }
+ // if > max, then bounding box
+ if (num > MAXREG)
+ {
+ r = rects;
+ EINA_INLIST_GET(r)->next = NULL;
+ EINA_INLIST_GET(r)->prev = NULL;
+ EINA_INLIST_GET(r)->last = NULL;
+ r->x = minx;
+ r->y = miny;
+ r->w = maxx - minx;
+ r->h = maxy - miny;
}
region_free(region2);
return rects;
}
-EAPI void
+EVAS_API void
evas_common_tilebuf_free_render_rects(Tilebuf_Rect *rects)
{
free(rects);
@@ -286,7 +311,7 @@ static inline list_node_t *
rect_list_unlink_next(list_t *rects, list_node_t *parent_node)
{
list_node_t *node;
-
+
if (parent_node)
{
node = parent_node->next;
@@ -316,7 +341,7 @@ rect_list_clear(list_t *rects)
while (node)
{
list_node_t *aux;
-
+
aux = node->next;
rect_list_node_pool_put(node);
node = aux;
@@ -460,7 +485,7 @@ _calc_intra_outer_rect_area(const rect_t a, const rect_t b,
{
int min_left, max_left, min_right, max_right;
int min_top, max_top, min_bottom, max_bottom;
-
+
if (a.left < b.left)
{
max_left = b.left;
@@ -832,12 +857,12 @@ _add_redraw(list_t *rects, int x, int y, int w, int h, int fuzz)
/////////////////////////////////////////////////////////////////
-EAPI void
+EVAS_API void
evas_common_tilebuf_init(void)
{
}
-EAPI Tilebuf *
+EVAS_API Tilebuf *
evas_common_tilebuf_new(int w, int h)
{
Tilebuf *tb;
@@ -851,7 +876,7 @@ evas_common_tilebuf_new(int w, int h)
return tb;
}
-EAPI void
+EVAS_API void
evas_common_tilebuf_free(Tilebuf *tb)
{
rect_list_clear(&tb->rects);
@@ -859,34 +884,34 @@ evas_common_tilebuf_free(Tilebuf *tb)
free(tb);
}
-EAPI void
+EVAS_API void
evas_common_tilebuf_set_tile_size(Tilebuf *tb, int tw, int th)
{
tb->tile_size.w = tw;
tb->tile_size.h = th;
}
-EAPI void
+EVAS_API void
evas_common_tilebuf_get_tile_size(Tilebuf *tb, int *tw, int *th)
{
if (tw) *tw = tb->tile_size.w;
if (th) *th = tb->tile_size.h;
}
-EAPI void
+EVAS_API void
evas_common_tilebuf_tile_strict_set(Tilebuf *tb, Eina_Bool strict)
{
tb->strict_tiles = strict;
}
-EAPI int
+EVAS_API int
evas_common_tilebuf_add_redraw(Tilebuf *tb, int x, int y, int w, int h)
{
if ((w <= 0) || (h <= 0)) return 0;
RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h);
if ((w <= 0) || (h <= 0)) return 0;
// optimize a common case -> adding the exact same rect 2x in a row
- if ((tb->prev_add.x == x) && (tb->prev_add.y == y) &&
+ if ((tb->prev_add.x == x) && (tb->prev_add.y == y) &&
(tb->prev_add.w == w) && (tb->prev_add.h == h)) return 1;
tb->prev_add.x = x; tb->prev_add.y = y;
tb->prev_add.w = w; tb->prev_add.h = h;
@@ -894,7 +919,7 @@ evas_common_tilebuf_add_redraw(Tilebuf *tb, int x, int y, int w, int h)
return _add_redraw(&tb->rects, x, y, w, h, FUZZ * FUZZ);
}
-EAPI int
+EVAS_API int
evas_common_tilebuf_del_redraw(Tilebuf *tb, int x, int y, int w, int h)
{
rect_t r;
@@ -904,7 +929,7 @@ evas_common_tilebuf_del_redraw(Tilebuf *tb, int x, int y, int w, int h)
RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h);
if ((w <= 0) || (h <= 0)) return 0;
// optimize a common case -> deleting the exact same rect 2x in a row
- if ((tb->prev_del.x == x) && (tb->prev_del.y == y) &&
+ if ((tb->prev_del.x == x) && (tb->prev_del.y == y) &&
(tb->prev_del.w == w) && (tb->prev_del.h == h)) return 1;
tb->prev_del.x = x; tb->prev_del.y = y;
tb->prev_del.w = w; tb->prev_del.h = h;
@@ -915,13 +940,13 @@ evas_common_tilebuf_del_redraw(Tilebuf *tb, int x, int y, int w, int h)
return 0;
}
-EAPI int
+EVAS_API int
evas_common_tilebuf_add_motion_vector(Tilebuf *tb EINA_UNUSED, int x EINA_UNUSED, int y EINA_UNUSED, int w EINA_UNUSED, int h EINA_UNUSED, int dx EINA_UNUSED, int dy EINA_UNUSED, int alpha EINA_UNUSED)
{
return 0;
}
-EAPI void
+EVAS_API void
evas_common_tilebuf_clear(Tilebuf *tb)
{
tb->prev_add.x = tb->prev_add.y = tb->prev_add.w = tb->prev_add.h = 0;
@@ -930,7 +955,7 @@ evas_common_tilebuf_clear(Tilebuf *tb)
tb->need_merge = 0;
}
-EAPI Tilebuf_Rect *
+EVAS_API Tilebuf_Rect *
evas_common_tilebuf_get_render_rects(Tilebuf *tb)
{
list_node_t *n;
@@ -993,7 +1018,7 @@ evas_common_tilebuf_get_render_rects(Tilebuf *tb)
if (x1 < bx1) bx1 = x1;
x2 = x1 + ((rect_node_t *)n)->rect.width;
if (x2 > bx2) bx2 = x2;
-
+
y1 = ((rect_node_t *)n)->rect.top;
if (y1 < by1) by1 = y1;
y2 = y1 + ((rect_node_t *)n)->rect.height;
@@ -1003,7 +1028,7 @@ evas_common_tilebuf_get_render_rects(Tilebuf *tb)
}
else
return NULL;
-
+
/* magic number - if we have > MAXREG regions to update, take bounding */
if (num > MAXREG)
{
@@ -1055,7 +1080,7 @@ evas_common_tilebuf_get_render_rects(Tilebuf *tb)
return rects;
}
-EAPI void
+EVAS_API void
evas_common_tilebuf_free_render_rects(Tilebuf_Rect *rects)
{
free(rects);
diff --git a/src/lib/evas/common/language/evas_bidi_utils.c b/src/lib/evas/common/language/evas_bidi_utils.c
index ab1afeb1f7..61750d5d76 100644
--- a/src/lib/evas/common/language/evas_bidi_utils.c
+++ b/src/lib/evas/common/language/evas_bidi_utils.c
@@ -105,7 +105,7 @@ evas_bidi_is_rtl_str(const Eina_Unicode *str)
* @param len the length of th string.
* @return #EINA_TRUE on success, #EINA_FALSE otherwise.
*/
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_bidi_shape_string(Eina_Unicode *eina_ustr, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, size_t len)
{
FriBidiChar *ustr, *base_ustr = NULL;
diff --git a/src/lib/evas/common/language/evas_bidi_utils.h b/src/lib/evas/common/language/evas_bidi_utils.h
index 9b4ea68d64..a2af78e856 100644
--- a/src/lib/evas/common/language/evas_bidi_utils.h
+++ b/src/lib/evas/common/language/evas_bidi_utils.h
@@ -151,7 +151,7 @@ evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr, size_t len, int *se
void
evas_bidi_props_copy_and_ref(const Evas_BiDi_Props *src, Evas_BiDi_Props *dst);
-EAPI Eina_Bool
+EVAS_API Eina_Bool
evas_bidi_shape_string(Eina_Unicode *eina_ustr, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, size_t len);
void
diff --git a/src/lib/evas/common/region.c b/src/lib/evas/common/region.c
index 73c118d407..195644f7bb 100644
--- a/src/lib/evas/common/region.c
+++ b/src/lib/evas/common/region.c
@@ -21,20 +21,20 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
-
-Copyright 1987, 1988, 1989 by
-Digital Equipment Corporation, Maynard, Massachusetts.
+
+Copyright 1987, 1988, 1989 by
+Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -1252,7 +1252,7 @@ region_rect_inside(Region *region, Box *bx)
return REGION_STATE_PARTIAL;
}
- // (x,y) starts at upper left of rect, moving to the right and down
+ // (x,y) starts at upper left of rect, moving to the right and down
x = bx->x1;
y = bx->y1;
diff --git a/src/lib/evas/common/region.h b/src/lib/evas/common/region.h
index 0cdaffd842..cacdb1060b 100644
--- a/src/lib/evas/common/region.h
+++ b/src/lib/evas/common/region.h
@@ -30,13 +30,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL