pthread stuff is no longer optional at all in evas - smae with preload

and async events, but pthread_attr_setaffinity_np is optionally
detected and used if there. it's an opti8mization anyway.



SVN revision: 78041
This commit is contained in:
Carsten Haitzler 2012-10-16 08:57:18 +00:00
parent 4c8e4957e7
commit 800279c23b
17 changed files with 77 additions and 561 deletions

View File

@ -277,32 +277,10 @@ if test "x${want_fontconfig}" = "xyes"; then
[AC_MSG_ERROR([Fontconfig not found])]) [AC_MSG_ERROR([Fontconfig not found])])
fi fi
# linebreak LINEBREAK_CFLAGS='-I$(top_srcdir)/src/static_deps/liblinebreak'
have_linebreak="no" LINEBREAK_LIBS='$(top_builddir)/src/static_deps/liblinebreak/liblinebreak.la'
want_linebreak="yes" AC_SUBST(LINEBREAK_CFLAGS)
AC_ARG_ENABLE([liblinebreak], AC_SUBST(LINEBREAK_LIBS)
AC_HELP_STRING([--disable-liblinebreak],
[disable linking against liblinebreak. @<:@default=enabled@:>@]),
[
if test "x${enableval}" = "xyes" ; then
want_linebreak="yes"
else
want_linebreak="no"
fi
])
AM_CONDITIONAL(EVAS_USE_LINEBREAK, test "x${want_linebreak}" = "xyes")
if test "x${want_linebreak}" = "xyes" ; then
have_linebreak="yes"
LINEBREAK_CFLAGS='-I$(top_srcdir)/src/static_deps/liblinebreak'
LINEBREAK_LIBS='$(top_builddir)/src/static_deps/liblinebreak/liblinebreak.la'
AC_SUBST(LINEBREAK_CFLAGS)
AC_SUBST(LINEBREAK_LIBS)
AC_DEFINE(HAVE_LINEBREAK, 1, [have liblinebreak support])
else
have_linebreak="no"
fi
# fribidi support # fribidi support
have_fribidi="no" have_fribidi="no"
@ -329,9 +307,7 @@ if test "x${want_fribidi}" = "xyes"; then
AC_CHECK_SIZEOF(FriBidiChar,, [#include <fribidi/fribidi.h>]) AC_CHECK_SIZEOF(FriBidiChar,, [#include <fribidi/fribidi.h>])
CPPFLAGS="$CPPFLAGS_SAVE" CPPFLAGS="$CPPFLAGS_SAVE"
], ],
[ [AC_MSG_ERROR([Fribidi not found])])
AC_MSG_ERROR([Fribidi not found])
])
fi fi
# harfbuzz support # harfbuzz support
@ -814,7 +790,7 @@ fi
##################################################################### #####################################################################
## Font Loaders ## Font Loaders
PKG_CHECK_MODULES([EET], [eet >= 1.7.0], [], [AC_MSG_ERROR([EET not found])]) PKG_CHECK_MODULES([EET], [eet >= 1.7.0])
requirement_evas="eet >= 1.7.0 ${requirement_evas}" requirement_evas="eet >= 1.7.0 ${requirement_evas}"
##################################################################### #####################################################################
@ -897,8 +873,6 @@ AM_CONDITIONAL(EVAS_STATIC_BUILD_WBMP, [${do_static}])
AC_DEFINE(BUILD_LOADER_WBMP, [1], [WBMP Loader]) AC_DEFINE(BUILD_LOADER_WBMP, [1], [WBMP Loader])
##################################################################### #####################################################################
PKG_CHECK_MODULES([EET], [eet >= 1.7.0], [requirement="eet >= 1.7.0"], [AC_MSG_ERROR([Eet not found])])
dnl requirement_evas="${requirement} ${requirement_evas}"
evas_image_loader_eet_cflags="${EET_CFLAGS}" evas_image_loader_eet_cflags="${EET_CFLAGS}"
evas_image_loader_eet_libs="${EET_LIBS}" evas_image_loader_eet_libs="${EET_LIBS}"
AC_SUBST([evas_image_loader_eet_cflags]) AC_SUBST([evas_image_loader_eet_cflags])
@ -974,7 +948,7 @@ EVAS_CHECK_IMAGE_LOADER([SVG], [${want_evas_image_loader_svg}])
# basic pthread support # basic pthread support
AC_CHECK_HEADER(pthread.h, [], [AC_MSG_ERROR([Pthread support missing.])]) AC_CHECK_HEADER(pthread.h, [], [AC_MSG_ERROR([Pthread support missing.])])
# sched_getaffinity pthread_attr_setaffinity_np # sched_getaffinity pthread_attr_setaffinity_np
AC_CHECK_HEADERS([pthread.h sched.h], AC_CHECK_HEADERS([pthread.h],
[ [
CFLAGS_save="${CFLAGS}" CFLAGS_save="${CFLAGS}"
CFLAGS="${CFLAGS} -pthread" CFLAGS="${CFLAGS} -pthread"
@ -982,18 +956,29 @@ AC_CHECK_HEADERS([pthread.h sched.h],
LIBS="${LIBS} -pthread" LIBS="${LIBS} -pthread"
AC_LINK_IFELSE( AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[ [AC_LANG_PROGRAM([[
#include <stdlib.h>
#include <pthread.h>
]],
[[
pthread_barrier_wait(NULL);
]])],
[],
[AC_MSG_ERROR([Your pthread implementation does not have pthread_barrier_wait])])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
#include <stdlib.h>
#include <pthread.h> #include <pthread.h>
#include <sched.h> #include <sched.h>
]], ]],
[[ [[
pthread_attr_setaffinity_np(NULL, 0, NULL); pthread_attr_setaffinity_np(NULL, 0, NULL);
pthread_barrier_wait(NULL); ]])],
]])], [], [AC_DEFINE(HAVE_PTHREAD_AFFINITY, 1, [Pthread pthread_attr_setaffinity_np])],
[AC_MSG_ERROR([Missing pthread_attr_setaffinity_np or pthread_barrier_wait.])]) [])
CFLAGS=${CFLAGS_save} CFLAGS=${CFLAGS_save}
LIBS=${LIBS_save} LIBS=${LIBS_save}
], ],
[AC_MSG_ERROR([Missing sched.h])]) [AC_MSG_ERROR([Missing pthread.h])])
pthread_cflags="-pthread" pthread_cflags="-pthread"
pthread_libs="-pthread" pthread_libs="-pthread"
AC_DEFINE(BUILD_ASYNC_EVENTS, 1, [Build async events support]) AC_DEFINE(BUILD_ASYNC_EVENTS, 1, [Build async events support])
@ -1175,40 +1160,6 @@ EVAS_CHECK_DITHER([line-dither-mask], [line dither mask], [conv_line_dither="yes
EVAS_CHECK_DITHER([no-dither-mask], [conversion to 16bpp without dither mask], [conv_no_dither="yes"], [conv_no_dither="no"]) EVAS_CHECK_DITHER([no-dither-mask], [conversion to 16bpp without dither mask], [conv_no_dither="yes"], [conv_no_dither="no"])
##################################################################### #####################################################################
## no longer options - turn on.
AC_DEFINE(BUILD_CONVERT_8_RGB_332, 1, [8bpp RGB 332])
AC_DEFINE(BUILD_CONVERT_8_RGB_666, 1, [8bpp RGB 666])
AC_DEFINE(BUILD_CONVERT_8_RGB_232, 1, [8bpp RGB 232])
AC_DEFINE(BUILD_CONVERT_8_RGB_222, 1, [8bpp RGB 222])
AC_DEFINE(BUILD_CONVERT_8_RGB_221, 1, [8bpp RGB 221])
AC_DEFINE(BUILD_CONVERT_8_RGB_121, 1, [8bpp RGB 121])
AC_DEFINE(BUILD_CONVERT_8_RGB_111, 1, [8bpp RGB 111])
AC_DEFINE(BUILD_CONVERT_16_BGR_565, 1, [16bpp BGR 565])
AC_DEFINE(BUILD_CONVERT_16_RGB_565, 1, [16bpp RGB 565])
AC_DEFINE(BUILD_CONVERT_16_RGB_555, 1, [16bpp RGB 555])
AC_DEFINE(BUILD_CONVERT_16_RGB_444, 1, [16bpp RGB 444])
AC_DEFINE(BUILD_CONVERT_16_RGB_454645, 1, [16bpp RGB 565 (444 ipaq)])
AC_DEFINE(BUILD_CONVERT_16_RGB_ROT0, 1, [16bpp 0 dgeree rotation])
AC_DEFINE(BUILD_CONVERT_16_RGB_ROT90, 1, [16bpp 90 dgeree rotation])
AC_DEFINE(BUILD_CONVERT_16_RGB_ROT180, 1, [16bpp 180 dgeree rotation])
AC_DEFINE(BUILD_CONVERT_16_RGB_ROT270, 1, [16bpp 270 dgeree rotation])
AC_DEFINE(BUILD_CONVERT_24_RGB_888, 1, [24bpp RGB 888])
AC_DEFINE(BUILD_CONVERT_24_BGR_888, 1, [24bpp BGR 888])
AC_DEFINE(BUILD_CONVERT_32_RGB_8888, 1, [32bpp RGB 8888])
AC_DEFINE(BUILD_CONVERT_32_RGBX_8888, 1, [32bpp RGBX 8888])
AC_DEFINE(BUILD_CONVERT_32_BGR_8888, 1, [32bpp BGR 8888])
AC_DEFINE(BUILD_CONVERT_32_BGRX_8888, 1, [32bpp BGRX 8888])
AC_DEFINE(BUILD_CONVERT_24_RGB_666, 1, [24bpp RGB 666 (666 ezx)])
AC_DEFINE(BUILD_CONVERT_32_RGB_666, 1, [32bpp RGB 666 (666 ezx)])
AC_DEFINE(BUILD_CONVERT_32_RGB_ROT0, 1, [32bpp 0 dgeree rotation])
AC_DEFINE(BUILD_CONVERT_32_RGB_ROT90, 1, [32bpp 90 dgeree rotation])
AC_DEFINE(BUILD_CONVERT_32_RGB_ROT180, 1, [32bpp 180 dgeree rotation])
AC_DEFINE(BUILD_CONVERT_32_RGB_ROT270, 1, [32bpp 270 dgeree rotation])
AC_DEFINE(BUILD_CONVERT_8_GRY_1, 1, [1bpp Mono])
AC_DEFINE(BUILD_CONVERT_8_GRY_16, 1, [4bpp Greyscale])
AC_DEFINE(BUILD_CONVERT_8_GRAYSCALE_64, 1, [32bpp Grayscale 64 palette])
## valgrind ## valgrind
want_valgrind="no" want_valgrind="no"
have_valgrind="no" have_valgrind="no"
@ -1262,7 +1213,7 @@ AC_ARG_ENABLE([build-examples],
# put in here the dependencies for Evas' examples. they are # put in here the dependencies for Evas' examples. they are
# meant to be 'real world' usage examples, thus one will be # meant to be 'real world' usage examples, thus one will be
# using higher level libraries on these programs # using higher level libraries on these programs
PKG_CHECK_MODULES([ECORE_EVAS], [ecore-evas ecore], [], [build_examples="no"]) PKG_CHECK_MODULES([ECORE_EVAS], [ecore-evas ecore], [build_examples="no"])
PKG_CHECK_MODULES([EDJE], [edje], PKG_CHECK_MODULES([EDJE], [edje],
[edje_cc=$($PKG_CONFIG --variable=prefix edje)/bin/edje_cc], [edje_cc=$($PKG_CONFIG --variable=prefix edje)/bin/edje_cc],
[build_examples="no"]) [build_examples="no"])
@ -1452,7 +1403,6 @@ echo
echo "Font Rendering Helpers:" echo "Font Rendering Helpers:"
echo " Fribidi.................: $have_fribidi" echo " Fribidi.................: $have_fribidi"
echo " Harfbuzz................: $have_harfbuzz" echo " Harfbuzz................: $have_harfbuzz"
echo " liblinebreak............: $have_linebreak"
# FIXME: add non freetype2 font engine support # FIXME: add non freetype2 font engine support
# FIXME: make freetype2 optional # FIXME: make freetype2 optional
echo echo
@ -1467,6 +1417,7 @@ echo " MAGIC_DEBUG.............: $want_evas_magic_debug"
echo " Cache Server 2..........: $want_evas_cserve2" echo " Cache Server 2..........: $want_evas_cserve2"
echo " Threaded Pipe Rendering.: $build_pipe_render" echo " Threaded Pipe Rendering.: $build_pipe_render"
echo echo
echo "Optional pixman rendering path:"
echo " Pixman..................: $have_pixman" echo " Pixman..................: $have_pixman"
echo " Pixman Fonts............: $have_pixman_font" echo " Pixman Fonts............: $have_pixman_font"
echo " Pixman Rects............: $have_pixman_rect" echo " Pixman Rects............: $have_pixman_rect"
@ -1475,12 +1426,11 @@ echo " Pixman Polygons.........: $have_pixman_poly"
echo " Pixman Images...........: $have_pixman_image" echo " Pixman Images...........: $have_pixman_image"
echo " Pixman Image ScaleSample: $have_pixman_image_scale_sample" echo " Pixman Image ScaleSample: $have_pixman_image_scale_sample"
echo echo
echo " Tiled 32BPP rotate......: $have_tile_rotate"
echo
echo "Conversion Options:" echo "Conversion Options:"
echo " Smaller Dither Mask.....: $conv_small_dither" echo " Smaller Dither Mask.....: $conv_small_dither"
echo " Line Dither Mask........: $conv_line_dither" echo " Line Dither Mask........: $conv_line_dither"
echo " No Dither Mask for 16bpp: $conv_no_dither" echo " No Dither Mask for 16bpp: $conv_no_dither"
echo " Tiled 32BPP rotate......: $have_tile_rotate"
echo echo
echo "Documentation.............: ${build_doc}" echo "Documentation.............: ${build_doc}"
echo "Examples..................: install:${install_examples} build:${build_examples}" echo "Examples..................: install:${install_examples} build:${build_examples}"

View File

@ -17,7 +17,6 @@
//#define CACHEDUMP 1 //#define CACHEDUMP 1
#ifdef BUILD_ASYNC_PRELOAD
typedef struct _Evas_Cache_Preload Evas_Cache_Preload; typedef struct _Evas_Cache_Preload Evas_Cache_Preload;
struct _Evas_Cache_Preload struct _Evas_Cache_Preload
@ -33,7 +32,6 @@ static int _evas_cache_mutex_init = 0;
static Eina_Condition cond_wakeup; static Eina_Condition cond_wakeup;
static void _evas_cache_image_entry_preload_remove(Image_Entry *ie, const void *target); static void _evas_cache_image_entry_preload_remove(Image_Entry *ie, const void *target);
#endif
#define FREESTRC(Var) \ #define FREESTRC(Var) \
if (Var) \ if (Var) \
@ -153,7 +151,6 @@ _evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry *ie)
{ {
if (!ie) return; if (!ie) return;
if (cache->func.debug) cache->func.debug("deleting", ie); if (cache->func.debug) cache->func.debug("deleting", ie);
#ifdef BUILD_ASYNC_PRELOAD
if (ie->flags.delete_me == 1) return; if (ie->flags.delete_me == 1) return;
if (ie->preload) if (ie->preload)
{ {
@ -161,7 +158,6 @@ _evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry *ie)
_evas_cache_image_entry_preload_remove(ie, NULL); _evas_cache_image_entry_preload_remove(ie, NULL);
return; return;
} }
#endif
_evas_cache_image_dirty_del(ie); _evas_cache_image_dirty_del(ie);
_evas_cache_image_activ_del(ie); _evas_cache_image_activ_del(ie);
@ -175,10 +171,8 @@ _evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry *ie)
ie->cache = NULL; ie->cache = NULL;
cache->func.surface_delete(ie); cache->func.surface_delete(ie);
#ifdef BUILD_ASYNC_PRELOAD
LKD(ie->lock); LKD(ie->lock);
LKD(ie->lock_cancel); LKD(ie->lock_cancel);
#endif
cache->func.dealloc(ie); cache->func.dealloc(ie);
} }
@ -244,10 +238,8 @@ _evas_cache_image_entry_new(Evas_Cache_Image *cache,
if (tstamp) ie->tstamp = *tstamp; if (tstamp) ie->tstamp = *tstamp;
else memset(&ie->tstamp, 0, sizeof(Image_Timestamp)); else memset(&ie->tstamp, 0, sizeof(Image_Timestamp));
#ifdef BUILD_ASYNC_PRELOAD
LKI(ie->lock); LKI(ie->lock);
LKI(ie->lock_cancel); LKI(ie->lock_cancel);
#endif
if (lo) ie->load_opts = *lo; if (lo) ie->load_opts = *lo;
if (ie->file) if (ie->file)
@ -289,16 +281,11 @@ _evas_cache_image_entry_surface_alloc(Evas_Cache_Image *cache,
{ {
int wmin = w > 0 ? w : 1; int wmin = w > 0 ? w : 1;
int hmin = h > 0 ? h : 1; int hmin = h > 0 ? h : 1;
#ifdef BUILD_ASYNC_PRELOAD
LKL(engine_lock); LKL(engine_lock);
#endif
_evas_cache_image_entry_surface_alloc__locked(cache, ie, wmin, hmin); _evas_cache_image_entry_surface_alloc__locked(cache, ie, wmin, hmin);
#ifdef BUILD_ASYNC_PRELOAD
LKU(engine_lock); LKU(engine_lock);
#endif
} }
#ifdef BUILD_ASYNC_PRELOAD
static void static void
_evas_cache_image_async_heavy(void *data) _evas_cache_image_async_heavy(void *data)
{ {
@ -457,7 +444,6 @@ _evas_cache_image_entry_preload_remove(Image_Entry *ie, const void *target)
evas_preload_thread_cancel(ie->preload); evas_preload_thread_cancel(ie->preload);
} }
} }
#endif
EAPI int EAPI int
evas_cache_image_usage_get(Evas_Cache_Image *cache) evas_cache_image_usage_get(Evas_Cache_Image *cache)
@ -487,14 +473,12 @@ evas_cache_image_init(const Evas_Cache_Image_Func *cb)
{ {
Evas_Cache_Image *cache; Evas_Cache_Image *cache;
#ifdef BUILD_ASYNC_PRELOAD
if (_evas_cache_mutex_init++ == 0) if (_evas_cache_mutex_init++ == 0)
{ {
LKI(engine_lock); LKI(engine_lock);
LKI(wakeup); LKI(wakeup);
eina_condition_new(&cond_wakeup, &wakeup); eina_condition_new(&cond_wakeup, &wakeup);
} }
#endif
cache = calloc(1, sizeof(Evas_Cache_Image)); cache = calloc(1, sizeof(Evas_Cache_Image));
if (!cache) return NULL; if (!cache) return NULL;
@ -525,7 +509,6 @@ evas_cache_image_shutdown(Evas_Cache_Image *cache)
return; return;
} }
#ifdef BUILD_ASYNC_PRELOAD
EINA_LIST_FREE(cache->preload, im) EINA_LIST_FREE(cache->preload, im)
{ {
/* By doing that we are protecting us from destroying image when the cache is no longer available. */ /* By doing that we are protecting us from destroying image when the cache is no longer available. */
@ -533,7 +516,6 @@ evas_cache_image_shutdown(Evas_Cache_Image *cache)
_evas_cache_image_entry_preload_remove(im, NULL); _evas_cache_image_entry_preload_remove(im, NULL);
} }
evas_async_events_process(); evas_async_events_process();
#endif
while (cache->lru) while (cache->lru)
{ {
im = (Image_Entry *)cache->lru; im = (Image_Entry *)cache->lru;
@ -558,7 +540,6 @@ evas_cache_image_shutdown(Evas_Cache_Image *cache)
delete_list = eina_list_remove_list(delete_list, delete_list); delete_list = eina_list_remove_list(delete_list, delete_list);
} }
#ifdef BUILD_ASYNC_PRELOAD
/* Now wait for all pending image to die */ /* Now wait for all pending image to die */
while (cache->pending) while (cache->pending)
{ {
@ -570,19 +551,16 @@ evas_cache_image_shutdown(Evas_Cache_Image *cache)
if (cache->pending) eina_condition_wait(&cond_wakeup); if (cache->pending) eina_condition_wait(&cond_wakeup);
LKU(wakeup); LKU(wakeup);
} }
#endif
eina_hash_free(cache->activ); eina_hash_free(cache->activ);
eina_hash_free(cache->inactiv); eina_hash_free(cache->inactiv);
free(cache); free(cache);
#ifdef BUILD_ASYNC_PRELOAD
if (--_evas_cache_mutex_init == 0) if (--_evas_cache_mutex_init == 0)
{ {
eina_condition_free(&cond_wakeup); eina_condition_free(&cond_wakeup);
LKD(engine_lock); LKD(engine_lock);
LKD(wakeup); LKD(wakeup);
} }
#endif
} }
EAPI Image_Entry * EAPI Image_Entry *
@ -774,14 +752,11 @@ evas_cache_image_drop(Image_Entry *im)
if (references == 0) if (references == 0)
{ {
#ifdef BUILD_ASYNC_PRELOAD
if (im->preload) if (im->preload)
{ {
_evas_cache_image_entry_preload_remove(im, NULL); _evas_cache_image_entry_preload_remove(im, NULL);
return; return;
} }
#endif
if (im->flags.dirty) if (im->flags.dirty)
{ {
_evas_cache_image_entry_delete(cache, im); _evas_cache_image_entry_delete(cache, im);
@ -812,25 +787,16 @@ evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned
cache = im->cache; cache = im->cache;
if (!(im->flags.dirty)) if (!(im->flags.dirty))
{ {
#ifndef EVAS_CSERVE im_dirty =
int references; evas_cache_image_copied_data(cache, im->w, im->h,
references = im->references; evas_cache_image_pixels(im),
// if ref 1 also copy if using shared cache as its read-only im->flags.alpha, im->space);
if (references == 1) im_dirty = im; if (!im_dirty) goto on_error;
else if (cache->func.debug) cache->func.debug("dirty-src", im);
#endif cache->func.dirty(im_dirty, im);
{ if (cache->func.debug) cache->func.debug("dirty-out", im_dirty);
im_dirty = im_dirty->references = 1;
evas_cache_image_copied_data(cache, im->w, im->h, evas_cache_image_drop(im);
evas_cache_image_pixels(im),
im->flags.alpha, im->space);
if (!im_dirty) goto on_error;
if (cache->func.debug) cache->func.debug("dirty-src", im);
cache->func.dirty(im_dirty, im);
if (cache->func.debug) cache->func.debug("dirty-out", im_dirty);
im_dirty->references = 1;
evas_cache_image_drop(im);
}
_evas_cache_image_dirty_add(im_dirty); _evas_cache_image_dirty_add(im_dirty);
} }
@ -983,13 +949,10 @@ on_error:
EAPI int EAPI int
evas_cache_image_load_data(Image_Entry *im) evas_cache_image_load_data(Image_Entry *im)
{ {
#ifdef BUILD_ASYNC_PRELOAD
Eina_Bool preload = EINA_FALSE; Eina_Bool preload = EINA_FALSE;
#endif
int error = EVAS_LOAD_ERROR_NONE; int error = EVAS_LOAD_ERROR_NONE;
if ((im->flags.loaded) && (!im->flags.animated)) return error; if ((im->flags.loaded) && (!im->flags.animated)) return error;
#ifdef BUILD_ASYNC_PRELOAD
if (im->preload) if (im->preload)
{ {
preload = EINA_TRUE; preload = EINA_TRUE;
@ -1001,6 +964,7 @@ evas_cache_image_load_data(Image_Entry *im)
evas_preload_thread_cancel(im->preload); evas_preload_thread_cancel(im->preload);
} }
evas_async_events_process(); evas_async_events_process();
LKL(wakeup); LKL(wakeup);
while (im->preload) while (im->preload)
{ {
@ -1013,14 +977,13 @@ evas_cache_image_load_data(Image_Entry *im)
} }
if ((im->flags.loaded) && (!im->flags.animated)) return error; if ((im->flags.loaded) && (!im->flags.animated)) return error;
LKL(im->lock); LKL(im->lock);
#endif
im->flags.in_progress = EINA_TRUE; im->flags.in_progress = EINA_TRUE;
error = im->cache->func.load(im); error = im->cache->func.load(im);
im->flags.in_progress = EINA_FALSE; im->flags.in_progress = EINA_FALSE;
#ifdef BUILD_ASYNC_PRELOAD
LKU(im->lock); LKU(im->lock);
#endif
im->flags.loaded = 1; im->flags.loaded = 1;
if (im->cache->func.debug) im->cache->func.debug("load", im); if (im->cache->func.debug) im->cache->func.debug("load", im);
if (error != EVAS_LOAD_ERROR_NONE) if (error != EVAS_LOAD_ERROR_NONE)
@ -1028,9 +991,7 @@ evas_cache_image_load_data(Image_Entry *im)
_evas_cache_image_entry_surface_alloc(im->cache, im, im->w, im->h); _evas_cache_image_entry_surface_alloc(im->cache, im, im->w, im->h);
im->flags.loaded = 0; im->flags.loaded = 0;
} }
#ifdef BUILD_ASYNC_PRELOAD
if (preload) _evas_cache_image_async_end(im); if (preload) _evas_cache_image_async_end(im);
#endif
return error; return error;
} }
@ -1039,7 +1000,7 @@ evas_cache_image_unload_data(Image_Entry *im)
{ {
if (im->flags.in_progress) return; if (im->flags.in_progress) return;
evas_cache_image_preload_cancel(im, NULL); evas_cache_image_preload_cancel(im, NULL);
#ifdef BUILD_ASYNC_PRELOAD
LKL(im->lock_cancel); LKL(im->lock_cancel);
if (LKT(im->lock) == EINA_FALSE) /* can't get image lock - busy async load */ if (LKT(im->lock) == EINA_FALSE) /* can't get image lock - busy async load */
{ {
@ -1048,19 +1009,15 @@ evas_cache_image_unload_data(Image_Entry *im)
return; return;
} }
LKU(im->lock_cancel); LKU(im->lock_cancel);
#endif
if ((!im->flags.loaded) || (!im->file) || (!im->info.module) || if ((!im->flags.loaded) || (!im->file) || (!im->info.module) ||
(im->flags.dirty)) (im->flags.dirty))
{ {
#ifdef BUILD_ASYNC_PRELOAD
LKU(im->lock); LKU(im->lock);
#endif
return; return;
} }
im->cache->func.destructor(im); im->cache->func.destructor(im);
#ifdef BUILD_ASYNC_PRELOAD
LKU(im->lock); LKU(im->lock);
#endif
//FIXME: imagedataunload - inform owners //FIXME: imagedataunload - inform owners
} }
@ -1092,7 +1049,6 @@ evas_cache_image_is_loaded(Image_Entry *im)
EAPI void EAPI void
evas_cache_image_preload_data(Image_Entry *im, const void *target) evas_cache_image_preload_data(Image_Entry *im, const void *target)
{ {
#ifdef BUILD_ASYNC_PRELOAD
RGBA_Image *img = (RGBA_Image *)im; RGBA_Image *img = (RGBA_Image *)im;
if ((im->flags.loaded) && (img->image.data)) if ((im->flags.loaded) && (img->image.data))
@ -1103,22 +1059,13 @@ evas_cache_image_preload_data(Image_Entry *im, const void *target)
im->flags.loaded = 0; im->flags.loaded = 0;
if (!_evas_cache_image_entry_preload_add(im, target)) if (!_evas_cache_image_entry_preload_add(im, target))
evas_object_inform_call_image_preloaded((Evas_Object *)target); evas_object_inform_call_image_preloaded((Evas_Object *)target);
#else
evas_cache_image_load_data(im);
evas_object_inform_call_image_preloaded((Evas_Object *)target);
#endif
} }
EAPI void EAPI void
evas_cache_image_preload_cancel(Image_Entry *im, const void *target) evas_cache_image_preload_cancel(Image_Entry *im, const void *target)
{ {
#ifdef BUILD_ASYNC_PRELOAD
if (!target) return; if (!target) return;
_evas_cache_image_entry_preload_remove(im, target); _evas_cache_image_entry_preload_remove(im, target);
#else
(void)im;
(void)target;
#endif
} }
#ifdef CACHEDUMP #ifdef CACHEDUMP
@ -1242,8 +1189,6 @@ evas_cache_image_pixels(Image_Entry *im)
EAPI void EAPI void
evas_cache_image_wakeup(void) evas_cache_image_wakeup(void)
{ {
#ifdef BUILD_ASYNC_PRELOAD
if (_evas_cache_mutex_init > 0) if (_evas_cache_mutex_init > 0)
eina_condition_broadcast(&cond_wakeup); eina_condition_broadcast(&cond_wakeup);
#endif
} }

View File

@ -1,24 +1,17 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif
#ifdef HAVE_EVIL #ifdef HAVE_EVIL
# include <Evil.h> # include <Evil.h>
#endif #endif
#include <pthread.h>
#ifdef BUILD_ASYNC_PRELOAD #ifdef __linux__
# include <pthread.h>
# ifdef __linux__
# include <sys/syscall.h> # include <sys/syscall.h>
# endif
#endif #endif
#include "evas_common.h" #include "evas_common.h"
#include "evas_private.h" #include "evas_private.h"
#include "Evas.h" #include "Evas.h"
#ifdef BUILD_ASYNC_PRELOAD
static int _threads_max = 0; static int _threads_max = 0;
typedef struct _Evas_Preload_Pthread_Worker Evas_Preload_Pthread_Worker; typedef struct _Evas_Preload_Pthread_Worker Evas_Preload_Pthread_Worker;
@ -123,24 +116,20 @@ on_error:
evas_async_events_put(pth, 0, work, _evas_preload_thread_done); evas_async_events_put(pth, 0, work, _evas_preload_thread_done);
return pth; return pth;
} }
#endif
void void
_evas_preload_thread_init(void) _evas_preload_thread_init(void)
{ {
#ifdef BUILD_ASYNC_PRELOAD
_threads_max = eina_cpu_count(); _threads_max = eina_cpu_count();
if (_threads_max < 1) _threads_max = 1; if (_threads_max < 1) _threads_max = 1;
LKI(_mutex); LKI(_mutex);
#endif
} }
void void
_evas_preload_thread_shutdown(void) _evas_preload_thread_shutdown(void)
{ {
/* FIXME: If function are still running in the background, should we kill them ? */ /* FIXME: If function are still running in the background, should we kill them ? */
#ifdef BUILD_ASYNC_PRELOAD
Evas_Preload_Pthread_Worker *work; Evas_Preload_Pthread_Worker *work;
/* Force processing of async events. */ /* Force processing of async events. */
@ -158,7 +147,6 @@ _evas_preload_thread_shutdown(void)
LKU(_mutex); LKU(_mutex);
LKD(_mutex); LKD(_mutex);
#endif
} }
Evas_Preload_Pthread * Evas_Preload_Pthread *
@ -167,7 +155,6 @@ evas_preload_thread_run(void (*func_heavy) (void *data),
void (*func_cancel) (void *data), void (*func_cancel) (void *data),
const void *data) const void *data)
{ {
#ifdef BUILD_ASYNC_PRELOAD
Evas_Preload_Pthread_Worker *work; Evas_Preload_Pthread_Worker *work;
Evas_Preload_Pthread_Data *pth; Evas_Preload_Pthread_Data *pth;
@ -220,22 +207,11 @@ evas_preload_thread_run(void (*func_heavy) (void *data),
} }
LKU(_mutex); LKU(_mutex);
return NULL; return NULL;
#else
/*
If no thread and as we don't want to break app that rely on this
facility, we will lock the interface until we are done.
*/
(void)func_cancel;
func_heavy((void *)data);
func_end((void *)data);
return (void *)1;
#endif
} }
Eina_Bool Eina_Bool
evas_preload_thread_cancel(Evas_Preload_Pthread *thread) evas_preload_thread_cancel(Evas_Preload_Pthread *thread)
{ {
#ifdef BUILD_ASYNC_PRELOAD
Evas_Preload_Pthread_Worker *work; Evas_Preload_Pthread_Worker *work;
if (!thread) return EINA_TRUE; if (!thread) return EINA_TRUE;
@ -259,8 +235,4 @@ evas_preload_thread_cancel(Evas_Preload_Pthread *thread)
work = (Evas_Preload_Pthread_Worker *)thread; work = (Evas_Preload_Pthread_Worker *)thread;
work->cancel = EINA_TRUE; work->cancel = EINA_TRUE;
return EINA_FALSE; return EINA_FALSE;
#else
(void) thread;
return EINA_TRUE;
#endif
} }

View File

@ -16,7 +16,8 @@ AM_CPPFLAGS = \
@EVAS_GENERAL_CFLAGS@ \ @EVAS_GENERAL_CFLAGS@ \
@EVIL_CFLAGS@ \ @EVIL_CFLAGS@ \
@PIXMAN_CFLAGS@ \ @PIXMAN_CFLAGS@ \
@FRIBIDI_CFLAGS@ @FRIBIDI_CFLAGS@ \
@LINEBREAK_CFLAGS@
noinst_LTLIBRARIES = libevas_canvas.la noinst_LTLIBRARIES = libevas_canvas.la
libevas_canvas_la_SOURCES = \ libevas_canvas_la_SOURCES = \
@ -60,14 +61,7 @@ evas_touch_point.c \
evas_map.c \ evas_map.c \
evas_gl.c evas_gl.c
#evas_object_textgrid.c libevas_canvas_la_LIBADD = @EVAS_LIBS@ @EVIL_LIBS@ @LINEBREAK_LIBS@
libevas_canvas_la_LIBADD = @EVAS_LIBS@ @EVIL_LIBS@
if EVAS_USE_LINEBREAK
AM_CPPFLAGS += @LINEBREAK_CFLAGS@
libevas_canvas_la_LIBADD += @LINEBREAK_LIBS@
endif
clean-local: clean-local:
rm -rf *.gcno rm -rf *.gcno

View File

@ -2,21 +2,15 @@
# include <config.h> # include <config.h>
#endif #endif
#ifdef BUILD_ASYNC_EVENTS #ifndef _MSC_VER
# include <unistd.h>
# ifndef _MSC_VER
# include <unistd.h>
# endif
# include <fcntl.h>
# include <errno.h>
#endif #endif
#include <fcntl.h>
#include <errno.h>
#include "evas_common.h" #include "evas_common.h"
#include "evas_private.h" #include "evas_private.h"
#ifdef BUILD_ASYNC_EVENTS
static int _fd_write = -1; static int _fd_write = -1;
static int _fd_read = -1; static int _fd_read = -1;
static pid_t _fd_pid = 0; static pid_t _fd_pid = 0;
@ -81,23 +75,16 @@ _evas_async_events_fork_handle(void)
for (i = 0; i < count; i++) evas_async_events_init(); for (i = 0; i < count; i++) evas_async_events_init();
} }
#endif
EAPI int EAPI int
evas_async_events_fd_get(void) evas_async_events_fd_get(void)
{ {
#ifdef BUILD_ASYNC_EVENTS
_evas_async_events_fork_handle(); _evas_async_events_fork_handle();
return _fd_read; return _fd_read;
#else
return -1;
#endif
} }
EAPI int EAPI int
evas_async_events_process(void) evas_async_events_process(void)
{ {
#ifdef BUILD_ASYNC_EVENTS
Evas_Event_Async *ev; Evas_Event_Async *ev;
int check; int check;
int count = 0; int count = 0;
@ -134,15 +121,11 @@ evas_async_events_process(void)
} }
return count; return count;
#else
return 0;
#endif
} }
EAPI Eina_Bool EAPI Eina_Bool
evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_info, Evas_Async_Events_Put_Cb func) evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_info, Evas_Async_Events_Put_Cb func)
{ {
#ifdef BUILD_ASYNC_EVENTS
Evas_Event_Async *ev; Evas_Event_Async *ev;
ssize_t check; ssize_t check;
Eina_Bool result = EINA_FALSE; Eina_Bool result = EINA_FALSE;
@ -184,8 +167,4 @@ evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_i
} }
return result; return result;
#else
func((void*) target, type, event_info);
return EINA_TRUE;
#endif
} }

View File

@ -51,27 +51,18 @@ evas_init(void)
} }
evas_module_init(); evas_module_init();
#ifdef BUILD_ASYNC_EVENTS
if (!evas_async_events_init()) if (!evas_async_events_init())
goto shutdown_module; goto shutdown_module;
#endif
#ifdef EVAS_CSERVE
if (getenv("EVAS_CSERVE")) evas_cserve_init();
#endif
#ifdef EVAS_CSERVE2 #ifdef EVAS_CSERVE2
if (getenv("EVAS_CSERVE2")) evas_cserve2_init(); if (getenv("EVAS_CSERVE2")) evas_cserve2_init();
#endif #endif
#ifdef BUILD_ASYNC_PRELOAD
_evas_preload_thread_init(); _evas_preload_thread_init();
#endif
return _evas_init_count; return _evas_init_count;
#ifdef BUILD_ASYNC_EVENTS
shutdown_module: shutdown_module:
evas_module_shutdown(); evas_module_shutdown();
eina_log_domain_unregister(_evas_log_dom_global); eina_log_domain_unregister(_evas_log_dom_global);
#endif
shutdown_eina: shutdown_eina:
eina_shutdown(); eina_shutdown();
shutdown_evil: shutdown_evil:
@ -93,15 +84,8 @@ evas_shutdown(void)
if (--_evas_init_count != 0) if (--_evas_init_count != 0)
return _evas_init_count; return _evas_init_count;
#ifdef BUILD_ASYNC_EVENTS
_evas_preload_thread_shutdown(); _evas_preload_thread_shutdown();
#endif
#ifdef EVAS_CSERVE
if (getenv("EVAS_CSERVE")) evas_cserve_shutdown();
#endif
#ifdef BUILD_ASYNC_EVENTS
evas_async_events_shutdown(); evas_async_events_shutdown();
#endif
evas_font_dir_cache_free(); evas_font_dir_cache_free();
evas_common_shutdown(); evas_common_shutdown();
evas_module_shutdown(); evas_module_shutdown();

View File

@ -71,10 +71,8 @@ EAPI Eo_Op EVAS_OBJ_TEXTBLOCK_BASE_ID = EO_NOOP;
#define MY_CLASS EVAS_OBJ_TEXTBLOCK_CLASS #define MY_CLASS EVAS_OBJ_TEXTBLOCK_CLASS
#ifdef HAVE_LINEBREAK
#include "linebreak.h" #include "linebreak.h"
#include "wordbreak.h" #include "wordbreak.h"
#endif
/* save typing */ /* save typing */
#define ENFN obj->layer->evas->engine.func #define ENFN obj->layer->evas->engine.func
@ -3330,18 +3328,10 @@ _layout_get_charwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt,
} }
/* -1 means no wrap */ /* -1 means no wrap */
#ifdef HAVE_LINEBREAK
/* Allow break means: if we can break after the current char */ /* Allow break means: if we can break after the current char */
#define ALLOW_BREAK(i) \ #define ALLOW_BREAK(i) \
(breaks[i] <= LINEBREAK_ALLOWBREAK) (breaks[i] <= LINEBREAK_ALLOWBREAK)
#else
#define ALLOW_BREAK(i) \
(_is_white(str[i]))
#endif
static int static int
_layout_get_word_mixwrap_common(Ctxt *c, Evas_Object_Textblock_Format *fmt, _layout_get_word_mixwrap_common(Ctxt *c, Evas_Object_Textblock_Format *fmt,
const Evas_Object_Textblock_Item *it, Eina_Bool mixed_wrap, const Evas_Object_Textblock_Item *it, Eina_Bool mixed_wrap,
@ -3354,10 +3344,6 @@ _layout_get_word_mixwrap_common(Ctxt *c, Evas_Object_Textblock_Format *fmt,
it->text_node->unicode); it->text_node->unicode);
int item_start = it->text_pos; int item_start = it->text_pos;
size_t len = eina_ustrbuf_length_get(it->text_node->unicode); size_t len = eina_ustrbuf_length_get(it->text_node->unicode);
#ifndef HAVE_LINEBREAK
/* Not used without liblinebreak ATM. */
(void) breaks;
#endif
{ {
int swrap = -1; int swrap = -1;
@ -3754,7 +3740,6 @@ _layout_par(Ctxt *c)
1 : _ITEM_TEXT(it)->text_props.text_len; 1 : _ITEM_TEXT(it)->text_props.text_len;
#ifdef HAVE_LINEBREAK
/* If we haven't calculated the linebreaks yet, /* If we haven't calculated the linebreaks yet,
* do */ * do */
if (!line_breaks) if (!line_breaks)
@ -3775,7 +3760,6 @@ _layout_par(Ctxt *c)
len, lang, line_breaks); len, lang, line_breaks);
} }
} }
#endif
if (c->ln->items) if (c->ln->items)
line_start = c->ln->items->text_pos; line_start = c->ln->items->text_pos;
else else
@ -3912,10 +3896,8 @@ _layout_par(Ctxt *c)
} }
end: end:
#ifdef HAVE_LINEBREAK
if (line_breaks) if (line_breaks)
free(line_breaks); free(line_breaks);
#endif
return ret; return ret;
} }
@ -6323,44 +6305,29 @@ evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur)
return EINA_FALSE; return EINA_FALSE;
} }
#ifdef HAVE_LINEBREAK
/* BREAK_AFTER: true if we can break after the current char. /* BREAK_AFTER: true if we can break after the current char.
* Both macros assume str[i] is not the terminating nul */ * Both macros assume str[i] is not the terminating nul */
#define BREAK_AFTER(i) \ #define BREAK_AFTER(i) \
(breaks[i] == WORDBREAK_BREAK) (breaks[i] == WORDBREAK_BREAK)
#else
#define BREAK_AFTER(i) \
((!text[i + 1]) || \
(_is_white(text[i]) && !_is_white(text[i + 1])) || \
(!_is_white(text[i]) && _is_white(text[i + 1])))
#endif
EAPI Eina_Bool EAPI Eina_Bool
evas_textblock_cursor_word_start(Evas_Textblock_Cursor *cur) evas_textblock_cursor_word_start(Evas_Textblock_Cursor *cur)
{ {
const Eina_Unicode *text; const Eina_Unicode *text;
size_t i; size_t i;
#ifdef HAVE_LINEBREAK
char *breaks; char *breaks;
#endif
if (!cur) return EINA_FALSE; if (!cur) return EINA_FALSE;
TB_NULL_CHECK(cur->node, EINA_FALSE); TB_NULL_CHECK(cur->node, EINA_FALSE);
text = eina_ustrbuf_string_get(cur->node->unicode); text = eina_ustrbuf_string_get(cur->node->unicode);
#ifdef HAVE_LINEBREAK
{ {
const char *lang = ""; /* FIXME: get lang */ const char *lang = ""; /* FIXME: get lang */
size_t len = eina_ustrbuf_length_get(cur->node->unicode); size_t len = eina_ustrbuf_length_get(cur->node->unicode);
breaks = malloc(len); breaks = malloc(len);
set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks); set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks);
} }
#endif
i = cur->pos; i = cur->pos;
@ -6374,9 +6341,7 @@ evas_textblock_cursor_word_start(Evas_Textblock_Cursor *cur)
cur->pos = i; cur->pos = i;
#ifdef HAVE_LINEBREAK
free(breaks); free(breaks);
#endif
return EINA_TRUE; return EINA_TRUE;
} }
@ -6385,23 +6350,19 @@ evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur)
{ {
const Eina_Unicode *text; const Eina_Unicode *text;
size_t i; size_t i;
#ifdef HAVE_LINEBREAK
char *breaks; char *breaks;
#endif
if (!cur) return EINA_FALSE; if (!cur) return EINA_FALSE;
TB_NULL_CHECK(cur->node, EINA_FALSE); TB_NULL_CHECK(cur->node, EINA_FALSE);
text = eina_ustrbuf_string_get(cur->node->unicode); text = eina_ustrbuf_string_get(cur->node->unicode);
#ifdef HAVE_LINEBREAK
{ {
const char *lang = ""; /* FIXME: get lang */ const char *lang = ""; /* FIXME: get lang */
size_t len = eina_ustrbuf_length_get(cur->node->unicode); size_t len = eina_ustrbuf_length_get(cur->node->unicode);
breaks = malloc(len); breaks = malloc(len);
set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks); set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks);
} }
#endif
i = cur->pos; i = cur->pos;
@ -6416,9 +6377,7 @@ evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur)
cur->pos = i; cur->pos = i;
#ifdef HAVE_LINEBREAK
free(breaks); free(breaks);
#endif
return EINA_TRUE; return EINA_TRUE;
} }
@ -9571,7 +9530,6 @@ evas_object_textblock_init(Evas_Object *eo_obj)
{ {
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS); Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS); Evas_Object_Textblock *o = eo_data_get(eo_obj, MY_CLASS);
#ifdef HAVE_LINEBREAK
static Eina_Bool linebreak_init = EINA_FALSE; static Eina_Bool linebreak_init = EINA_FALSE;
if (!linebreak_init) if (!linebreak_init)
{ {
@ -9579,7 +9537,6 @@ evas_object_textblock_init(Evas_Object *eo_obj)
init_linebreak(); init_linebreak();
init_wordbreak(); init_wordbreak();
} }
#endif
/* set up default settings for this kind of object */ /* set up default settings for this kind of object */
obj->cur.color.r = 255; obj->cur.color.r = 255;

View File

@ -5,181 +5,45 @@
EAPI Eina_Bool EAPI Eina_Bool
evas_cserve_want_get(void) evas_cserve_want_get(void)
{ {
#ifdef EVAS_CSERVE
return evas_cserve_use_get();
#endif
return 0; return 0;
} }
EAPI Eina_Bool EAPI Eina_Bool
evas_cserve_connected_get(void) evas_cserve_connected_get(void)
{ {
#ifdef EVAS_CSERVE
return evas_cserve_have_get();
#endif
return 0; return 0;
} }
EAPI Eina_Bool EAPI Eina_Bool
evas_cserve_stats_get(Evas_Cserve_Stats *stats) evas_cserve_stats_get(Evas_Cserve_Stats *stats __UNUSED__)
{ {
#ifdef EVAS_CSERVE
Op_Getstats_Reply st;
if (!evas_cserve_raw_stats_get(&st)) return 0;
if (!stats) return 1;
stats->saved_memory = st.saved_memory;
stats->wasted_memory = st.wasted_memory;
stats->saved_memory_peak = st.saved_memory_peak;
stats->wasted_memory_peak = st.wasted_memory_peak;
stats->saved_time_image_header_load = st.saved_time_image_header_load;
stats->saved_time_image_data_load = st.saved_time_image_data_load;
// may expand this in future
return 1;
#else
(void) stats;
return 0; return 0;
#endif
} }
EAPI Eina_Bool EAPI Eina_Bool
evas_cserve_image_cache_contents_get(Evas_Cserve_Image_Cache *cache) evas_cserve_image_cache_contents_get(Evas_Cserve_Image_Cache *cache __UNUSED__)
{ {
#ifdef EVAS_CSERVE
Op_Getinfo_Reply *info;
unsigned char *p;
int i, j;
if (!(info = evas_cserve_raw_info_get())) return 0;
if (!cache)
{
free(info);
return 1;
}
cache->active.mem_total = info->active.mem_total;
cache->active.count = info->active.count;
cache->cached.mem_total = info->cached.mem_total;
cache->cached.count = info->cached.count;
cache->images = NULL;
j = info->active.count + info->cached.count;
p = (unsigned char *)info;
p += sizeof(Op_Getinfo_Reply);
for (i = 0; i < j; i++)
{
Evas_Cserve_Image *im;
Op_Getinfo_Item it;
char *file, *key;
memcpy(&it, p, sizeof(Op_Getinfo_Item));
file = (char*) (p + sizeof(Op_Getinfo_Item));
key = file + strlen(file) + 1;
im = calloc(1, sizeof(Evas_Cserve_Image));
if (!im) continue;
if (file[0] != 0)
{
file = (char *)eina_stringshare_add(file);
if (!file)
{
free(im);
continue;
}
}
else
file = NULL;
if (key[0] != 0)
{
key = (char *)eina_stringshare_add(key);
if (!key)
{
if (file) eina_stringshare_del(file);
free(im);
continue;
}
}
else key = NULL;
cache->images = eina_list_append(cache->images, im);
im->file = file;
im->key = key;
im->w = it.w;
im->h = it.h;
im->cached_time = it.cached_time;
im->file_mod_time = it.file_mod_time;
im->file_checked_time = it.file_checked_time;
im->refcount = it.refcount;
im->data_refcount = it.data_refcount;
im->memory_footprint = it.memory_footprint;
im->head_load_time = it.head_load_time;
im->data_load_time = it.data_load_time;
im->active = it.active;
im->alpha = it.alpha;
im->data_loaded = it.data_loaded;
im->dead = it.dead;
im->useless = it.useless;
}
free(info);
return 1;
#else
(void) cache;
return 0; return 0;
#endif
} }
EAPI void EAPI void
evas_cserve_image_cache_contents_clean(Evas_Cserve_Image_Cache *cache) evas_cserve_image_cache_contents_clean(Evas_Cserve_Image_Cache *cache __UNUSED__)
{ {
#ifdef EVAS_CSERVE
Evas_Cserve_Image *im;
EINA_LIST_FREE(cache->images, im)
{
if (im->file) eina_stringshare_del(im->file);
if (im->key) eina_stringshare_del(im->key);
free(im);
}
#else
(void) cache;
#endif
} }
EAPI Eina_Bool EAPI Eina_Bool
evas_cserve_config_get(Evas_Cserve_Config *config) evas_cserve_config_get(Evas_Cserve_Config *config __UNUSED__)
{ {
#ifdef EVAS_CSERVE
Op_Getconfig_Reply conf;
if (!evas_cserve_raw_config_get(&conf)) return 0;
if (!config) return 1;
config->cache_max_usage = conf.cache_max_usage;
config->cache_item_timeout = conf.cache_item_timeout;
config->cache_item_timeout_check = conf.cache_item_timeout_check;
return 1;
#else
(void) config;
return 0; return 0;
#endif
} }
EAPI Eina_Bool EAPI Eina_Bool
evas_cserve_config_set(const Evas_Cserve_Config *config) evas_cserve_config_set(const Evas_Cserve_Config *config __UNUSED__)
{ {
#ifdef EVAS_CSERVE
Op_Setconfig conf;
if (!config) return 1;
conf.cache_max_usage = config->cache_max_usage;
conf.cache_item_timeout = config->cache_item_timeout;
conf.cache_item_timeout_check = config->cache_item_timeout_check;
return evas_cserve_raw_config_set(&conf);
#else
(void) config;
return 0; return 0;
#endif
} }
EAPI void EAPI void
evas_cserve_disconnect(void) evas_cserve_disconnect(void)
{ {
#ifdef EVAS_CSERVE
evas_cserve_discon();
#endif
} }

View File

@ -1,4 +1,6 @@
#include "evas_common.h" #include "evas_common.h"
#include "evas_convert_gry_1.h" #include "evas_convert_gry_1.h"
void evas_common_convert_rgba_to_1bpp_gry_1_dith (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_1bpp_gry_1_dith(DATA32 *src __UNUSED__, DATA8 *dst __UNUSED__, int src_jump __UNUSED__, int dst_jump __UNUSED__, int w __UNUSED__, int h __UNUSED__, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__)
{
}

View File

@ -2,7 +2,6 @@
# define _EVAS_FONT_PRIVATE_H # define _EVAS_FONT_PRIVATE_H
#include "evas_font_ot.h" #include "evas_font_ot.h"
#ifdef BUILD_PTHREAD
extern LK(lock_font_draw); // for freetype2 API calls extern LK(lock_font_draw); // for freetype2 API calls
extern LK(lock_bidi); // for fribidi API calls extern LK(lock_bidi); // for fribidi API calls
extern LK(lock_ot); // for harfbuzz calls extern LK(lock_ot); // for harfbuzz calls
@ -15,17 +14,6 @@ extern LK(lock_ot); // for harfbuzz calls
/* Macros for text walking */ /* Macros for text walking */
# define OTLOCK() LKL(lock_ot) # define OTLOCK() LKL(lock_ot)
# define OTUNLOCK() LKU(lock_ot) # define OTUNLOCK() LKU(lock_ot)
#else
# define FTLOCK()
# define FTUNLOCK()
# define BIDILOCK()
# define BIDIUNLOCK()
/* Macros for text walking */
# define OTLOCK()
# define OTUNLOCK()
#endif
void evas_common_font_source_unload(RGBA_Font_Source *fs); void evas_common_font_source_unload(RGBA_Font_Source *fs);
void evas_common_font_source_reload(RGBA_Font_Source *fs); void evas_common_font_source_reload(RGBA_Font_Source *fs);

View File

@ -124,9 +124,7 @@ evas_common_rgba_image_colorspace_set(Image_Entry* ie_dst, int cspace)
{ {
ie_dst->allocated.w = 0; ie_dst->allocated.w = 0;
ie_dst->allocated.h = 0; ie_dst->allocated.h = 0;
#ifdef BUILD_ASYNC_PRELOAD
ie_dst->flags.preload_done = 0; ie_dst->flags.preload_done = 0;
#endif
ie_dst->flags.loaded = 0; ie_dst->flags.loaded = 0;
dst->image.data = NULL; dst->image.data = NULL;
dst->image.no_free = 0; dst->image.no_free = 0;

View File

@ -172,21 +172,6 @@ evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
int len, ret = EVAS_LOAD_ERROR_NONE; int len, ret = EVAS_LOAD_ERROR_NONE;
struct evas_image_foreach_loader_data fdata; struct evas_image_foreach_loader_data fdata;
#ifdef EVAS_CSERVE
if (evas_cserve_use_get())
{
// TODO: handle errors from server and return them?
DBG("try cserve '%s' '%s'", ie->file, ie->key ? ie->key : "");
if (evas_cserve_image_load(ie, ie->file, ie->key, &(ie->load_opts)))
{
DBG("try cserve '%s' '%s' loaded!",
ie->file, ie->key ? ie->key : "");
return EVAS_LOAD_ERROR_NONE;
}
}
#endif
#ifdef EVAS_CSERVE2 #ifdef EVAS_CSERVE2
if (evas_cserve2_use_get()) if (evas_cserve2_use_get())
{ {
@ -332,24 +317,6 @@ evas_common_load_rgba_image_data_from_file(Image_Entry *ie)
if ((ie->flags.loaded) && (!ie->flags.animated)) return EVAS_LOAD_ERROR_GENERIC; if ((ie->flags.loaded) && (!ie->flags.animated)) return EVAS_LOAD_ERROR_GENERIC;
#ifdef EVAS_CSERVE
if (ie->data1)
{
if (evas_cserve_image_data_load(ie))
{
RGBA_Image *im = (RGBA_Image *)ie;
Mem *mem = ie->data2;
if (mem)
{
im->image.data = (void*) (mem->data + mem->offset);
im->image.no_free = 1;
return EVAS_LOAD_ERROR_NONE;
}
}
return EVAS_LOAD_ERROR_GENERIC;
}
#endif
#ifdef EVAS_CSERVE2 #ifdef EVAS_CSERVE2
if (ie->data1) if (ie->data1)
{ {

View File

@ -196,9 +196,6 @@ _evas_common_rgba_image_delete(Image_Entry *ie)
* going to empty this struct out in case this happens again so i know * going to empty this struct out in case this happens again so i know
* that something else is overwritign this struct - or not */ * that something else is overwritign this struct - or not */
// memset(im, 0x99, sizeof(im)); // memset(im, 0x99, sizeof(im));
#ifdef EVAS_CSERVE
if (ie->data1) evas_cserve_image_free(ie);
#endif
#ifdef EVAS_CSERVE2 #ifdef EVAS_CSERVE2
if (ie->data1) if (ie->data1)
ERR("Shouldn't reach this point since we are using cache2: '%s' '%s'", ERR("Shouldn't reach this point since we are using cache2: '%s' '%s'",
@ -291,21 +288,6 @@ evas_common_rgba_image_unload(Image_Entry *ie)
} }
im->cs.data = NULL; im->cs.data = NULL;
#ifdef EVAS_CSERVE
if (ie->data1)
{
evas_cserve_image_useless(ie);
im->image.data = NULL;
ie->allocated.w = 0;
ie->allocated.h = 0;
ie->flags.loaded = 0;
#ifdef BUILD_ASYNC_PRELOAD
ie->flags.preload_done = 0;
#endif
return;
}
#endif
#ifdef EVAS_CSERVE2 #ifdef EVAS_CSERVE2
if (ie->data1) if (ie->data1)
{ {
@ -315,9 +297,7 @@ evas_common_rgba_image_unload(Image_Entry *ie)
// ie->allocated.w = 0; // ie->allocated.w = 0;
// ie->allocated.h = 0; // ie->allocated.h = 0;
// ie->flags.loaded = 0; // ie->flags.loaded = 0;
#ifdef BUILD_ASYNC_PRELOAD
ie->flags.preload_done = 0; ie->flags.preload_done = 0;
#endif
return; return;
} }
#endif #endif
@ -333,9 +313,7 @@ evas_common_rgba_image_unload(Image_Entry *ie)
ie->allocated.w = 0; ie->allocated.w = 0;
ie->allocated.h = 0; ie->allocated.h = 0;
ie->flags.loaded = 0; ie->flags.loaded = 0;
#ifdef BUILD_ASYNC_PRELOAD
ie->flags.preload_done = 0; ie->flags.preload_done = 0;
#endif
#ifdef SURFDBG #ifdef SURFDBG
surf_debug(); surf_debug();
#endif #endif
@ -387,9 +365,6 @@ _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned
RGBA_Image *im = (RGBA_Image *) ie; RGBA_Image *im = (RGBA_Image *) ie;
size_t siz = 0; size_t siz = 0;
#ifdef EVAS_CSERVE
if (ie->data1) return 0;
#endif
#ifdef EVAS_CSERVE2 #ifdef EVAS_CSERVE2
if (ie->data1) return 0; if (ie->data1) return 0;
#endif #endif
@ -466,10 +441,6 @@ _evas_common_rgba_image_surface_delete(Image_Entry *ie)
surfs = eina_list_remove(surfs, ie); surfs = eina_list_remove(surfs, ie);
#endif #endif
} }
#ifdef EVAS_CSERVE
else if (ie->data1)
evas_cserve_image_free(ie);
#endif
// #ifdef EVAS_CSERVE2 // #ifdef EVAS_CSERVE2
// else if (ie->data1) // else if (ie->data1)
// ERR("Shouldn't reach this point since we are using cache2."); // ERR("Shouldn't reach this point since we are using cache2.");
@ -479,9 +450,7 @@ _evas_common_rgba_image_surface_delete(Image_Entry *ie)
im->image.data = NULL; im->image.data = NULL;
ie->allocated.w = 0; ie->allocated.w = 0;
ie->allocated.h = 0; ie->allocated.h = 0;
#ifdef BUILD_ASYNC_PRELOAD
ie->flags.preload_done = 0; ie->flags.preload_done = 0;
#endif
ie->flags.loaded = 0; ie->flags.loaded = 0;
evas_common_rgba_image_scalecache_dirty(&im->cache_entry); evas_common_rgba_image_scalecache_dirty(&im->cache_entry);
#ifdef SURFDBG #ifdef SURFDBG
@ -502,9 +471,6 @@ _evas_common_rgba_image_dirty_region(Image_Entry* ie, unsigned int x __UNUSED__,
{ {
RGBA_Image *im = (RGBA_Image *) ie; RGBA_Image *im = (RGBA_Image *) ie;
#ifdef EVAS_CSERVE
if (ie->data1) evas_cserve_image_free(ie);
#endif
#ifdef EVAS_CSERVE2 #ifdef EVAS_CSERVE2
// if (ie->data1) evas_cserve2_image_free(ie); // if (ie->data1) evas_cserve2_image_free(ie);
if (ie->data1) ERR("Shouldn't reach this point since we are using cache2."); if (ie->data1) ERR("Shouldn't reach this point since we are using cache2.");
@ -526,9 +492,6 @@ _evas_common_rgba_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src)
if (_evas_common_rgba_image_surface_alloc(&dst->cache_entry, if (_evas_common_rgba_image_surface_alloc(&dst->cache_entry,
src->cache_entry.w, src->cache_entry.h)) src->cache_entry.w, src->cache_entry.h))
{ {
#ifdef EVAS_CSERVE
if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src);
#endif
#ifdef EVAS_CSERVE2 #ifdef EVAS_CSERVE2
// if (ie_src->data1) evas_cserve2_image_free((Image_Entry*) ie_src); // if (ie_src->data1) evas_cserve2_image_free((Image_Entry*) ie_src);
if (ie_src->data1) ERR("Shouldn't reach this point since we are using cache2."); if (ie_src->data1) ERR("Shouldn't reach this point since we are using cache2.");
@ -536,12 +499,9 @@ _evas_common_rgba_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src)
return 1; return 1;
} }
#ifdef EVAS_CSERVE
if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src);
#endif
#ifdef EVAS_CSERVE2 #ifdef EVAS_CSERVE2
// if (ie_src->data1) evas_cserve2_image_free((Image_Entry*) ie_src); // if (ie_src->data1) evas_cserve2_image_free((Image_Entry*) ie_src);
if (ie_src->data1) ERR("Shouldn't reach this point since we are using cache2."); if (ie_src->data1) ERR("Shouldn't reach this point since we are using cache2.");
#endif #endif
evas_common_image_colorspace_normalize(src); evas_common_image_colorspace_normalize(src);
evas_common_image_colorspace_normalize(dst); evas_common_image_colorspace_normalize(dst);
@ -563,9 +523,7 @@ _evas_common_rgba_image_ram_usage(Image_Entry *ie)
if (im->image.data) if (im->image.data)
{ {
#if defined(EVAS_CSERVE) #ifdef EVAS_CSERVE2
if ((!im->image.no_free) || (ie->data1))
#elif defined(EVAS_CSERVE2)
if ((!im->image.no_free) || (ie->data1)) if ((!im->image.no_free) || (ie->data1))
#else #else
if ((!im->image.no_free)) if ((!im->image.no_free))
@ -715,9 +673,6 @@ evas_common_image_colorspace_normalize(RGBA_Image *im)
case EVAS_COLORSPACE_ARGB8888: case EVAS_COLORSPACE_ARGB8888:
if (im->image.data != im->cs.data) if (im->image.data != im->cs.data)
{ {
#ifdef EVAS_CSERVE
if (((Image_Entry *)im)->data1) evas_cserve_image_free(&im->cache_entry);
#endif
#ifdef EVAS_CSERVE2 #ifdef EVAS_CSERVE2
// if (((Image_Entry *)im)->data1) evas_cserve2_image_free(&im->cache_entry); // if (((Image_Entry *)im)->data1) evas_cserve2_image_free(&im->cache_entry);
if (((Image_Entry *)im)->data1) ERR("Shouldn't reach this point since we are using cache2."); if (((Image_Entry *)im)->data1) ERR("Shouldn't reach this point since we are using cache2.");

View File

@ -1,9 +1,12 @@
#include "evas_common.h" #include "evas_common.h"
#include <unistd.h> #include <unistd.h>
#include <pthread.h>
#ifdef HAVE_PTHREAD_AFFINITY
#include <sched.h>
#endif
#ifdef BUILD_PIPE_RENDER #ifdef BUILD_PIPE_RENDER
# ifdef BUILD_PTHREAD
typedef struct _Thinfo typedef struct _Thinfo
{ {
RGBA_Image *im; RGBA_Image *im;
@ -14,7 +17,6 @@ typedef struct _Thinfo
Eina_Array cutout_trash; Eina_Array cutout_trash;
Eina_Array rects_task; Eina_Array rects_task;
} Thinfo; } Thinfo;
#endif
static RGBA_Pipe *evas_common_pipe_add(RGBA_Pipe *pipe, RGBA_Pipe_Op **op); static RGBA_Pipe *evas_common_pipe_add(RGBA_Pipe *pipe, RGBA_Pipe_Op **op);
static void evas_common_pipe_draw_context_copy(RGBA_Draw_Context *dc, RGBA_Pipe_Op *op); static void evas_common_pipe_draw_context_copy(RGBA_Draw_Context *dc, RGBA_Pipe_Op *op);
@ -71,7 +73,6 @@ evas_common_pipe_op_free(RGBA_Pipe_Op *op)
evas_common_draw_context_apply_clean_cutouts(&op->context.cutout); evas_common_draw_context_apply_clean_cutouts(&op->context.cutout);
} }
#ifdef BUILD_PTHREAD
/* main api calls */ /* main api calls */
static void * static void *
evas_common_pipe_thread(void *data) evas_common_pipe_thread(void *data)
@ -109,9 +110,7 @@ evas_common_pipe_thread(void *data)
} }
return NULL; return NULL;
} }
#endif
#ifdef BUILD_PTHREAD
static Eina_List *im_task = NULL; static Eina_List *im_task = NULL;
static Eina_List *text_task = NULL; static Eina_List *text_task = NULL;
static Thinfo task_thinfo[TH_MAX]; static Thinfo task_thinfo[TH_MAX];
@ -164,13 +163,10 @@ evas_pipe_prepare_push(RGBA_Pipe_Op *op)
current++; current++;
} }
#endif
static void static void
evas_common_pipe_begin(RGBA_Image *im) evas_common_pipe_begin(RGBA_Image *im)
{ {
#define SZ 128 #define SZ 128
#ifdef BUILD_PTHREAD
unsigned int x, y, cpu; unsigned int x, y, cpu;
RGBA_Pipe_Thread_Info *info; RGBA_Pipe_Thread_Info *info;
unsigned int estimatex, estimatey; unsigned int estimatex, estimatey;
@ -217,21 +213,18 @@ evas_common_pipe_begin(RGBA_Image *im)
/* tell worker threads to start */ /* tell worker threads to start */
pthread_barrier_wait(&(thbarrier[0])); pthread_barrier_wait(&(thbarrier[0]));
#endif
} }
EAPI void EAPI void
evas_common_pipe_flush(RGBA_Image *im) evas_common_pipe_flush(RGBA_Image *im)
{ {
if (!im->cache_entry.pipe) return; if (!im->cache_entry.pipe) return;
#ifdef BUILD_PTHREAD
if (thread_num > 1) if (thread_num > 1)
{ {
/* sync worker threads */ /* sync worker threads */
pthread_barrier_wait(&(thbarrier[1])); pthread_barrier_wait(&(thbarrier[1]));
} }
else else
#endif
{ {
RGBA_Pipe_Thread_Info info; RGBA_Pipe_Thread_Info info;
RGBA_Pipe *p; RGBA_Pipe *p;
@ -698,7 +691,6 @@ evas_common_pipe_map_render(RGBA_Image *root)
evas_common_pipe_flush(root); evas_common_pipe_flush(root);
} }
#ifdef BUILD_PTHREAD
static void* static void*
evas_common_pipe_load(void *data) evas_common_pipe_load(void *data)
{ {
@ -765,14 +757,12 @@ evas_common_pipe_load(void *data)
return NULL; return NULL;
} }
#endif
static volatile int bval = 0; static volatile int bval = 0;
static void static void
evas_common_pipe_load_do(RGBA_Image *im) evas_common_pipe_load_do(RGBA_Image *im)
{ {
#ifdef BUILD_PTHREAD
int i; int i;
for (i = 0; i < thread_num; i++) for (i = 0; i < thread_num; i++)
@ -783,7 +773,6 @@ evas_common_pipe_load_do(RGBA_Image *im)
/* sync worker threads */ /* sync worker threads */
pthread_barrier_wait(&(task_thbarrier[1])); pthread_barrier_wait(&(task_thbarrier[1]));
#endif
} }
EAPI void EAPI void
@ -884,12 +873,16 @@ evas_common_pipe_init(void)
for (i = 0; i < thread_num; i++) for (i = 0; i < thread_num; i++)
{ {
pthread_attr_t attr; pthread_attr_t attr;
#ifdef HAVE_PTHREAD_AFFINITY
cpu_set_t cpu; cpu_set_t cpu;
#endif
pthread_attr_init(&attr); pthread_attr_init(&attr);
#ifdef HAVE_PTHREAD_AFFINITY
CPU_ZERO(&cpu); CPU_ZERO(&cpu);
CPU_SET(i % cpunum, &cpu); CPU_SET(i % cpunum, &cpu);
pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu); pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu);
#endif
thinfo[i].thread_num = i; thinfo[i].thread_num = i;
thinfo[i].tasks = NULL; thinfo[i].tasks = NULL;
thinfo[i].barrier = thbarrier; thinfo[i].barrier = thbarrier;
@ -904,12 +897,16 @@ evas_common_pipe_init(void)
for (i = 0; i < thread_num; i++) for (i = 0; i < thread_num; i++)
{ {
pthread_attr_t attr; pthread_attr_t attr;
#ifdef HAVE_PTHREAD_AFFINITY
cpu_set_t cpu; cpu_set_t cpu;
#endif
pthread_attr_init(&attr);
pthread_attr_init(&attr);
#ifdef HAVE_PTHREAD_AFFINITY
CPU_ZERO(&cpu); CPU_ZERO(&cpu);
CPU_SET(i % cpunum, &cpu); CPU_SET(i % cpunum, &cpu);
pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu); pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu);
#endif
task_thinfo[i].thread_num = i; task_thinfo[i].thread_num = i;
task_thinfo[i].tasks = NULL; task_thinfo[i].tasks = NULL;
task_thinfo[i].barrier = task_thbarrier; task_thinfo[i].barrier = task_thbarrier;

View File

@ -446,9 +446,7 @@ evas_module_load(Evas_Module *em)
if (!em->definition->func.open(em)) return 0; if (!em->definition->func.open(em)) return 0;
em->loaded = 1; em->loaded = 1;
#ifdef BUILD_ASYNC_PRELOAD
LKI(em->lock); LKI(em->lock);
#endif
return 1; return 1;
} }
@ -464,33 +462,23 @@ evas_module_unload(Evas_Module *em)
// em->definition->func.close(em); // em->definition->func.close(em);
// em->loaded = 0; // em->loaded = 0;
#ifdef BUILD_ASYNC_PRELOAD
LKD(em->lock); LKD(em->lock);
#endif
} }
void void
evas_module_ref(Evas_Module *em) evas_module_ref(Evas_Module *em)
{ {
#ifdef BUILD_ASYNC_PRELOAD
LKL(em->lock); LKL(em->lock);
#endif
em->ref++; em->ref++;
#ifdef BUILD_ASYNC_PRELOAD
LKU(em->lock); LKU(em->lock);
#endif
} }
void void
evas_module_unref(Evas_Module *em) evas_module_unref(Evas_Module *em)
{ {
#ifdef BUILD_ASYNC_PRELOAD
LKL(em->lock); LKL(em->lock);
#endif
em->ref--; em->ref--;
#ifdef BUILD_ASYNC_PRELOAD
LKU(em->lock); LKU(em->lock);
#endif
} }
static int use_count = 0; static int use_count = 0;

View File

@ -173,14 +173,6 @@ extern EAPI int _evas_log_dom_global;
# define __ARM_ARCH__ 73 # define __ARM_ARCH__ 73
#endif #endif
#ifndef BUILD_PTHREAD
# undef BUILD_PIPE_RENDER
#endif
#if defined(BUILD_ASYNC_PRELOAD) && !defined(BUILD_PTHREAD)
# define BUILD_PTHREAD
#endif
#define LK(x) Eina_Lock x #define LK(x) Eina_Lock x
#define LKI(x) eina_lock_new(&(x)) #define LKI(x) eina_lock_new(&(x))
#define LKD(x) eina_lock_free(&(x)) #define LKD(x) eina_lock_free(&(x))
@ -197,19 +189,10 @@ extern EAPI int _evas_log_dom_global;
#define WRLKL(x) eina_rwlock_take_write(&(x)) #define WRLKL(x) eina_rwlock_take_write(&(x))
#define RWLKU(x) eina_rwlock_release(&(x)) #define RWLKU(x) eina_rwlock_release(&(x))
#ifdef BUILD_PTHREAD
# define TH(x) pthread_t x # define TH(x) pthread_t x
# define THI(x) int x # define THI(x) int x
# define TH_MAX 8 # define TH_MAX 8
#else
# define TH(x)
# define THI(x)
# define TH_MAX 0
#endif
#include <ft2build.h> #include <ft2build.h>
#include FT_FREETYPE_H #include FT_FREETYPE_H
#include FT_GLYPH_H #include FT_GLYPH_H
@ -535,11 +518,10 @@ struct _Image_Entry_Flags
Eina_Bool lru : 1; Eina_Bool lru : 1;
Eina_Bool alpha_sparse : 1; Eina_Bool alpha_sparse : 1;
#ifdef BUILD_ASYNC_PRELOAD
Eina_Bool preload_done : 1; Eina_Bool preload_done : 1;
Eina_Bool delete_me : 1; Eina_Bool delete_me : 1;
Eina_Bool pending : 1; Eina_Bool pending : 1;
#endif
Eina_Bool animated : 1; Eina_Bool animated : 1;
Eina_Bool rotated : 1; Eina_Bool rotated : 1;
}; };
@ -613,11 +595,9 @@ struct _Image_Entry
void *loader; void *loader;
} info; } info;
#ifdef BUILD_ASYNC_PRELOAD
LK(lock); LK(lock);
LK(lock_cancel); LK(lock_cancel);
Eina_Bool unload_cancel : 1; Eina_Bool unload_cancel : 1;
#endif
Image_Entry_Flags flags; Image_Entry_Flags flags;
Evas_Image_Scale_Hint scale_hint; Evas_Image_Scale_Hint scale_hint;

View File

@ -1,7 +1,3 @@
MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = SUBDIRS = liblinebreak
if EVAS_USE_LINEBREAK
SUBDIRS += liblinebreak
endif