want_fontconfig="auto"
want_fribidi="auto"
want_harfbuzz="auto"
+want_pixman="no"
want_evas_cserve="yes"
want_evas_engine_buffer="yes"
HAS_HARFBUZZ=0
fi
+# Pixman
+have_pixman="no"
+AC_ARG_ENABLE([pixman],
+ AC_HELP_STRING([--disable-pixman],
+ [disable pixman for software rendering. @<:@default=enabled@:>@]),
+ [
+ if test "x${enableval}" = "xyes" ; then
+ want_pixman="yes"
+ else
+ want_pixman="no"
+ fi
+ ])
+
+
+if test "x${want_pixman}" = "xyes" -o "x${want_pixman}" = "xauto" ; then
+ PKG_CHECK_MODULES([PIXMAN],
+ [pixman-1],
+ [
+ have_pixman="yes"
+ AC_DEFINE(HAVE_PIXMAN, 1, [have pixman for rendering])
+ requirement_evas="pixman-1 ${requirement_evas}"
+ ],
+ [
+ if test "x${want_pixman}" = "xyes" -a "x${use_strict}" = "xyes" ; then
+ AC_MSG_ERROR([Pixman not found (strict dependencies checking)])
+ fi
+ ])
+fi
+
### Checks for header files
AC_HEADER_STDC
AC_CHECK_HEADERS([unistd.h stdint.h sys/param.h])
@FRIBIDI_CFLAGS@ \
@EET_CFLAGS@ \
@FONTCONFIG_CFLAGS@ \
-@pthread_cflags@
+@pthread_cflags@ \
+@PIXMAN_CFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
@EINA_CFLAGS@ \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@FRIBIDI_CFLAGS@ \
@EET_CFLAGS@ \
@FONTCONFIG_CFLAGS@ \
@HARFBUZZ_CFLAGS@ \
@EET_CFLAGS@ \
@FONTCONFIG_CFLAGS@ \
-@pthread_cflags@
+@pthread_cflags@ \
+@PIXMAN_CFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
@EINA_LIBS@ \
$(EVAS_STATIC_MODULE) \
$(EVAS_STATIC_LIBADD) \
+@PIXMAN_LIBS@ \
-lm
libevas_la_DEPENDENCIES = \
@WIN32_CPPFLAGS@ \
@EVIL_CFLAGS@ \
@FREETYPE_CFLAGS@ \
- @EINA_CFLAGS@
+ @PIXMAN_CFLAGS@ \
+ @EINA_CFLAGS@ \
+ @PIXMAN_CFLAGS@
noinst_LTLIBRARIES = libevas_cache.la
libevas_cache_la_SOURCES = \
@EET_CFLAGS@ \
@FONTCONFIG_CFLAGS@ \
@EINA_CFLAGS@ \
-@EVIL_CFLAGS@
+@EVIL_CFLAGS@ \
+@PIXMAN_CFLAGS@
noinst_LTLIBRARIES = libevas_canvas.la
libevas_canvas_la_SOURCES = \
@FRIBIDI_CFLAGS@ \
@EET_CFLAGS@ \
@FONTCONFIG_CFLAGS@ \
-@pthread_cflags@
+@pthread_cflags@ \
+@PIXMAN_CFLAGS@
if EVAS_CSERVE
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
@FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \
+ @PIXMAN_CFLAGS@ \
@EET_CFLAGS@ @pthread_cflags@ \
@WIN32_CFLAGS@ @EINA_CFLAGS@ \
- @FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@
+ @FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \
+ @PIXMAN_CFLAGS@
noinst_LTLIBRARIES = libevas_engine_common.la
libevas_engine_common_la_SOURCES = \
}
dst->cache_entry.space = cspace;
evas_common_image_colorspace_dirty(dst);
+ _evas_common_rgba_image_post_surface(ie_dst);
return 0;
}
dst->cache_entry.space = cspace;
evas_common_image_colorspace_dirty(dst);
+ _evas_common_rgba_image_post_surface(ie_dst);
return 0;
}
dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char *) * 2);
evas_common_image_colorspace_dirty(dst);
+ _evas_common_rgba_image_post_surface(ie_dst);
return 0;
}
dst->cache_entry.space = cspace;
evas_common_image_colorspace_dirty(dst);
+ _evas_common_rgba_image_post_surface(ie_dst);
return 0;
}
#endif
evas_common_rgba_image_scalecache_init(&im->cache_entry);
+
return &im->cache_entry;
}
#endif
}
+void
+_evas_common_rgba_image_post_surface(Image_Entry *ie)
+{
+#ifdef HAVE_PIXMAN
+ 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
+ PIXMAN_a8r8g8b8,
+// PIXMAN_b8g8r8a8,
+ im->cache_entry.w, im->cache_entry.h,
+ im->image.data,
+ im->cache_entry.w * 4
+ );
+ }
+ else
+ {
+ im->pixman.im = pixman_image_create_bits
+ (
+// FIXME: endianess determines this
+ PIXMAN_x8r8g8b8,
+// PIXMAN_b8g8r8x8,
+ im->cache_entry.w, im->cache_entry.h,
+ im->image.data,
+ im->cache_entry.w * 4
+ );
+ }
+#else
+ ie = NULL;
+#endif
+}
+
static int
_evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h)
{
# endif
# endif
#endif
-
+ _evas_common_rgba_image_post_surface(ie);
+
return 0;
}
{
RGBA_Image *im = (RGBA_Image *) ie;
+#ifdef HAVE_PIXMAN
+ if (im->pixman.im)
+ {
+ pixman_image_unref(im->pixman.im);
+ im->pixman.im = NULL;
+ }
+#endif
if (ie->file)
DBG("unload: [%p] %s %s", ie, ie->file, ie->key);
if ((im->cs.data) && (im->image.data))
void evas_common_rgba_image_scalecache_dirty(Image_Entry *ie);
void evas_common_rgba_image_scalecache_orig_use(Image_Entry *ie);
int evas_common_rgba_image_scalecache_usage_get(Image_Entry *ie);
-
+
+void _evas_common_rgba_image_post_surface(Image_Entry *ie);
+
#endif /* _EVAS_IMAGE_PRIVATE_H */
LKU(im->cache.lock);
if (im->image.data)
{
- if (smooth)
- evas_common_scale_rgba_in_to_out_clip_smooth(im, dst, dc,
- src_region_x, src_region_y,
- src_region_w, src_region_h,
- dst_region_x, dst_region_y,
- dst_region_w, dst_region_h);
- else
- evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc,
- src_region_x, src_region_y,
- src_region_w, src_region_h,
- dst_region_x, dst_region_y,
- dst_region_w, dst_region_h);
+ evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc,
+ src_region_x, src_region_y,
+ src_region_w, src_region_h,
+ dst_region_x, dst_region_y,
+ dst_region_w, dst_region_h);
}
return;
}
if ((dst_region_w == src_region_w) && (dst_region_h == src_region_h))
{
- ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x;
- for (y = 0; y < dst_clip_h; y++)
- {
- /* * blend here [clip_w *] ptr -> dst_ptr * */
- if (mask)
- {
- mask += dst_clip_x - dc->mask.x;
- mask += (dst_clip_y - dc->mask.y) * maskobj->cache_entry.w;
- }
+#ifdef HAVE_PIXMAN
+ if ((1) &&
+ (src->pixman.im) && (dst->pixman.im) &&
+ ((!dc->mul.use) ||
+ ((dc->mul.use) && (dc->mul.col == 0xffffffff))) &&
+ ((dc->render_op == _EVAS_RENDER_COPY) ||
+ (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;
+ 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,
+ 0, 0,
+ dst_clip_x, dst_clip_y,
+ dst_clip_w, dst_clip_h);
+ }
+ else
+#endif
+ {
+ ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x;
+ for (y = 0; y < dst_clip_h; y++)
+ {
+ /* * blend here [clip_w *] ptr -> dst_ptr * */
+ if (mask)
+ {
+ mask += dst_clip_x - dc->mask.x;
+ mask += (dst_clip_y - dc->mask.y) * maskobj->cache_entry.w;
+ }
#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
- {
- func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
- }
- ptr += src_w;
- dst_ptr += dst_w;
- if (mask) mask += maskobj->cache_entry.w;
+ {
+ func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
+ }
+ ptr += src_w;
+ dst_ptr += dst_w;
+ if (mask) mask += maskobj->cache_entry.w;
+ }
}
}
else
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@VALGRIND_CFLAGS@ \
@EINA_CFLAGS@ \
@EET_CFLAGS@ \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@VALGRIND_CFLAGS@ \
@EINA_CFLAGS@ \
@EET_CFLAGS@ \
@FREETYPE_CFLAGS@ \
@EINA_CFLAGS@ \
@EVIL_CFLAGS@ \
-@WIN32_CPPFLAGS@
-
+@WIN32_CPPFLAGS@ \
+@PIXMAN_CFLAGS@
+
AM_CFLAGS = @WIN32_CFLAGS@
noinst_LTLIBRARIES = libevas_file.la
#include "Evas.h"
#include "Evas_GL.h"
+#ifdef HAVE_PIXMAN
+#include <pixman.h>
+#endif
+
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
unsigned long long newest_usage;
unsigned long long newest_usage_count;
} cache;
+
+#ifdef HAVE_PIXMAN
+ struct {
+ pixman_image_t *im;
+ } pixman;
+#endif
};
struct _RGBA_Polygon_Point
-I$(top_srcdir)/src/lib/include \
-I$(top_srcdir)/src/modules/engines \
@EINA_CFLAGS@ \
-@FREETYPE_CFLAGS@
+@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
-I$(top_srcdir)/src/modules/engines \
@EINA_CFLAGS@ \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@evas_engine_direct3d_cflags@
if BUILD_ENGINE_DIRECT3D
-I$(top_srcdir)/src/lib/include \
-I$(top_srcdir)/src/modules/engines \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@evas_engine_directfb_cflags@
-I$(top_srcdir)/src/lib/include \
-I$(top_srcdir)/src/modules/engines \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@evas_engine_fb_cflags@
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@
if BUILD_ENGINE_GL_COMMON
-I$(top_srcdir)/src/lib/include \
-I$(top_srcdir)/src/modules/engines/gl_common \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@evas_engine_gl_sdl_cflags@
-I$(top_srcdir)/src/lib/include \
-I$(top_srcdir)/src/modules/engines/gl_common \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@evas_engine_gl_x11_cflags@
-I$(top_srcdir)/src/lib/include \
-I$(top_srcdir)/src/modules/engines \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
-I$(top_srcdir)/src/modules/engines/software_16 \
@EINA_CFLAGS@ \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@evas_engine_software_16_ddraw_cflags@
if BUILD_ENGINE_SOFTWARE_16_DDRAW
MAINTAINERCLEANFILES = Makefile.in
-INCLUDES = -I. -I$(top_srcdir)/src/lib -I$(top_srcdir)/src/lib/include @FREETYPE_CFLAGS@ @SDL_CFLAGS@ @EINA_CFLAGS@
+INCLUDES = -I. -I$(top_srcdir)/src/lib -I$(top_srcdir)/src/lib/include @FREETYPE_CFLAGS@ @PIXMAN_CFLAGS@ @SDL_CFLAGS@ @EINA_CFLAGS@
if BUILD_ENGINE_SOFTWARE_SDL
-I$(top_srcdir)/src/modules/engines/software_16 \
@EINA_CFLAGS@ \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@evas_engine_software_16_wince_cflags@
if BUILD_ENGINE_SOFTWARE_16_WINCE
-I$(top_srcdir)/src/modules/engines/software_16 \
@FREETYPE_CFLAGS@ \
@EINA_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@evas_engine_software_16_x11_cflags@
if BUILD_ENGINE_SOFTWARE_16_X11
-I$(top_srcdir)/src/lib/include \
-I$(top_srcdir)/src/modules/engines \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
-I$(top_srcdir)/src/modules/engines \
-I$(top_srcdir)/src/modules/engines/software_8 \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@evas_engine_software_8_x11_cflags@ \
-I/usr/include/pixman-1
-I$(top_srcdir)/src/modules/engines \
@EINA_CFLAGS@ \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@evas_engine_software_ddraw_cflags@
if BUILD_ENGINE_SOFTWARE_DDRAW
-I$(top_srcdir)/src/modules/engines \
@EINA_CFLAGS@ \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@evas_engine_software_gdi_cflags@
if BUILD_ENGINE_SOFTWARE_GDI
-I$(top_srcdir)/src/lib/include \
-I$(top_srcdir)/src/modules/engines \
@EINA_CFLAGS@ \
-@FREETYPE_CFLAGS@
+@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
-I$(top_srcdir)/src/lib/include \
-I$(top_srcdir)/src/modules/engines \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@evas_engine_software_sdl_cflags@
-I$(top_srcdir)/src/lib/include \
-I$(top_srcdir)/src/modules/engines \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@evas_engine_software_xlib_cflags@ \
@evas_engine_software_xcb_cflags@
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@EVIL_CFLAGS@ \
@WIN32_CPPFLAGS@
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@evas_image_loader_edb_cflags@ \
@EINA_CFLAGS@
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@evas_image_loader_eet_cflags@ \
@EINA_CFLAGS@
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@evas_image_loader_gif_cflags@ \
@EINA_CFLAGS@
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@EVIL_CFLAGS@ \
@WIN32_CPPFLAGS@
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@evas_image_loader_jpeg_cflags@ \
@EVIL_CFLAGS@ \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@evas_image_loader_pmaps_cflags@ \
@EVIL_CFLAGS@ \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@evas_image_loader_png_cflags@ \
@EVIL_CFLAGS@ \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@evas_image_loader_svg_cflags@
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@EVIL_CFLAGS@ \
@WIN32_CPPFLAGS@
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@evas_image_loader_tiff_cflags@ \
@EVIL_CFLAGS@ \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@EVIL_CFLAGS@ \
@WIN32_CPPFLAGS@
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@evas_image_loader_xpm_cflags@ \
@EVIL_CFLAGS@ \
AM_CPPFLAGS = -I. \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
- @FREETYPE_CFLAGS@ @evas_image_loader_edb_cflags@ \
+ @FREETYPE_CFLAGS@ @PIXMAN_CFLAGS@ @evas_image_loader_edb_cflags@ \
@EINA_CFLAGS@
if BUILD_LOADER_EDB
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@evas_image_loader_eet_cflags@
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@evas_image_loader_jpeg_cflags@
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@evas_image_loader_png_cflags@ \
@EVIL_CFLAGS@ \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
+@PIXMAN_CFLAGS@ \
@EINA_CFLAGS@ \
@evas_image_loader_tiff_cflags@