From 825a3d837a33f226c879cd02ad15c3fba57e8b2c Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 23 Jan 2012 23:30:42 +1000 Subject: Update the EFL to what I'm actually using, coz I'm using some stuff not yet released. --- libraries/evas/src/lib/engines/common/Makefile.in | 8 +- .../src/lib/engines/common/evas_convert_rgb_16.c | 84 ++-- .../src/lib/engines/common/evas_convert_rgb_32.c | 347 +++++++++++---- .../evas/src/lib/engines/common/evas_convert_yuv.c | 4 +- libraries/evas/src/lib/engines/common/evas_cpu.c | 4 + .../evas/src/lib/engines/common/evas_draw_main.c | 68 ++- .../evas/src/lib/engines/common/evas_font_draw.c | 135 ++++-- .../evas/src/lib/engines/common/evas_font_main.c | 4 +- .../evas/src/lib/engines/common/evas_image_data.c | 4 + .../evas/src/lib/engines/common/evas_image_load.c | 4 + .../evas/src/lib/engines/common/evas_image_main.c | 56 +-- .../src/lib/engines/common/evas_image_scalecache.c | 2 - .../evas/src/lib/engines/common/evas_line_main.c | 475 ++++++++++++++++++--- .../src/lib/engines/common/evas_op_add/Makefile.in | 8 +- .../lib/engines/common/evas_op_blend/Makefile.in | 8 +- .../common/evas_op_blend/op_blend_color_sse3.c | 3 +- .../evas_op_blend/op_blend_mask_color_sse3.c | 3 +- .../common/evas_op_blend/op_blend_pixel_sse3.c | 1 - .../lib/engines/common/evas_op_copy/Makefile.in | 8 +- .../lib/engines/common/evas_op_mask/Makefile.in | 8 +- .../src/lib/engines/common/evas_op_mul/Makefile.in | 8 +- .../src/lib/engines/common/evas_op_sub/Makefile.in | 8 +- .../src/lib/engines/common/evas_polygon_main.c | 40 +- .../src/lib/engines/common/evas_rectangle_main.c | 34 +- .../src/lib/engines/common/evas_scale_sample.c | 113 +++-- libraries/evas/src/lib/engines/common/evas_tiler.c | 4 + .../lib/engines/common/language/evas_bidi_utils.c | 4 + .../engines/common/language/evas_language_utils.c | 6 + 28 files changed, 1095 insertions(+), 356 deletions(-) (limited to 'libraries/evas/src/lib/engines/common') diff --git a/libraries/evas/src/lib/engines/common/Makefile.in b/libraries/evas/src/lib/engines/common/Makefile.in index b0162df..7d1f20a 100644 --- a/libraries/evas/src/lib/engines/common/Makefile.in +++ b/libraries/evas/src/lib/engines/common/Makefile.in @@ -252,8 +252,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -270,6 +268,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -351,6 +351,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c index b30ec1e..796ff17 100644 --- a/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c +++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c @@ -117,7 +117,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int sr } #endif return; - pal = 0; + (void)pal; #else DATA16 *d = (DATA16 *)dst; int w0 = w; @@ -144,7 +144,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int sr d += dst_jump; } return; - pal = 0; + (void)pal; #endif } #endif @@ -216,7 +216,7 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src } #endif return; - pal = 0; + (void)pal; #else DATA16 *d = (DATA16 *)dst; int w0 = w; @@ -233,7 +233,7 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src d += dst_jump; } return; - pal = 0; + (void)pal; #endif } #endif @@ -295,7 +295,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -333,7 +333,7 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -394,7 +394,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -432,7 +432,7 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -493,7 +493,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP2_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -531,7 +531,7 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -592,7 +592,7 @@ evas_common_convert_rgba2_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int sr CONVERT_LOOP2_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -630,7 +630,7 @@ evas_common_convert_rgba_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src CONVERT_LOOP_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -691,7 +691,7 @@ evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -731,7 +731,7 @@ evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -792,7 +792,7 @@ evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -830,7 +830,7 @@ evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -891,7 +891,7 @@ evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP2_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -929,7 +929,7 @@ evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -988,7 +988,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int sr CONVERT_LOOP2_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1025,7 +1025,7 @@ evas_common_convert_rgba_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src CONVERT_LOOP_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1084,7 +1084,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1121,7 +1121,7 @@ evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1180,7 +1180,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1217,7 +1217,7 @@ evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1276,7 +1276,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP2_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1313,7 +1313,7 @@ evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1372,7 +1372,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int CONVERT_LOOP2_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1409,7 +1409,7 @@ evas_common_convert_rgba_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int CONVERT_LOOP_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1468,7 +1468,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 * CONVERT_LOOP2_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1505,7 +1505,7 @@ evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *d CONVERT_LOOP_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1565,7 +1565,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 * CONVERT_LOOP2_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1602,7 +1602,7 @@ evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *d CONVERT_LOOP_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1661,7 +1661,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *d CONVERT_LOOP2_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1698,7 +1698,7 @@ evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *ds CONVERT_LOOP_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1757,7 +1757,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int sr CONVERT_LOOP2_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1794,7 +1794,7 @@ evas_common_convert_rgba_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src CONVERT_LOOP_END_ROT_0(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1853,7 +1853,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1890,7 +1890,7 @@ evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_180(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1949,7 +1949,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst CONVERT_LOOP2_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -1986,7 +1986,7 @@ evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_270(); return; - pal = 0; + (void)pal; } #endif #endif @@ -2045,7 +2045,7 @@ evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP2_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif @@ -2082,7 +2082,7 @@ evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, CONVERT_LOOP_END_ROT_90(); return; - pal = 0; + (void)pal; } #endif #endif diff --git a/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c b/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c index 41dac6f..0401a4a 100644 --- a/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c +++ b/libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c @@ -48,15 +48,167 @@ evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180 (DATA32 *src, DATA8 *dst, int #endif #endif +#ifdef TILE_ROTATE +#define FAST_SIMPLE_ROTATE(suffix, pix_type) \ + static void \ + blt_rotated_90_trivial_##suffix(pix_type *dst, \ + int dst_stride, \ + const pix_type *src, \ + int src_stride, \ + int w, \ + int h) \ + { \ + int x, y; \ + for (y = 0; y < h; y++) \ + { \ + const pix_type *s = src + (h - y - 1); \ + pix_type *d = dst + (dst_stride * y); \ + for (x = 0; x < w; x++) \ + { \ + *d++ = *s; \ + s += src_stride; \ + } \ + } \ + } \ + static void \ + blt_rotated_270_trivial_##suffix(pix_type *dst, \ + int dst_stride, \ + const pix_type *src, \ + int src_stride, \ + int w, \ + int h) \ + { \ + int x, y; \ + for (y = 0; y < h; y++) \ + { \ + const pix_type *s = src + (src_stride * (w - 1)) + y; \ + pix_type *d = dst + (dst_stride * y); \ + for (x = 0; x < w; x++) \ + { \ + *d++ = *s; \ + s -= src_stride; \ + } \ + } \ + } \ + static void \ + blt_rotated_90_##suffix(pix_type *dst, \ + int dst_stride, \ + const pix_type *src, \ + int src_stride, \ + int w, \ + int h) \ + { \ + int x, leading_pixels = 0, trailing_pixels = 0; \ + const int TILE_SIZE = TILE_CACHE_LINE_SIZE / sizeof(pix_type); \ + if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) \ + { \ + leading_pixels = TILE_SIZE - \ + (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ + if (leading_pixels > w) \ + leading_pixels = w; \ + blt_rotated_90_trivial_##suffix(dst, \ + dst_stride, \ + src, \ + src_stride, \ + leading_pixels, \ + h); \ + dst += leading_pixels; \ + src += leading_pixels * src_stride; \ + w -= leading_pixels; \ + } \ + if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) \ + { \ + trailing_pixels = (((uintptr_t)(dst + w) & \ + (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ + if (trailing_pixels > w) \ + trailing_pixels = w; \ + w -= trailing_pixels; \ + } \ + for (x = 0; x < w; x += TILE_SIZE) \ + { \ + blt_rotated_90_trivial_##suffix(dst + x, \ + dst_stride, \ + src + (src_stride * x), \ + src_stride, \ + TILE_SIZE, \ + h); \ + } \ + if (trailing_pixels) \ + blt_rotated_90_trivial_##suffix(dst + w, \ + dst_stride, \ + src + (w * src_stride), \ + src_stride, \ + trailing_pixels, \ + h); \ + } \ + static void \ + blt_rotated_270_##suffix(pix_type *dst, \ + int dst_stride, \ + const pix_type *src, \ + int src_stride, \ + int w, \ + int h) \ + { \ + int x, leading_pixels = 0, trailing_pixels = 0; \ + const int TILE_SIZE = TILE_CACHE_LINE_SIZE / sizeof(pix_type); \ + if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) \ + { \ + leading_pixels = TILE_SIZE - \ + (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ + if (leading_pixels > w) \ + leading_pixels = w; \ + blt_rotated_270_trivial_##suffix(dst, \ + dst_stride, \ + src + (src_stride * (w - leading_pixels)), \ + src_stride, \ + leading_pixels, \ + h); \ + dst += leading_pixels; \ + w -= leading_pixels; \ + } \ + if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) \ + { \ + trailing_pixels = (((uintptr_t)(dst + w) & \ + (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ + if (trailing_pixels > w) \ + trailing_pixels = w; \ + w -= trailing_pixels; \ + src += trailing_pixels * src_stride; \ + } \ + for (x = 0; x < w; x += TILE_SIZE) \ + { \ + blt_rotated_270_trivial_##suffix(dst + x, \ + dst_stride, \ + src + (src_stride * (w - x - TILE_SIZE)), \ + src_stride, \ + TILE_SIZE, \ + h); \ + } \ + if (trailing_pixels) \ + blt_rotated_270_trivial_##suffix(dst + w, \ + dst_stride, \ + src - (trailing_pixels * src_stride), \ + src_stride, \ + trailing_pixels, \ + h); \ + } + +FAST_SIMPLE_ROTATE(8888, DATA8) +#endif + + #ifdef BUILD_CONVERT_32_RGB_8888 #ifdef BUILD_CONVERT_32_RGB_ROT270 void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { +#ifdef TILE_ROTATE + blt_rotated_270_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ; +#else DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; - + dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_270(); @@ -64,6 +216,7 @@ evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int *dst_ptr = *src_ptr; CONVERT_LOOP_END_ROT_270(); +#endif return; } #endif @@ -74,106 +227,118 @@ evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { -#ifndef BUILD_NEON +# ifndef BUILD_NEON +# ifdef TILE_ROTATE + blt_rotated_90_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ; +# else DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; - + dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_90(); *dst_ptr = *src_ptr; CONVERT_LOOP_END_ROT_90(); -#else +# endif + +# else + +# ifdef TILE_ROTATE + blt_rotated_90_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ; +# else if ((w & 1) || (h & 1)) { - /* Rarely (if ever) if ever: so slow path is fine */ - DATA32 *src_ptr; - DATA32 *dst_ptr; - int x, y; - - dst_ptr = (DATA32 *)dst; - CONVERT_LOOP_START_ROT_90(); - - *dst_ptr = *src_ptr; - - CONVERT_LOOP_END_ROT_90(); - } else { -#define AP "convert_rgba32_rot_90_" - asm volatile ( - ".fpu neon \n\t" - " mov %[s1], %[src] \n\t" - " add %[s1], %[h],lsl #2 \n\t" - " sub %[s1], #8 \n\t" - - " mov %[s2], %[src] \n\t" - " add %[s2], %[h], lsl #3 \n\t" - " add %[s2], %[sjmp], lsr #1 \n\t" - " sub %[s2], #8 \n\t" - - " mov %[d1], %[dst] \n\t" - - " add %[d2], %[d1], %[djmp] \n\t" - " add %[d2], %[w], lsl #2 \n\t" - - " mov %[sadv], %[h], lsl #3 \n\t" - " add %[sadv], %[sjmp], lsl #1 \n\t" - - " mov %[y], #0 \n\t" - " mov %[x], #0 \n\t" - AP"loop: \n\t" - " vld1.u32 d0, [%[s1]] \n\t" - " vld1.u32 d1, [%[s2]] \n\t" - " add %[x], #2 \n\t" - " add %[s1], %[sadv] \n\t" - " add %[s2], %[sadv] \n\t" - " vtrn.u32 d0, d1 \n\t" - " cmp %[x], %[w] \n\t" - " vst1.u32 d1, [%[d1]]! \n\t" - " vst1.u32 d0, [%[d2]]! \n\t" - " blt "AP"loop \n\t" - - " mov %[x], #0 \n\t" - " add %[d1], %[djmp] \n\t" - " add %[d1], %[w], lsl #2 \n\t" - " add %[d2], %[djmp] \n\t" - " add %[d2], %[w], lsl #2 \n\t" - - " mov %[s1], %[src] \n\t" - " add %[s1], %[h], lsl #2 \n\t" - " sub %[s1], %[y], lsl #2 \n\t" - " sub %[s1], #16 \n\t" - - " add %[s2], %[s1], %[h], lsl #2 \n\t" - " add %[s2], %[sjmp], lsl #2 \n\t" - - " add %[y], #2 \n\t" - - " cmp %[y], %[h] \n\t" - " blt "AP"loop \n\t" - - : // Out - : [s1] "r" (1), - [s2] "r" (11), - [d1] "r" (2), - [d2] "r" (12), - [src] "r" (src), - [dst] "r" (dst), - [x] "r" (3), - [y] "r" (4), - [w] "r" (w), - [h] "r" (h), - [sadv] "r" (5), - [sjmp] "r" (src_jump * 4), - [djmp] "r" (dst_jump * 4 * 2) - : "d0", "d1", "memory", "cc"// Clober - - - ); - } -#undef AP -#endif + /* Rarely (if ever) if ever: so slow path is fine */ + DATA32 *src_ptr; + DATA32 *dst_ptr; + int x, y; + + dst_ptr = (DATA32 *)dst; + CONVERT_LOOP_START_ROT_90(); + + *dst_ptr = *src_ptr; + + CONVERT_LOOP_END_ROT_90(); + } + else + { +# define AP "convert_rgba32_rot_90_" + asm volatile ( + ".fpu neon \n\t" + " mov %[s1], %[src] \n\t" + " add %[s1], %[s1], %[h],lsl #2 \n\t" + " sub %[s1], #8 \n\t" + + " mov %[s2], %[src] \n\t" + " add %[s2], %[s2], %[h], lsl #3 \n\t" + " add %[s2], %[s2], %[sjmp], lsr #1 \n\t" + " sub %[s2], #8 \n\t" + + " mov %[d1], %[dst] \n\t" + + " add %[d2], %[d1], %[djmp] \n\t" + " add %[d2], %[d2], %[w], lsl #2 \n\t" + + " mov %[sadv], %[h], lsl #3 \n\t" + " add %[sadv], %[sadv], %[sjmp], lsl #1\n\t" + + " mov %[y], #0 \n\t" + " mov %[x], #0 \n\t" + AP"loop: \n\t" + " vld1.u32 d0, [%[s1]] \n\t" + " vld1.u32 d1, [%[s2]] \n\t" + " add %[x], #2 \n\t" + " add %[s1], %[sadv] \n\t" + " add %[s2], %[sadv] \n\t" + " vtrn.u32 d0, d1 \n\t" + " cmp %[x], %[w] \n\t" + " vst1.u32 d1, [%[d1]]! \n\t" + " vst1.u32 d0, [%[d2]]! \n\t" + " blt "AP"loop \n\t" + + " mov %[x], #0 \n\t" + " add %[d1], %[djmp] \n\t" + " add %[d1], %[d1], %[w], lsl #2 \n\t" + " add %[d2], %[djmp] \n\t" + " add %[d2], %[d2], %[w], lsl #2 \n\t" + + " mov %[s1], %[src] \n\t" + " add %[s1], %[s1], %[h], lsl #2 \n\t" + " sub %[s1], %[s1], %[y], lsl #2 \n\t" + " sub %[s1], #16 \n\t" + + " add %[s2], %[s1], %[h], lsl #2 \n\t" + " add %[s2], %[s2], %[sjmp], lsl #2 \n\t" + + " add %[y], #2 \n\t" + + " cmp %[y], %[h] \n\t" + " blt "AP"loop \n\t" + + : // Out + : [s1] "r" (1), + [s2] "r" (11), + [d1] "r" (2), + [d2] "r" (12), + [src] "r" (src), + [dst] "r" (dst), + [x] "r" (3), + [y] "r" (4), + [w] "r" (w), + [h] "r" (h), + [sadv] "r" (5), + [sjmp] "r" (src_jump * 4), + [djmp] "r" (dst_jump * 4 * 2) + : "d0", "d1", "memory", "cc"// Clober + + + ); + } +# undef AP +# endif +# endif return; } #endif @@ -448,7 +613,7 @@ evas_common_convert_rgba_to_32bpp_rgb_666(DATA32 *src, DATA8 *dst, int src_jump, CONVERT_LOOP_START_ROT_0(); - *dst_ptr = + *dst_ptr = (((R_VAL(src_ptr) << 12) | (B_VAL(src_ptr) >> 2)) & 0x03f03f) | ((G_VAL(src_ptr) << 4) & 0x000fc0); diff --git a/libraries/evas/src/lib/engines/common/evas_convert_yuv.c b/libraries/evas/src/lib/engines/common/evas_convert_yuv.c index a0d155c..000cb01 100644 --- a/libraries/evas/src/lib/engines/common/evas_convert_yuv.c +++ b/libraries/evas/src/lib/engines/common/evas_convert_yuv.c @@ -1091,7 +1091,7 @@ _evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int const int offset_value[2] = { 0, 64 * 16 }; int mb_x, mb_y, mb_w, mb_h; int base_h; - int uv_x, uv_y, uv_step; + int uv_x, uv_step; int stride; /* Idea iterate over each macroblock and convert each of them using _evas_nv12torgb_raster */ @@ -1128,7 +1128,7 @@ _evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int base_h = (mb_h >> 1) + (mb_h & 0x1); stride = w * sizeof (int); - uv_x = 0; uv_y = 0; + uv_x = 0; /* In this format we linearize macroblock on two line to form a Z and it's invert */ for (mb_y = 0; mb_y < (mb_h >> 1); mb_y++) diff --git a/libraries/evas/src/lib/engines/common/evas_cpu.c b/libraries/evas/src/lib/engines/common/evas_cpu.c index cff8b2b..fe90c5b 100644 --- a/libraries/evas/src/lib/engines/common/evas_cpu.c +++ b/libraries/evas/src/lib/engines/common/evas_cpu.c @@ -74,6 +74,7 @@ evas_common_cpu_sse3_test(void) #endif } +#ifdef BUILD_ALTIVEC void evas_common_cpu_altivec_test(void) { @@ -85,6 +86,7 @@ evas_common_cpu_altivec_test(void) #endif /* __VEC__ */ #endif /* __POWERPC__ */ } +#endif /* BUILD_ALTIVEC */ void evas_common_cpu_neon_test(void) @@ -177,6 +179,7 @@ evas_common_cpu_init(void) #endif /* BUILD_SSE3 */ #endif /* BUILD_SSE */ #endif /* BUILD_MMX */ +#ifdef BUILD_ALTIVEC #ifdef __POWERPC__ #ifdef __VEC__ cpu_feature_mask |= CPU_FEATURE_ALTIVEC * @@ -186,6 +189,7 @@ evas_common_cpu_init(void) cpu_feature_mask &= ~CPU_FEATURE_ALTIVEC; #endif /* __VEC__ */ #endif /* __POWERPC__ */ +#endif /* BUILD_ALTIVEC */ #ifdef __SPARC__ cpu_feature_mask |= CPU_FEATURE_VIS * evas_common_cpu_feature_test(evas_common_cpu_vis_test); diff --git a/libraries/evas/src/lib/engines/common/evas_draw_main.c b/libraries/evas/src/lib/engines/common/evas_draw_main.c index 7652708..def19a8 100644 --- a/libraries/evas/src/lib/engines/common/evas_draw_main.c +++ b/libraries/evas/src/lib/engines/common/evas_draw_main.c @@ -75,6 +75,14 @@ evas_common_draw_context_free(RGBA_Draw_Context *dc) { if (!dc) return; +#ifdef HAVE_PIXMAN + if (dc->col.pixman_color_image) + { + pixman_image_unref(dc->col.pixman_color_image); + dc->col.pixman_color_image = NULL; + } +#endif + evas_common_draw_context_apply_clean_cutouts(&dc->cutout); free(dc); } @@ -133,6 +141,20 @@ evas_common_draw_context_set_color(RGBA_Draw_Context *dc, int r, int g, int b, i G_VAL(&(dc->col.col)) = (DATA8)g; B_VAL(&(dc->col.col)) = (DATA8)b; A_VAL(&(dc->col.col)) = (DATA8)a; +#ifdef HAVE_PIXMAN + if (dc && 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 + } EAPI void @@ -159,12 +181,42 @@ evas_common_draw_context_set_mask(RGBA_Draw_Context *dc, RGBA_Image *mask, int x dc->mask.y = y; dc->mask.w = w; dc->mask.h = h; + +#ifdef HAVE_PIXMAN + if (mask->pixman.im) + pixman_image_unref(mask->pixman.im); + + if (mask->cache_entry.flags.alpha) + { + mask->pixman.im = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h, + (uint32_t *)mask->mask.mask, + w * 4); + } + else + { + mask->pixman.im = pixman_image_create_bits(PIXMAN_x8r8g8b8, w, h, + (uint32_t *)mask->mask.mask, + w * 4); + } +#endif + } EAPI void evas_common_draw_context_unset_mask(RGBA_Draw_Context *dc) { dc->mask.mask = NULL; + +#ifdef HAVE_PIXMAN + RGBA_Image *mask; + mask = (RGBA_Image *)dc->mask.mask; + + if (mask && mask->pixman.im) + { + pixman_image_unref(mask->pixman.im); + mask->pixman.im = NULL; + } +#endif } @@ -179,32 +231,32 @@ evas_common_draw_context_add_cutout(RGBA_Draw_Context *dc, int x, int y, int w, { #if 1 // this is a bit faster int xa1, xa2, xb1, xb2; - + xa1 = x; xa2 = xa1 + w - 1; xb1 = dc->clip.x; if (xa2 < xb1) return; xb2 = xb1 + dc->clip.w - 1; if (xa1 >= xb2) return; - if (xa2 > xb2) xa2 = xb2; + if (xa2 > xb2) xa2 = xb2; if (xb1 > xa1) xa1 = xb1; x = xa1; w = xa2 - xa1 + 1; - + xa1 = y; xa2 = xa1 + h - 1; xb1 = dc->clip.y; if (xa2 < xb1) return; - xb2 = xb1 + dc->clip.h - 1; + xb2 = xb1 + dc->clip.h - 1; if (xa1 >= xb2) return; - if (xa2 > xb2) xa2 = xb2; + if (xa2 > xb2) xa2 = xb2; if (xb1 > xa1) xa1 = xb1; y = xa1; h = xa2 - xa1 + 1; -#else +#else RECTS_CLIP_TO_RECT(x, y, w, h, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); -#endif +#endif if ((w < 1) || (h < 1)) return; } evas_common_draw_context_cutouts_add(&dc->cutout, x, y, w, h); @@ -513,7 +565,7 @@ evas_common_draw_context_apply_cutouts(RGBA_Draw_Context *dc) if (!dc->clip.use) return NULL; if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) return NULL; - + res = evas_common_draw_context_cutouts_new(); evas_common_draw_context_cutouts_add(res, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); diff --git a/libraries/evas/src/lib/engines/common/evas_font_draw.c b/libraries/evas/src/lib/engines/common/evas_font_draw.c index 94aa085..638cdfe 100644 --- a/libraries/evas/src/lib/engines/common/evas_font_draw.c +++ b/libraries/evas/src/lib/engines/common/evas_font_draw.c @@ -22,7 +22,7 @@ static int max_cached_words = WORD_CACHE_NWORDS; -struct prword +struct prword { EINA_INLIST; struct cinfo *cinfo; @@ -34,16 +34,16 @@ struct prword int baseline; }; -struct cinfo +struct cinfo { FT_UInt index; - struct + struct { int x, y; } pos; int posx; RGBA_Font_Glyph *fg; - struct + struct { int w,h; int rows; @@ -77,11 +77,11 @@ evas_common_font_draw_init(void) #ifdef EVAS_FRAME_QUEUING EAPI void evas_common_font_draw_finish(void) -{ +{ } #endif -/* +/* * BiDi handling: We receive the shaped string + other props from text_props, * we need to reorder it so we'll have the visual string (the way we draw) * and then for kerning we have to switch the order of the kerning query (as the prev @@ -89,7 +89,7 @@ evas_common_font_draw_finish(void) */ static void evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn __UNUSED__, int x, int y, - const Evas_Text_Props *text_props, RGBA_Gfx_Func func, int ext_x, int ext_y, int ext_w, + const Evas_Text_Props *text_props, RGBA_Gfx_Func func, int ext_x, int ext_y, int ext_w, int ext_h, int im_w, int im_h __UNUSED__) { DATA32 *im; @@ -136,7 +136,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font { xrun -= x + xrun - ext_x - ext_w; } - if (x < ext_x) + if (x < ext_x) { int excess = ext_x - x; xstart = excess - 1; @@ -244,10 +244,29 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font if (j < w) j = w; h = fg->glyph_out->bitmap.rows; /* - if ((fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays) - && (fg->glyph_out->bitmap.num_grays == 256) - ) - */ + if ((fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays) + && (fg->glyph_out->bitmap.num_grays == 256) + ) + */ + +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_FONT + int index; + DATA32 *font_alpha_buffer; + pixman_image_t *font_mask_image; + + font_alpha_buffer = alloca(w * h * sizeof(DATA32)); + for (index = 0; index < (w * h); index++) + font_alpha_buffer[index] = data[index] << 24; + + font_mask_image = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h, + font_alpha_buffer, + w * sizeof(DATA32)); + + if (!font_mask_image) return; +# endif +#endif + { if ((j > 0) && (chr_x + w > ext_x)) { @@ -255,44 +274,63 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font { /* ext glyph draw */ dc->font_ext.func.gl_draw(dc->font_ext.data, - (void *)dst, - dc, fg, chr_x, - y - (chr_y - y)); + (void *)dst, + dc, fg, chr_x, + y - (chr_y - y)); } else { if ((fg->glyph_out->bitmap.num_grays == 256) && - (fg->glyph_out->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY)) + (fg->glyph_out->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY)) { - for (i = 0; i < h; i++) +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_FONT + if ((dst->pixman.im) && + (dc->col.pixman_color_image)) + pixman_image_composite(PIXMAN_OP_OVER, + dc->col.pixman_color_image, + font_mask_image, + dst->pixman.im, + chr_x, + y - (chr_y - y), + 0, 0, + chr_x, + y - (chr_y - y), + w, h); + else +# endif +#endif { - int dx, dy; - int in_x, in_w; - - in_x = 0; - in_w = 0; - dx = chr_x; - dy = y - (chr_y - i - y); + for (i = 0; i < h; i++) + { + int dx, dy; + int in_x, in_w; + + in_x = 0; + in_w = 0; + dx = chr_x; + dy = y - (chr_y - i - y); #ifdef EVAS_SLI - if (((dy) % dc->sli.h) == dc->sli.y) + if (((dy) % dc->sli.h) == dc->sli.y) #endif - { - if ((dx < (ext_x + ext_w)) && - (dy >= (ext_y)) && - (dy < (ext_y + ext_h))) { - if (dx + w > (ext_x + ext_w)) - in_w += (dx + w) - (ext_x + ext_w); - if (dx < ext_x) + if ((dx < (ext_x + ext_w)) && + (dy >= (ext_y)) && + (dy < (ext_y + ext_h))) { - in_w += ext_x - dx; - in_x = ext_x - dx; - dx = ext_x; - } - if (in_w < w) - { - func(NULL, data + (i * j) + in_x, dc->col.col, - im + (dy * im_w) + dx, w - in_w); + if (dx + w > (ext_x + ext_w)) + in_w += (dx + w) - (ext_x + ext_w); + if (dx < ext_x) + { + in_w += ext_x - dx; + in_x = ext_x - dx; + dx = ext_x; + } + if (in_w < w) + { + func(NULL, data + (i * j) + in_x, dc->col.col, + im + (dy * im_w) + dx, w - in_w); + } } } } @@ -309,7 +347,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font { int dx, dy; int in_x, in_w, end; - + in_x = 0; in_w = 0; dx = chr_x; @@ -333,8 +371,8 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font dp++; } if ((dx < (ext_x + ext_w)) && - (dy >= (ext_y)) && - (dy < (ext_y + ext_h))) + (dy >= (ext_y)) && + (dy < (ext_y + ext_h))) { if (dx + w > (ext_x + ext_w)) in_w += (dx + w) - (ext_x + ext_w); @@ -347,7 +385,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font if (in_w < w) { func(NULL, tmpbuf + in_x, dc->col.col, - im + (dy * im_w) + dx, w - in_w); + im + (dy * im_w) + dx, w - in_w); } } } @@ -356,6 +394,11 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font } } } +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_FONT + pixman_image_unref(font_mask_image); +# endif +#endif } else break; @@ -573,7 +616,7 @@ evas_font_word_prerender(RGBA_Draw_Context *dc, const Evas_Text_Props *text_prop } } } - else + else { im = NULL; } @@ -599,7 +642,7 @@ evas_font_word_prerender(RGBA_Draw_Context *dc, const Evas_Text_Props *text_prop { struct prword *last = (struct prword *)(words->last); - if (last) + if (last) { if (last->im) free(last->im); if (last->cinfo) free(last->cinfo); diff --git a/libraries/evas/src/lib/engines/common/evas_font_main.c b/libraries/evas/src/lib/engines/common/evas_font_main.c index 64b1d5e..7b3dabe 100644 --- a/libraries/evas/src/lib/engines/common/evas_font_main.c +++ b/libraries/evas/src/lib/engines/common/evas_font_main.c @@ -39,8 +39,6 @@ evas_common_font_init(void) EAPI void evas_common_font_shutdown(void) { - int error; - if (initialised < 1) return; initialised--; if (initialised != 0) return; @@ -53,7 +51,7 @@ evas_common_font_shutdown(void) evas_common_font_cache_set(0); evas_common_font_flush(); - error = FT_Done_FreeType(evas_ft_lib); + FT_Done_FreeType(evas_ft_lib); #ifdef EVAS_FRAME_QUEUING evas_common_font_draw_finish(); #endif diff --git a/libraries/evas/src/lib/engines/common/evas_image_data.c b/libraries/evas/src/lib/engines/common/evas_image_data.c index 10b3988..2815ff8 100644 --- a/libraries/evas/src/lib/engines/common/evas_image_data.c +++ b/libraries/evas/src/lib/engines/common/evas_image_data.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include "evas_common.h" diff --git a/libraries/evas/src/lib/engines/common/evas_image_load.c b/libraries/evas/src/lib/engines/common/evas_image_load.c index c7eff3f..21ac5d4 100644 --- a/libraries/evas/src/lib/engines/common/evas_image_load.c +++ b/libraries/evas/src/lib/engines/common/evas_image_load.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include diff --git a/libraries/evas/src/lib/engines/common/evas_image_main.c b/libraries/evas/src/lib/engines/common/evas_image_main.c index d4d847c..d2f8c0b 100644 --- a/libraries/evas/src/lib/engines/common/evas_image_main.c +++ b/libraries/evas/src/lib/engines/common/evas_image_main.c @@ -145,7 +145,7 @@ _evas_common_rgba_image_new(void) #endif evas_common_rgba_image_scalecache_init(&im->cache_entry); - + return &im->cache_entry; } @@ -161,7 +161,7 @@ _evas_common_rgba_image_delete(Image_Entry *ie) LKD(im->cache_entry.ref_fq_del); eina_condition_free(&(im->cache_entry.cond_fq_del)); # endif -#endif +#endif evas_common_rgba_image_scalecache_shutdown(&im->cache_entry); if (ie->info.module) evas_module_unref((Evas_Module *)ie->info.module); /* memset the image to 0x99 because i recently saw a segv where an @@ -173,13 +173,13 @@ _evas_common_rgba_image_delete(Image_Entry *ie) // memset(im, 0x99, sizeof(im)); #ifdef EVAS_CSERVE if (ie->data1) evas_cserve_image_free(ie); -#endif +#endif /* * FIXME: This doesn't seem to be needed... But I'm not sure why. * -- nash { Filtered_Image *fi; - + EINA_LIST_FREE(im->filtered, fi) { free(fi->key); @@ -249,8 +249,8 @@ evas_common_rgba_image_unload(Image_Entry *ie) #endif return; } -#endif - +#endif + if (im->image.data && !im->image.no_free) free(im->image.data); im->image.data = NULL; @@ -266,18 +266,19 @@ void _evas_common_rgba_image_post_surface(Image_Entry *ie) { #ifdef HAVE_PIXMAN - RGBA_Image *im = (RGBA_Image *) ie; - +# ifdef PIXMAN_IMAGE + RGBA_Image *im = (RGBA_Image *)ie; + if (im->pixman.im) pixman_image_unref(im->pixman.im); if (im->cache_entry.flags.alpha) { im->pixman.im = pixman_image_create_bits ( -// FIXME: endianess determines this +// FIXME: endianess determines this PIXMAN_a8r8g8b8, -// PIXMAN_b8g8r8a8, +// PIXMAN_b8g8r8a8, im->cache_entry.w, im->cache_entry.h, - im->image.data, + im->image.data, im->cache_entry.w * 4 ); } @@ -285,16 +286,19 @@ _evas_common_rgba_image_post_surface(Image_Entry *ie) { im->pixman.im = pixman_image_create_bits ( -// FIXME: endianess determines this +// FIXME: endianess determines this PIXMAN_x8r8g8b8, // PIXMAN_b8g8r8x8, im->cache_entry.w, im->cache_entry.h, - im->image.data, + im->image.data, im->cache_entry.w * 4 ); } +# else + (void)ie; +# endif #else - ie = NULL; + (void)ie; #endif } @@ -306,7 +310,7 @@ _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned #ifdef EVAS_CSERVE if (ie->data1) return 0; -#endif +#endif if (im->image.no_free) return 0; if (im->flags & RGBA_IMAGE_ALPHA_ONLY) @@ -328,7 +332,7 @@ _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned # endif #endif _evas_common_rgba_image_post_surface(ie); - + return 0; } @@ -338,12 +342,14 @@ _evas_common_rgba_image_surface_delete(Image_Entry *ie) RGBA_Image *im = (RGBA_Image *) ie; #ifdef HAVE_PIXMAN +# ifdef PIXMAN_IMAGE if (im->pixman.im) { pixman_image_unref(im->pixman.im); im->pixman.im = NULL; } -#endif +# endif +#endif if (ie->file) DBG("unload: [%p] %s %s", ie, ie->file, ie->key); if ((im->cs.data) && (im->image.data)) @@ -364,7 +370,7 @@ _evas_common_rgba_image_surface_delete(Image_Entry *ie) #ifdef EVAS_CSERVE else if (ie->data1) evas_cserve_image_free(ie); -#endif +#endif im->image.data = NULL; ie->allocated.w = 0; @@ -391,7 +397,7 @@ _evas_common_rgba_image_dirty_region(Image_Entry* ie, unsigned int x __UNUSED__, #ifdef EVAS_CSERVE if (ie->data1) evas_cserve_image_free(ie); -#endif +#endif im->flags |= RGBA_IMAGE_IS_DIRTY; evas_common_rgba_image_scalecache_dirty(&im->cache_entry); } @@ -411,13 +417,13 @@ _evas_common_rgba_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src) { #ifdef EVAS_CSERVE if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src); -#endif +#endif return 1; } #ifdef EVAS_CSERVE if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src); -#endif +#endif evas_common_image_colorspace_normalize(src); evas_common_image_colorspace_normalize(dst); /* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */ @@ -431,18 +437,18 @@ _evas_common_rgba_image_ram_usage(Image_Entry *ie) { RGBA_Image *im = (RGBA_Image *)ie; int size = sizeof(struct _RGBA_Image); - + if (ie->cache_key) size += strlen(ie->cache_key); if (ie->file) size += strlen(ie->file); if (ie->key) size += strlen(ie->key); - + if (im->image.data) { #ifdef EVAS_CSERVE if ((!im->image.no_free) || (ie->data1)) #else if ((!im->image.no_free)) -#endif +#endif size += im->cache_entry.w * im->cache_entry.h * sizeof(DATA32); } size += evas_common_rgba_image_scalecache_usage_get(&im->cache_entry); @@ -590,7 +596,7 @@ evas_common_image_colorspace_normalize(RGBA_Image *im) { #ifdef EVAS_CSERVE if (((Image_Entry *)im)->data1) evas_cserve_image_free(&im->cache_entry); -#endif +#endif if (!im->image.no_free) free(im->image.data); im->image.data = im->cs.data; im->cs.no_free = im->image.no_free; diff --git a/libraries/evas/src/lib/engines/common/evas_image_scalecache.c b/libraries/evas/src/lib/engines/common/evas_image_scalecache.c index 24a4f2d..e4e4790 100644 --- a/libraries/evas/src/lib/engines/common/evas_image_scalecache.c +++ b/libraries/evas/src/lib/engines/common/evas_image_scalecache.c @@ -48,9 +48,7 @@ struct _Scaleitem #ifdef SCALECACHE static unsigned long long use_counter = 0; -#ifdef BUILD_PTHREAD static LK(cache_lock); -#endif static Eina_Inlist *cache_list = NULL; static unsigned int cache_size = 0; static int init = 0; diff --git a/libraries/evas/src/lib/engines/common/evas_line_main.c b/libraries/evas/src/lib/engines/common/evas_line_main.c index 04401cb..aacf805 100644 --- a/libraries/evas/src/lib/engines/common/evas_line_main.c +++ b/libraries/evas/src/lib/engines/common/evas_line_main.c @@ -109,9 +109,24 @@ _evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y) return; if ((dc->clip.use) && (!IN_RECT(x, y, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h))) return; - pfunc = evas_common_gfx_func_composite_color_pt_get(dc->col.col, dst, dc->render_op); - if (pfunc) - pfunc(0, 255, dc->col.col, dst->image.data + (dst->cache_entry.w * y) + x); +#ifdef HAVE_PIXMAN +# 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, + dst->pixman.im, x, y, 0, 0, x, y, 1, 1); + else +# endif +#endif + { + pfunc = evas_common_gfx_func_composite_color_pt_get(dc->col.col, dst, dc->render_op); + if (pfunc) + pfunc(0, 255, dc->col.col, dst->image.data + (dst->cache_entry.w * y) + x); + } } /* @@ -130,6 +145,14 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i RGBA_Gfx_Pt_Func pfunc; RGBA_Gfx_Func sfunc; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; +# endif +#endif + dstw = dst->cache_entry.w; color = dc->col.col; @@ -172,12 +195,30 @@ _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; - sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op); - if (sfunc) - sfunc(NULL, NULL, color, p, len); - } - } - return; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + NULL, dst->pixman.im, + x0, y0, 0, 0, x0, y0, len, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + x0, y0, 0, 0, x0, y0, len, 1); + else +# endif +#endif + { + sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op); + if (sfunc) + sfunc(NULL, NULL, color, p, len); + } + } + } + return; } pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, dc->render_op); @@ -192,17 +233,34 @@ _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; - while (len--) - { +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + NULL, dst->pixman.im, + x0, y0, 0, 0, x0, y0, 1, len); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, dst->pixman.im, + x0, y0, 0, 0, x0, y0, 1, len); + else +# endif +#endif + { + while (len--) + { #ifdef EVAS_SLI - if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y) + if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y) #endif - { - pfunc(0, 255, color, p); - } - p += dstw; - } - } + { + pfunc(0, 255, color, p); + } + p += dstw; + } + } + } return; } @@ -281,16 +339,52 @@ _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, i if (dx > 0) dstw--; else dstw++; } - +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + int pixman_x_position = x0; + int pixman_y_position = y0; + int x_unit = dstw - dst->cache_entry.w; +# endif +#endif + + while (len--) { #ifdef EVAS_SLI if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y) #endif { - pfunc(0, 255, color, p); - } - p += dstw; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + NULL, dst->pixman.im, + pixman_x_position, + pixman_y_position, + 0, 0, pixman_x_position, + pixman_y_position, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pixman_x_position, + pixman_y_position, 0, 0, + pixman_x_position, + pixman_y_position, 1, 1); + else +# endif +#endif + pfunc(0, 255, color, p); + } +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_x_position += x_unit; + pixman_y_position += 1; +# endif +#endif + p += dstw; } } } @@ -456,6 +550,31 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, dx = x1 - x0; dy = y1 - y0; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + int pix_x; + int pix_y; + int pix_x_unit; + int pix_y_unit; + + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; + pix_x = x0; + pix_y = y0; + + if (dx < 0) + pix_x_unit = -1; + else + pix_x_unit = 1; + + if (dy < 0) + pix_y_unit = -1; + else + pix_y_unit = 1; +# endif +#endif + if ( (dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy) ) { _evas_draw_simple_line(dst, dc, x0, y0, x1, y1); @@ -494,6 +613,11 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, prev_y = y; p += dh; py += dely; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_y += pix_y_unit; +# endif +#endif } if (!p1_in) { @@ -509,12 +633,37 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, #endif { if (IN_RANGE(px, py, clw, clh)) - pfunc(0, 255, color, p); - } - next_x: - yy += dyy; - px++; - p++; + { +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + 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 if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else +# endif +#endif + pfunc(0, 255, color, p); + } + } +next_x: + yy += dyy; + px++; + p++; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_x += pix_x_unit; +# endif +#endif } return; } @@ -529,9 +678,14 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, x += ((xx - (x << 16)) >> 15); if (prev_x != x) { - prev_x = x; - px += delx; - p += delx; + prev_x = x; + px += delx; + p += delx; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_x += pix_x_unit; +# endif +#endif } if (!p1_in) { @@ -547,12 +701,38 @@ _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, #endif { if (IN_RANGE(px, py, clw, clh)) - pfunc(0, 255, color, p); - } - next_y: + { +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + 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 if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else +# endif +#endif + pfunc(0, 255, color, p); + } + } +next_y: xx += dxx; py++; p += dstw; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_y += pix_y_unit; +# endif +#endif + } } @@ -568,12 +748,43 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x DATA32 *p, *data, color; RGBA_Gfx_Pt_Func pfunc; + dx = x1 - x0; + dy = y1 - y0; + +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + int pix_x; + int pix_y; + int pix_x_unit; + int pix_y_unit; + + 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; + pix_x = x0; + pix_y = y0; + + if (dx < 0) + pix_x_unit = -1; + else + pix_x_unit = 1; + + if (dy < 0) + pix_y_unit = -1; + else + pix_y_unit = 1; +# endif +#endif if (y0 > y1) EXCHANGE_POINTS(x0, y0, x1, y1); + dx = x1 - x0; dy = y1 - y0; - if ( (dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy) ) + if ((dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy)) { _evas_draw_simple_line(dst, dc, x0, y0, x1, y1); return; @@ -609,9 +820,14 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x y = (yy >> 16); if (prev_y != y) { - prev_y = y; - p += dh; - py += dely; + prev_y = y; + p += dh; + py += dely; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_y += pix_y_unit; +# endif +#endif } if (!p1_in) { @@ -624,39 +840,109 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x } if (px < clw) { - aa = ((yy - (y << 16)) >> 8); - if ((py) < clh) - pfunc(0, 255 - aa, color, p); - if ((py + 1) < clh) - pfunc(0, aa, color, p + dstw); - } - - next_x: - yy += dyy; - px++; - p++; + aa = ((yy - (y << 16)) >> 8); + if ((py) < clh) + { +#ifdef HAVE_PIXMAN +# 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 ) && + (!dc->mask.mask)) + pixman_image_composite(PIXMAN_OP_OVER, + dc->col.pixman_color_image, + aa_mask_image, dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask) ) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else +# endif +#endif + pfunc(0, 255 - aa, color, p); +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_image_unref(aa_mask_image); +# endif +#endif + } + if ((py + 1) < clh) + { +#ifdef HAVE_PIXMAN +# 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) && + (!dc->mask.mask)) + pixman_image_composite(PIXMAN_OP_OVER, + dc->col.pixman_color_image, + aa_mask_image, dst->pixman.im, + pix_x, pix_y + 1, 0, 0, + pix_x, pix_y + 1, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x, pix_y + 1, 0, 0, + pix_x, pix_y + 1, 1, 1); + else +# endif +#endif + pfunc(0, aa, color, p + dstw); +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_image_unref(aa_mask_image); +# endif +#endif + } + } + +next_x: + yy += dyy; + px++; + p++; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_x += pix_x_unit; +# endif +#endif } return; } - + /* steep: y-parametric */ SETUP_LINE_STEEP; while (py < by) { DATA8 aa; - + x = (xx >> 16); if (prev_x != x) { - prev_x = x; - px += delx; - p += delx; + prev_x = x; + px += delx; + p += delx; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_x += pix_x_unit; +# endif +#endif } if (!p1_in) { - if ((px < 0) && (delx < 0)) return; - if ((px > rx) && (delx > 0)) return; + if ((px < 0) && (delx < 0)) return; + if ((px > rx) && (delx > 0)) return; } if (!p0_in) { @@ -664,15 +950,80 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x } if (py < clh) { - aa = ((xx - (x << 16)) >> 8); - if ((px) < clw) - pfunc(0, 255 - aa, color, p); - if ((px + 1) < clw) - pfunc(0, aa, color, p + 1); - } + aa = ((xx - (x << 16)) >> 8); + if ((px) < clw) + { +#ifdef HAVE_PIXMAN +# 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) && + (!dc->mask.mask)) + pixman_image_composite(PIXMAN_OP_OVER, + dc->col.pixman_color_image, + aa_mask_image, dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x, pix_y, 0, 0, + pix_x, pix_y, 1, 1); + else +# endif +#endif + pfunc(0, 255 - aa, color, p); +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + 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, + (uint32_t *)&alpha_data_buffer, 4); + + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(PIXMAN_OP_OVER, + dc->col.pixman_color_image, + aa_mask_image, dst->pixman.im, + pix_x + 1, pix_y, 0, 0, + pix_x + 1, pix_y, 1, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + pix_x + 1, pix_y, 0, 0, + pix_x + 1, pix_y, 1, 1); + else +# endif +#endif + pfunc(0, aa, color, p + 1); +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pixman_image_unref(aa_mask_image); +# endif +#endif + } + } next_y: xx += dxx; py++; p += dstw; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_LINE + pix_y += pix_y_unit; +# endif +#endif } } diff --git a/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in index 4c721f9..78e893d 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in @@ -166,8 +166,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -184,6 +182,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -265,6 +265,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in index e796ef2..e00dac8 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in @@ -203,8 +203,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -221,6 +219,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -302,6 +302,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c index 64d5a86..1843265 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c @@ -53,7 +53,8 @@ _op_blend_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 static void init_blend_color_span_funcs_sse3(void) { - op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_c_dp_sse3; +// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) +// op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_c_dp_sse3; op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_caa_dp_sse3; // FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c index 83230e5..5883d15 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c @@ -168,7 +168,8 @@ _op_blend_mas_can_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, i static void init_blend_mask_color_span_funcs_sse3(void) { - op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_mas_c_dp_sse3; +// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) +// op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_mas_c_dp_sse3; op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_mas_cn_dp_sse3; 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; diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c index 2e72fec..69c597c 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c @@ -146,7 +146,6 @@ init_blend_pixel_span_funcs_sse3(void) op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pas_dp_sse3; op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pan_dp_sse3; - // FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) // op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_p_dpan_sse3; op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pas_dpan_sse3; diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in index 52658a4..40536c0 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in @@ -166,8 +166,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -184,6 +182,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -265,6 +265,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in index 0ccd7f3..d5764b1 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in @@ -166,8 +166,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -184,6 +182,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -265,6 +265,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in index f239cf7..d5452fe 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in @@ -166,8 +166,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -184,6 +182,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -265,6 +265,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in b/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in index b68ed3b..4b93b1b 100644 --- a/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in +++ b/libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in @@ -166,8 +166,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ @@ -184,6 +182,8 @@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ XCB_CFLAGS = @XCB_CFLAGS@ @@ -265,6 +265,10 @@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ +evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ +evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ +evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ +evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ diff --git a/libraries/evas/src/lib/engines/common/evas_polygon_main.c b/libraries/evas/src/lib/engines/common/evas_polygon_main.c index bca3f83..ea0bf13 100644 --- a/libraries/evas/src/lib/engines/common/evas_polygon_main.c +++ b/libraries/evas/src/lib/engines/common/evas_polygon_main.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include "evas_common.h" @@ -133,6 +137,14 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po int ext_x, ext_y, ext_w, ext_h; int *sorted_index; +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_POLY + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; +# endif +#endif + ext_x = 0; ext_y = 0; ext_w = dst->cache_entry.w; @@ -279,10 +291,30 @@ evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Po if (((span->y) % dc->sli.h) == dc->sli.y) #endif { - ptr = dst->image.data + (span->y * (dst->cache_entry.w)) + span->x; - func(NULL, NULL, dc->col.col, ptr, span->w); - } - } +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_POLY + if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (!dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + NULL, dst->pixman.im, + span->x, span->y, 0, 0, + span->x, span->y, span->w, 1); + else if ((dst->pixman.im) && (dc->col.pixman_color_image) && + (dc->mask.mask)) + pixman_image_composite(op, dc->col.pixman_color_image, + dc->mask.mask->pixman.im, + dst->pixman.im, + span->x, span->y, 0, 0, + span->x, span->y, span->w, 1); + else +# endif +#endif + { + ptr = dst->image.data + (span->y * (dst->cache_entry.w)) + span->x; + func(NULL, NULL, dc->col.col, ptr, span->w); + } + } + } while (spans) { span = (RGBA_Span *)spans; diff --git a/libraries/evas/src/lib/engines/common/evas_rectangle_main.c b/libraries/evas/src/lib/engines/common/evas_rectangle_main.c index 28aaf16..fc25fd0 100644 --- a/libraries/evas/src/lib/engines/common/evas_rectangle_main.c +++ b/libraries/evas/src/lib/engines/common/evas_rectangle_main.c @@ -58,16 +58,34 @@ rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, in RECTS_CLIP_TO_RECT(x, y, w, h, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); if ((w <= 0) || (h <= 0)) return; - func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, w, dc->render_op); - ptr = dst->image.data + (y * dst->cache_entry.w) + x; - for (yy = 0; yy < h; yy++) +#ifdef HAVE_PIXMAN +# ifdef PIXMAN_RECT + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + + 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, + dst->pixman.im, x, y, 0, 0, + x, y, w, h); + } + else +# endif +#endif + { + func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, w, dc->render_op); + ptr = dst->image.data + (y * dst->cache_entry.w) + x; + for (yy = 0; yy < h; yy++) + { #ifdef EVAS_SLI - if (((yy + y) % dc->sli.h) == dc->sli.y) + if (((yy + y) % dc->sli.h) == dc->sli.y) #endif - { - func(NULL, NULL, dc->col.col, ptr, w); - } - ptr += dst->cache_entry.w; + { + func(NULL, NULL, dc->col.col, ptr, w); + } + ptr += dst->cache_entry.w; + } } } diff --git a/libraries/evas/src/lib/engines/common/evas_scale_sample.c b/libraries/evas/src/lib/engines/common/evas_scale_sample.c index 54b8e92..a8951b8 100644 --- a/libraries/evas/src/lib/engines/common/evas_scale_sample.c +++ b/libraries/evas/src/lib/engines/common/evas_scale_sample.c @@ -154,7 +154,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, dst_clip_w = m_clip_w; dst_clip_h = m_clip_h; } - + if (dst_clip_x < dst_region_x) { dst_clip_w += dst_clip_x - dst_region_x; @@ -258,7 +258,7 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, func = evas_common_gfx_func_composite_pixel_mask_span_get(src, dst, dst_clip_w, dc->render_op); maskobj = dc->mask.mask; mask = maskobj->mask.mask; -/* +/* if (1 || dst_region_w > src_region_w || dst_region_h > src_region_h){ printf("Mask w/h: %d/%d\n",maskobj->cache_entry.w, maskobj->cache_entry.h); @@ -276,26 +276,47 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, if ((dst_region_w == src_region_w) && (dst_region_h == src_region_h)) { #ifdef HAVE_PIXMAN - if ((1) && - (src->pixman.im) && (dst->pixman.im) && +# ifdef PIXMAN_IMAGE_SCALE_SAMPLE + if ((src->pixman.im) && (dst->pixman.im) && (!dc->mask.mask) && ((!dc->mul.use) || ((dc->mul.use) && (dc->mul.col == 0xffffffff))) && ((dc->render_op == _EVAS_RENDER_COPY) || - (dc->render_op == _EVAS_RENDER_BLEND)) - ) + (dc->render_op == _EVAS_RENDER_BLEND))) { pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY - if (dc->render_op == _EVAS_RENDER_BLEND) op = PIXMAN_OP_OVER; + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; + pixman_image_composite(op, src->pixman.im, NULL, dst->pixman.im, (dst_clip_x - dst_region_x) + src_region_x, - (dst_clip_y - dst_region_y) + src_region_y, + (dst_clip_y - dst_region_y) + src_region_y, 0, 0, - dst_clip_x, dst_clip_y, + dst_clip_x, dst_clip_y, + dst_clip_w, dst_clip_h); + } + else if ((src->pixman.im) && (dst->pixman.im) && + (dc->mask.mask) && (dc->mask.mask->pixman.im) && + ((dc->render_op == _EVAS_RENDER_COPY) || + (dc->render_op == _EVAS_RENDER_BLEND))) + { + // In case of pixel and color operation. + pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY + if (dc->render_op == _EVAS_RENDER_BLEND) + op = PIXMAN_OP_OVER; + + pixman_image_composite(op, + src->pixman.im, dc->mask.mask->pixman.im, + dst->pixman.im, + (dst_clip_x - dst_region_x) + src_region_x, + (dst_clip_y - dst_region_y) + src_region_y, + 0, 0, + dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h); } else +# endif #endif { ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x; @@ -322,59 +343,59 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, } else { - /* fill scale tables */ + /* fill scale tables */ for (x = 0; x < dst_clip_w; x++) - lin_ptr[x] = (((x + dst_clip_x - dst_region_x) * src_region_w) / dst_region_w) + src_region_x; + lin_ptr[x] = (((x + dst_clip_x - dst_region_x) * src_region_w) / dst_region_w) + src_region_x; for (y = 0; y < dst_clip_h; y++) - row_ptr[y] = src_data + (((((y + dst_clip_y - dst_region_y) * src_region_h) / dst_region_h) - + src_region_y) * src_w); + row_ptr[y] = src_data + (((((y + dst_clip_y - dst_region_y) * src_region_h) / dst_region_h) + + src_region_y) * src_w); /* scale to dst */ dptr = dst_ptr; #ifdef DIRECT_SCALE if ((!src->cache_entry.flags.alpha) && - (!dst->cache_entry.flags.alpha) && - (!dc->mul.use)) + (!dst->cache_entry.flags.alpha) && + (!dc->mul.use)) { for (y = 0; y < dst_clip_h; y++) { -#ifdef EVAS_SLI - if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) -#endif - { - dst_ptr = dptr; - for (x = 0; x < dst_clip_w; x++) - { - ptr = row_ptr[y] + lin_ptr[x]; - *dst_ptr = *ptr; - dst_ptr++; - } - } - dptr += dst_w; - } +# ifdef EVAS_SLI + if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) +# endif + { + dst_ptr = dptr; + for (x = 0; x < dst_clip_w; x++) + { + ptr = row_ptr[y] + lin_ptr[x]; + *dst_ptr = *ptr; + dst_ptr++; + } + } + dptr += dst_w; + } } else #endif { /* a scanline buffer */ - buf = alloca(dst_clip_w * sizeof(DATA32)); - for (y = 0; y < dst_clip_h; y++) - { + buf = alloca(dst_clip_w * sizeof(DATA32)); + for (y = 0; y < dst_clip_h; y++) + { #ifdef EVAS_SLI - if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) + if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y) #endif - { - dst_ptr = buf; - for (x = 0; x < dst_clip_w; x++) - { - ptr = row_ptr[y] + lin_ptr[x]; - *dst_ptr = *ptr; - dst_ptr++; - } - /* * blend here [clip_w *] buf -> dptr * */ - func(buf, NULL, dc->mul.col, dptr, dst_clip_w); - } - dptr += dst_w; - } + { + dst_ptr = buf; + for (x = 0; x < dst_clip_w; x++) + { + ptr = row_ptr[y] + lin_ptr[x]; + *dst_ptr = *ptr; + dst_ptr++; + } + /* * blend here [clip_w *] buf -> dptr * */ + func(buf, NULL, dc->mul.col, dptr, dst_clip_w); + } + dptr += dst_w; + } } } } diff --git a/libraries/evas/src/lib/engines/common/evas_tiler.c b/libraries/evas/src/lib/engines/common/evas_tiler.c index 0bbe811..ff359a4 100644 --- a/libraries/evas/src/lib/engines/common/evas_tiler.c +++ b/libraries/evas/src/lib/engines/common/evas_tiler.c @@ -19,7 +19,9 @@ static inline list_node_t *rect_list_add_split_fuzzy(list_t *rects, list_node_t static inline void rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error); static inline void rect_list_add_split_fuzzy_and_merge(list_t *rects, list_node_t *node, int split_accepted_error, int merge_accepted_error); static inline void rect_print(const rect_t r); +#if 0 static inline void rect_list_print(const list_t rects); +#endif static const list_node_t list_node_zeroed = { NULL }; static const list_t list_zeroed = { NULL, NULL }; @@ -117,6 +119,7 @@ rect_print(const rect_t r) INF("", r.left, r.top, r.width, r.height); } +#if 0 static inline void rect_list_print(const list_t rects) { @@ -143,6 +146,7 @@ rect_list_print(const list_t rects) } putchar(']'); } +#endif static inline void rect_list_append_node(list_t *rects, list_node_t *node) diff --git a/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c b/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c index 9f7859b..002cfbe 100644 --- a/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c +++ b/libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include diff --git a/libraries/evas/src/lib/engines/common/language/evas_language_utils.c b/libraries/evas/src/lib/engines/common/language/evas_language_utils.c index 9c9b3e3..b362f10 100644 --- a/libraries/evas/src/lib/engines/common/language/evas_language_utils.c +++ b/libraries/evas/src/lib/engines/common/language/evas_language_utils.c @@ -13,6 +13,12 @@ * * @{ */ +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + #include #include "evas_language_utils.h" -- cgit v1.1