diff --git a/legacy/evas/configure.ac b/legacy/evas/configure.ac index 3dc64a2322..6cf13dbc29 100644 --- a/legacy/evas/configure.ac +++ b/legacy/evas/configure.ac @@ -277,32 +277,10 @@ if test "x${want_fontconfig}" = "xyes"; then [AC_MSG_ERROR([Fontconfig not found])]) fi -# linebreak -have_linebreak="no" -want_linebreak="yes" -AC_ARG_ENABLE([liblinebreak], - 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 +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) # fribidi support have_fribidi="no" @@ -329,9 +307,7 @@ if test "x${want_fribidi}" = "xyes"; then AC_CHECK_SIZEOF(FriBidiChar,, [#include ]) CPPFLAGS="$CPPFLAGS_SAVE" ], - [ - AC_MSG_ERROR([Fribidi not found]) - ]) + [AC_MSG_ERROR([Fribidi not found])]) fi # harfbuzz support @@ -814,7 +790,7 @@ fi ##################################################################### ## 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}" ##################################################################### @@ -897,8 +873,6 @@ AM_CONDITIONAL(EVAS_STATIC_BUILD_WBMP, [${do_static}]) 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_libs="${EET_LIBS}" AC_SUBST([evas_image_loader_eet_cflags]) @@ -974,7 +948,7 @@ EVAS_CHECK_IMAGE_LOADER([SVG], [${want_evas_image_loader_svg}]) # basic pthread support AC_CHECK_HEADER(pthread.h, [], [AC_MSG_ERROR([Pthread support missing.])]) # sched_getaffinity pthread_attr_setaffinity_np -AC_CHECK_HEADERS([pthread.h sched.h], +AC_CHECK_HEADERS([pthread.h], [ CFLAGS_save="${CFLAGS}" CFLAGS="${CFLAGS} -pthread" @@ -982,18 +956,29 @@ AC_CHECK_HEADERS([pthread.h sched.h], LIBS="${LIBS} -pthread" AC_LINK_IFELSE( [AC_LANG_PROGRAM([[ +#include +#include + ]], + [[ +pthread_barrier_wait(NULL); + ]])], + [], + [AC_MSG_ERROR([Your pthread implementation does not have pthread_barrier_wait])]) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[ +#include #include #include ]], [[ pthread_attr_setaffinity_np(NULL, 0, NULL); -pthread_barrier_wait(NULL); - ]])], [], - [AC_MSG_ERROR([Missing pthread_attr_setaffinity_np or pthread_barrier_wait.])]) + ]])], + [AC_DEFINE(HAVE_PTHREAD_AFFINITY, 1, [Pthread pthread_attr_setaffinity_np])], + []) CFLAGS=${CFLAGS_save} LIBS=${LIBS_save} ], - [AC_MSG_ERROR([Missing sched.h])]) + [AC_MSG_ERROR([Missing pthread.h])]) pthread_cflags="-pthread" pthread_libs="-pthread" 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"]) ##################################################################### -## 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 want_valgrind="no" have_valgrind="no" @@ -1262,7 +1213,7 @@ AC_ARG_ENABLE([build-examples], # put in here the dependencies for Evas' examples. they are # meant to be 'real world' usage examples, thus one will be # 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], [edje_cc=$($PKG_CONFIG --variable=prefix edje)/bin/edje_cc], [build_examples="no"]) @@ -1452,7 +1403,6 @@ echo echo "Font Rendering Helpers:" echo " Fribidi.................: $have_fribidi" echo " Harfbuzz................: $have_harfbuzz" -echo " liblinebreak............: $have_linebreak" # FIXME: add non freetype2 font engine support # FIXME: make freetype2 optional echo @@ -1467,6 +1417,7 @@ echo " MAGIC_DEBUG.............: $want_evas_magic_debug" echo " Cache Server 2..........: $want_evas_cserve2" echo " Threaded Pipe Rendering.: $build_pipe_render" echo +echo "Optional pixman rendering path:" echo " Pixman..................: $have_pixman" echo " Pixman Fonts............: $have_pixman_font" echo " Pixman Rects............: $have_pixman_rect" @@ -1475,12 +1426,11 @@ echo " Pixman Polygons.........: $have_pixman_poly" echo " Pixman Images...........: $have_pixman_image" echo " Pixman Image ScaleSample: $have_pixman_image_scale_sample" echo -echo " Tiled 32BPP rotate......: $have_tile_rotate" -echo echo "Conversion Options:" echo " Smaller Dither Mask.....: $conv_small_dither" echo " Line Dither Mask........: $conv_line_dither" echo " No Dither Mask for 16bpp: $conv_no_dither" +echo " Tiled 32BPP rotate......: $have_tile_rotate" echo echo "Documentation.............: ${build_doc}" echo "Examples..................: install:${install_examples} build:${build_examples}" diff --git a/legacy/evas/src/lib/cache/evas_cache_image.c b/legacy/evas/src/lib/cache/evas_cache_image.c index 8d96964604..a8bafd764b 100644 --- a/legacy/evas/src/lib/cache/evas_cache_image.c +++ b/legacy/evas/src/lib/cache/evas_cache_image.c @@ -17,7 +17,6 @@ //#define CACHEDUMP 1 -#ifdef BUILD_ASYNC_PRELOAD typedef struct _Evas_Cache_Preload Evas_Cache_Preload; struct _Evas_Cache_Preload @@ -33,7 +32,6 @@ static int _evas_cache_mutex_init = 0; static Eina_Condition cond_wakeup; static void _evas_cache_image_entry_preload_remove(Image_Entry *ie, const void *target); -#endif #define FREESTRC(Var) \ if (Var) \ @@ -153,7 +151,6 @@ _evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry *ie) { if (!ie) return; if (cache->func.debug) cache->func.debug("deleting", ie); -#ifdef BUILD_ASYNC_PRELOAD if (ie->flags.delete_me == 1) return; 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); return; } -#endif _evas_cache_image_dirty_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; cache->func.surface_delete(ie); -#ifdef BUILD_ASYNC_PRELOAD LKD(ie->lock); LKD(ie->lock_cancel); -#endif cache->func.dealloc(ie); } @@ -244,10 +238,8 @@ _evas_cache_image_entry_new(Evas_Cache_Image *cache, if (tstamp) ie->tstamp = *tstamp; else memset(&ie->tstamp, 0, sizeof(Image_Timestamp)); -#ifdef BUILD_ASYNC_PRELOAD LKI(ie->lock); LKI(ie->lock_cancel); -#endif if (lo) ie->load_opts = *lo; if (ie->file) @@ -289,16 +281,11 @@ _evas_cache_image_entry_surface_alloc(Evas_Cache_Image *cache, { int wmin = w > 0 ? w : 1; int hmin = h > 0 ? h : 1; -#ifdef BUILD_ASYNC_PRELOAD LKL(engine_lock); -#endif _evas_cache_image_entry_surface_alloc__locked(cache, ie, wmin, hmin); -#ifdef BUILD_ASYNC_PRELOAD LKU(engine_lock); -#endif } -#ifdef BUILD_ASYNC_PRELOAD static void _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); } } -#endif EAPI int 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; -#ifdef BUILD_ASYNC_PRELOAD if (_evas_cache_mutex_init++ == 0) { LKI(engine_lock); LKI(wakeup); eina_condition_new(&cond_wakeup, &wakeup); } -#endif cache = calloc(1, sizeof(Evas_Cache_Image)); if (!cache) return NULL; @@ -525,7 +509,6 @@ evas_cache_image_shutdown(Evas_Cache_Image *cache) return; } -#ifdef BUILD_ASYNC_PRELOAD EINA_LIST_FREE(cache->preload, im) { /* 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_async_events_process(); -#endif while (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); } -#ifdef BUILD_ASYNC_PRELOAD /* Now wait for all pending image to die */ while (cache->pending) { @@ -570,19 +551,16 @@ evas_cache_image_shutdown(Evas_Cache_Image *cache) if (cache->pending) eina_condition_wait(&cond_wakeup); LKU(wakeup); } -#endif eina_hash_free(cache->activ); eina_hash_free(cache->inactiv); free(cache); -#ifdef BUILD_ASYNC_PRELOAD if (--_evas_cache_mutex_init == 0) { eina_condition_free(&cond_wakeup); LKD(engine_lock); LKD(wakeup); } -#endif } EAPI Image_Entry * @@ -774,14 +752,11 @@ evas_cache_image_drop(Image_Entry *im) if (references == 0) { -#ifdef BUILD_ASYNC_PRELOAD if (im->preload) { _evas_cache_image_entry_preload_remove(im, NULL); return; } -#endif - if (im->flags.dirty) { _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; if (!(im->flags.dirty)) { -#ifndef EVAS_CSERVE - int references; - references = im->references; - // if ref 1 also copy if using shared cache as its read-only - if (references == 1) im_dirty = im; - else -#endif - { - im_dirty = - evas_cache_image_copied_data(cache, im->w, im->h, - 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); - } + im_dirty = + evas_cache_image_copied_data(cache, im->w, im->h, + 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); } @@ -983,13 +949,10 @@ on_error: EAPI int evas_cache_image_load_data(Image_Entry *im) { -#ifdef BUILD_ASYNC_PRELOAD Eina_Bool preload = EINA_FALSE; -#endif int error = EVAS_LOAD_ERROR_NONE; if ((im->flags.loaded) && (!im->flags.animated)) return error; -#ifdef BUILD_ASYNC_PRELOAD if (im->preload) { preload = EINA_TRUE; @@ -1001,6 +964,7 @@ evas_cache_image_load_data(Image_Entry *im) evas_preload_thread_cancel(im->preload); } evas_async_events_process(); + LKL(wakeup); while (im->preload) { @@ -1013,14 +977,13 @@ evas_cache_image_load_data(Image_Entry *im) } if ((im->flags.loaded) && (!im->flags.animated)) return error; + LKL(im->lock); -#endif im->flags.in_progress = EINA_TRUE; error = im->cache->func.load(im); im->flags.in_progress = EINA_FALSE; -#ifdef BUILD_ASYNC_PRELOAD LKU(im->lock); -#endif + im->flags.loaded = 1; if (im->cache->func.debug) im->cache->func.debug("load", im); 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); im->flags.loaded = 0; } -#ifdef BUILD_ASYNC_PRELOAD if (preload) _evas_cache_image_async_end(im); -#endif return error; } @@ -1039,7 +1000,7 @@ evas_cache_image_unload_data(Image_Entry *im) { if (im->flags.in_progress) return; evas_cache_image_preload_cancel(im, NULL); -#ifdef BUILD_ASYNC_PRELOAD + LKL(im->lock_cancel); 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; } LKU(im->lock_cancel); -#endif + if ((!im->flags.loaded) || (!im->file) || (!im->info.module) || (im->flags.dirty)) { -#ifdef BUILD_ASYNC_PRELOAD LKU(im->lock); -#endif return; } im->cache->func.destructor(im); -#ifdef BUILD_ASYNC_PRELOAD LKU(im->lock); -#endif //FIXME: imagedataunload - inform owners } @@ -1092,7 +1049,6 @@ evas_cache_image_is_loaded(Image_Entry *im) EAPI void evas_cache_image_preload_data(Image_Entry *im, const void *target) { -#ifdef BUILD_ASYNC_PRELOAD RGBA_Image *img = (RGBA_Image *)im; 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; if (!_evas_cache_image_entry_preload_add(im, 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 evas_cache_image_preload_cancel(Image_Entry *im, const void *target) { -#ifdef BUILD_ASYNC_PRELOAD if (!target) return; _evas_cache_image_entry_preload_remove(im, target); -#else - (void)im; - (void)target; -#endif } #ifdef CACHEDUMP @@ -1242,8 +1189,6 @@ evas_cache_image_pixels(Image_Entry *im) EAPI void evas_cache_image_wakeup(void) { -#ifdef BUILD_ASYNC_PRELOAD if (_evas_cache_mutex_init > 0) eina_condition_broadcast(&cond_wakeup); -#endif } diff --git a/legacy/evas/src/lib/cache/evas_preload.c b/legacy/evas/src/lib/cache/evas_preload.c index 5eebaedc80..6909d5c9f6 100644 --- a/legacy/evas/src/lib/cache/evas_preload.c +++ b/legacy/evas/src/lib/cache/evas_preload.c @@ -1,24 +1,17 @@ #ifdef HAVE_CONFIG_H # include #endif - #ifdef HAVE_EVIL # include #endif - -#ifdef BUILD_ASYNC_PRELOAD -# include -# ifdef __linux__ +#include +#ifdef __linux__ # include -# endif #endif - #include "evas_common.h" #include "evas_private.h" #include "Evas.h" -#ifdef BUILD_ASYNC_PRELOAD - static int _threads_max = 0; 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); return pth; } -#endif void _evas_preload_thread_init(void) { -#ifdef BUILD_ASYNC_PRELOAD _threads_max = eina_cpu_count(); if (_threads_max < 1) _threads_max = 1; LKI(_mutex); -#endif } void _evas_preload_thread_shutdown(void) { /* FIXME: If function are still running in the background, should we kill them ? */ -#ifdef BUILD_ASYNC_PRELOAD Evas_Preload_Pthread_Worker *work; /* Force processing of async events. */ @@ -158,7 +147,6 @@ _evas_preload_thread_shutdown(void) LKU(_mutex); LKD(_mutex); -#endif } Evas_Preload_Pthread * @@ -167,7 +155,6 @@ evas_preload_thread_run(void (*func_heavy) (void *data), void (*func_cancel) (void *data), const void *data) { -#ifdef BUILD_ASYNC_PRELOAD Evas_Preload_Pthread_Worker *work; Evas_Preload_Pthread_Data *pth; @@ -220,22 +207,11 @@ evas_preload_thread_run(void (*func_heavy) (void *data), } LKU(_mutex); 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 evas_preload_thread_cancel(Evas_Preload_Pthread *thread) { -#ifdef BUILD_ASYNC_PRELOAD Evas_Preload_Pthread_Worker *work; if (!thread) return EINA_TRUE; @@ -259,8 +235,4 @@ evas_preload_thread_cancel(Evas_Preload_Pthread *thread) work = (Evas_Preload_Pthread_Worker *)thread; work->cancel = EINA_TRUE; return EINA_FALSE; -#else - (void) thread; - return EINA_TRUE; -#endif } diff --git a/legacy/evas/src/lib/canvas/Makefile.am b/legacy/evas/src/lib/canvas/Makefile.am index b5c27408b8..c9ac48a51a 100644 --- a/legacy/evas/src/lib/canvas/Makefile.am +++ b/legacy/evas/src/lib/canvas/Makefile.am @@ -16,7 +16,8 @@ AM_CPPFLAGS = \ @EVAS_GENERAL_CFLAGS@ \ @EVIL_CFLAGS@ \ @PIXMAN_CFLAGS@ \ -@FRIBIDI_CFLAGS@ +@FRIBIDI_CFLAGS@ \ +@LINEBREAK_CFLAGS@ noinst_LTLIBRARIES = libevas_canvas.la libevas_canvas_la_SOURCES = \ @@ -60,14 +61,7 @@ evas_touch_point.c \ evas_map.c \ evas_gl.c -#evas_object_textgrid.c - -libevas_canvas_la_LIBADD = @EVAS_LIBS@ @EVIL_LIBS@ - -if EVAS_USE_LINEBREAK -AM_CPPFLAGS += @LINEBREAK_CFLAGS@ -libevas_canvas_la_LIBADD += @LINEBREAK_LIBS@ -endif +libevas_canvas_la_LIBADD = @EVAS_LIBS@ @EVIL_LIBS@ @LINEBREAK_LIBS@ clean-local: rm -rf *.gcno diff --git a/legacy/evas/src/lib/canvas/evas_async_events.c b/legacy/evas/src/lib/canvas/evas_async_events.c index 1002d3d53b..c8f114e484 100644 --- a/legacy/evas/src/lib/canvas/evas_async_events.c +++ b/legacy/evas/src/lib/canvas/evas_async_events.c @@ -2,21 +2,15 @@ # include #endif -#ifdef BUILD_ASYNC_EVENTS - -# ifndef _MSC_VER -# include -# endif -# include -# include - +#ifndef _MSC_VER +# include #endif +#include +#include #include "evas_common.h" #include "evas_private.h" -#ifdef BUILD_ASYNC_EVENTS - static int _fd_write = -1; static int _fd_read = -1; 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(); } -#endif - EAPI int evas_async_events_fd_get(void) { -#ifdef BUILD_ASYNC_EVENTS _evas_async_events_fork_handle(); return _fd_read; -#else - return -1; -#endif } EAPI int evas_async_events_process(void) { -#ifdef BUILD_ASYNC_EVENTS Evas_Event_Async *ev; int check; int count = 0; @@ -134,15 +121,11 @@ evas_async_events_process(void) } return count; -#else - return 0; -#endif } EAPI Eina_Bool 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; ssize_t check; 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; -#else - func((void*) target, type, event_info); - return EINA_TRUE; -#endif } diff --git a/legacy/evas/src/lib/canvas/evas_main.c b/legacy/evas/src/lib/canvas/evas_main.c index b8d12662a3..9fc8aab0a3 100644 --- a/legacy/evas/src/lib/canvas/evas_main.c +++ b/legacy/evas/src/lib/canvas/evas_main.c @@ -51,27 +51,18 @@ evas_init(void) } evas_module_init(); -#ifdef BUILD_ASYNC_EVENTS if (!evas_async_events_init()) goto shutdown_module; -#endif -#ifdef EVAS_CSERVE - if (getenv("EVAS_CSERVE")) evas_cserve_init(); -#endif #ifdef EVAS_CSERVE2 if (getenv("EVAS_CSERVE2")) evas_cserve2_init(); #endif -#ifdef BUILD_ASYNC_PRELOAD _evas_preload_thread_init(); -#endif return _evas_init_count; -#ifdef BUILD_ASYNC_EVENTS shutdown_module: evas_module_shutdown(); eina_log_domain_unregister(_evas_log_dom_global); -#endif shutdown_eina: eina_shutdown(); shutdown_evil: @@ -93,15 +84,8 @@ evas_shutdown(void) if (--_evas_init_count != 0) return _evas_init_count; -#ifdef BUILD_ASYNC_EVENTS _evas_preload_thread_shutdown(); -#endif -#ifdef EVAS_CSERVE - if (getenv("EVAS_CSERVE")) evas_cserve_shutdown(); -#endif -#ifdef BUILD_ASYNC_EVENTS evas_async_events_shutdown(); -#endif evas_font_dir_cache_free(); evas_common_shutdown(); evas_module_shutdown(); diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c index f8a59bda57..638692aa59 100644 --- a/legacy/evas/src/lib/canvas/evas_object_textblock.c +++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c @@ -71,10 +71,8 @@ EAPI Eo_Op EVAS_OBJ_TEXTBLOCK_BASE_ID = EO_NOOP; #define MY_CLASS EVAS_OBJ_TEXTBLOCK_CLASS -#ifdef HAVE_LINEBREAK #include "linebreak.h" #include "wordbreak.h" -#endif /* save typing */ #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 */ -#ifdef HAVE_LINEBREAK - /* Allow break means: if we can break after the current char */ #define ALLOW_BREAK(i) \ (breaks[i] <= LINEBREAK_ALLOWBREAK) -#else - -#define ALLOW_BREAK(i) \ - (_is_white(str[i])) - -#endif static int _layout_get_word_mixwrap_common(Ctxt *c, Evas_Object_Textblock_Format *fmt, 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); int item_start = it->text_pos; 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; @@ -3754,7 +3740,6 @@ _layout_par(Ctxt *c) 1 : _ITEM_TEXT(it)->text_props.text_len; -#ifdef HAVE_LINEBREAK /* If we haven't calculated the linebreaks yet, * do */ if (!line_breaks) @@ -3775,7 +3760,6 @@ _layout_par(Ctxt *c) len, lang, line_breaks); } } -#endif if (c->ln->items) line_start = c->ln->items->text_pos; else @@ -3912,10 +3896,8 @@ _layout_par(Ctxt *c) } end: -#ifdef HAVE_LINEBREAK if (line_breaks) free(line_breaks); -#endif return ret; } @@ -6323,44 +6305,29 @@ evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur) return EINA_FALSE; } -#ifdef HAVE_LINEBREAK - /* BREAK_AFTER: true if we can break after the current char. * Both macros assume str[i] is not the terminating nul */ #define BREAK_AFTER(i) \ (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 evas_textblock_cursor_word_start(Evas_Textblock_Cursor *cur) { const Eina_Unicode *text; size_t i; -#ifdef HAVE_LINEBREAK char *breaks; -#endif if (!cur) return EINA_FALSE; TB_NULL_CHECK(cur->node, EINA_FALSE); text = eina_ustrbuf_string_get(cur->node->unicode); -#ifdef HAVE_LINEBREAK { const char *lang = ""; /* FIXME: get lang */ size_t len = eina_ustrbuf_length_get(cur->node->unicode); breaks = malloc(len); set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks); } -#endif i = cur->pos; @@ -6374,9 +6341,7 @@ evas_textblock_cursor_word_start(Evas_Textblock_Cursor *cur) cur->pos = i; -#ifdef HAVE_LINEBREAK free(breaks); -#endif return EINA_TRUE; } @@ -6385,23 +6350,19 @@ evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur) { const Eina_Unicode *text; size_t i; -#ifdef HAVE_LINEBREAK char *breaks; -#endif if (!cur) return EINA_FALSE; TB_NULL_CHECK(cur->node, EINA_FALSE); text = eina_ustrbuf_string_get(cur->node->unicode); -#ifdef HAVE_LINEBREAK { const char *lang = ""; /* FIXME: get lang */ size_t len = eina_ustrbuf_length_get(cur->node->unicode); breaks = malloc(len); set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks); } -#endif i = cur->pos; @@ -6416,9 +6377,7 @@ evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur) cur->pos = i; -#ifdef HAVE_LINEBREAK free(breaks); -#endif 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_Textblock *o = eo_data_get(eo_obj, MY_CLASS); -#ifdef HAVE_LINEBREAK static Eina_Bool linebreak_init = EINA_FALSE; if (!linebreak_init) { @@ -9579,7 +9537,6 @@ evas_object_textblock_init(Evas_Object *eo_obj) init_linebreak(); init_wordbreak(); } -#endif /* set up default settings for this kind of object */ obj->cur.color.r = 255; diff --git a/legacy/evas/src/lib/canvas/evas_stats.c b/legacy/evas/src/lib/canvas/evas_stats.c index cdb4ece7ed..3e057d06f0 100644 --- a/legacy/evas/src/lib/canvas/evas_stats.c +++ b/legacy/evas/src/lib/canvas/evas_stats.c @@ -5,181 +5,45 @@ EAPI Eina_Bool evas_cserve_want_get(void) { -#ifdef EVAS_CSERVE - return evas_cserve_use_get(); -#endif return 0; } EAPI Eina_Bool evas_cserve_connected_get(void) { -#ifdef EVAS_CSERVE - return evas_cserve_have_get(); -#endif return 0; } 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; -#endif } 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; -#endif } 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 -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; -#endif } 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; -#endif } EAPI void evas_cserve_disconnect(void) { -#ifdef EVAS_CSERVE - evas_cserve_discon(); -#endif } diff --git a/legacy/evas/src/lib/engines/common/evas_convert_gry_1.c b/legacy/evas/src/lib/engines/common/evas_convert_gry_1.c index be7128071b..1899fb278c 100644 --- a/legacy/evas/src/lib/engines/common/evas_convert_gry_1.c +++ b/legacy/evas/src/lib/engines/common/evas_convert_gry_1.c @@ -1,4 +1,6 @@ #include "evas_common.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__) +{ +} diff --git a/legacy/evas/src/lib/engines/common/evas_font_private.h b/legacy/evas/src/lib/engines/common/evas_font_private.h index bbc4675bf5..904a01e4bf 100644 --- a/legacy/evas/src/lib/engines/common/evas_font_private.h +++ b/legacy/evas/src/lib/engines/common/evas_font_private.h @@ -2,7 +2,6 @@ # define _EVAS_FONT_PRIVATE_H #include "evas_font_ot.h" -#ifdef BUILD_PTHREAD extern LK(lock_font_draw); // for freetype2 API calls extern LK(lock_bidi); // for fribidi API calls extern LK(lock_ot); // for harfbuzz calls @@ -15,17 +14,6 @@ extern LK(lock_ot); // for harfbuzz calls /* Macros for text walking */ # define OTLOCK() LKL(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_reload(RGBA_Font_Source *fs); diff --git a/legacy/evas/src/lib/engines/common/evas_image_data.c b/legacy/evas/src/lib/engines/common/evas_image_data.c index 2815ff8dfb..ca09d1e8cc 100644 --- a/legacy/evas/src/lib/engines/common/evas_image_data.c +++ b/legacy/evas/src/lib/engines/common/evas_image_data.c @@ -124,9 +124,7 @@ evas_common_rgba_image_colorspace_set(Image_Entry* ie_dst, int cspace) { ie_dst->allocated.w = 0; ie_dst->allocated.h = 0; -#ifdef BUILD_ASYNC_PRELOAD ie_dst->flags.preload_done = 0; -#endif ie_dst->flags.loaded = 0; dst->image.data = NULL; dst->image.no_free = 0; diff --git a/legacy/evas/src/lib/engines/common/evas_image_load.c b/legacy/evas/src/lib/engines/common/evas_image_load.c index 489cbb0660..0c39495f8a 100644 --- a/legacy/evas/src/lib/engines/common/evas_image_load.c +++ b/legacy/evas/src/lib/engines/common/evas_image_load.c @@ -172,21 +172,6 @@ evas_common_load_rgba_image_module_from_file(Image_Entry *ie) int len, ret = EVAS_LOAD_ERROR_NONE; 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 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; -#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 if (ie->data1) { diff --git a/legacy/evas/src/lib/engines/common/evas_image_main.c b/legacy/evas/src/lib/engines/common/evas_image_main.c index e47cc9646c..62e6a361bd 100644 --- a/legacy/evas/src/lib/engines/common/evas_image_main.c +++ b/legacy/evas/src/lib/engines/common/evas_image_main.c @@ -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 * that something else is overwritign this struct - or not */ // memset(im, 0x99, sizeof(im)); -#ifdef EVAS_CSERVE - if (ie->data1) evas_cserve_image_free(ie); -#endif #ifdef EVAS_CSERVE2 if (ie->data1) 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; -#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 if (ie->data1) { @@ -315,9 +297,7 @@ evas_common_rgba_image_unload(Image_Entry *ie) // ie->allocated.w = 0; // ie->allocated.h = 0; // ie->flags.loaded = 0; -#ifdef BUILD_ASYNC_PRELOAD ie->flags.preload_done = 0; -#endif return; } #endif @@ -333,9 +313,7 @@ evas_common_rgba_image_unload(Image_Entry *ie) ie->allocated.w = 0; ie->allocated.h = 0; ie->flags.loaded = 0; -#ifdef BUILD_ASYNC_PRELOAD ie->flags.preload_done = 0; -#endif #ifdef SURFDBG surf_debug(); #endif @@ -387,9 +365,6 @@ _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned RGBA_Image *im = (RGBA_Image *) ie; size_t siz = 0; -#ifdef EVAS_CSERVE - if (ie->data1) return 0; -#endif #ifdef EVAS_CSERVE2 if (ie->data1) return 0; #endif @@ -466,10 +441,6 @@ _evas_common_rgba_image_surface_delete(Image_Entry *ie) surfs = eina_list_remove(surfs, ie); #endif } -#ifdef EVAS_CSERVE - else if (ie->data1) - evas_cserve_image_free(ie); -#endif // #ifdef EVAS_CSERVE2 // else if (ie->data1) // 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; ie->allocated.w = 0; ie->allocated.h = 0; -#ifdef BUILD_ASYNC_PRELOAD ie->flags.preload_done = 0; -#endif ie->flags.loaded = 0; evas_common_rgba_image_scalecache_dirty(&im->cache_entry); #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; -#ifdef EVAS_CSERVE - if (ie->data1) evas_cserve_image_free(ie); -#endif #ifdef EVAS_CSERVE2 // if (ie->data1) evas_cserve2_image_free(ie); 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, 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 // 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."); @@ -536,12 +499,9 @@ _evas_common_rgba_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src) return 1; } -#ifdef EVAS_CSERVE - if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src); -#endif #ifdef EVAS_CSERVE2 - // 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) evas_cserve2_image_free((Image_Entry*) ie_src); + if (ie_src->data1) ERR("Shouldn't reach this point since we are using cache2."); #endif evas_common_image_colorspace_normalize(src); evas_common_image_colorspace_normalize(dst); @@ -563,9 +523,7 @@ _evas_common_rgba_image_ram_usage(Image_Entry *ie) if (im->image.data) { -#if defined(EVAS_CSERVE) - if ((!im->image.no_free) || (ie->data1)) -#elif defined(EVAS_CSERVE2) +#ifdef EVAS_CSERVE2 if ((!im->image.no_free) || (ie->data1)) #else if ((!im->image.no_free)) @@ -715,9 +673,6 @@ evas_common_image_colorspace_normalize(RGBA_Image *im) case EVAS_COLORSPACE_ARGB8888: 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 // 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."); diff --git a/legacy/evas/src/lib/engines/common/evas_pipe.c b/legacy/evas/src/lib/engines/common/evas_pipe.c index 1cba912606..6803154246 100644 --- a/legacy/evas/src/lib/engines/common/evas_pipe.c +++ b/legacy/evas/src/lib/engines/common/evas_pipe.c @@ -1,9 +1,12 @@ #include "evas_common.h" #include +#include +#ifdef HAVE_PTHREAD_AFFINITY +#include +#endif #ifdef BUILD_PIPE_RENDER -# ifdef BUILD_PTHREAD typedef struct _Thinfo { RGBA_Image *im; @@ -14,7 +17,6 @@ typedef struct _Thinfo Eina_Array cutout_trash; Eina_Array rects_task; } Thinfo; -#endif 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); @@ -71,7 +73,6 @@ evas_common_pipe_op_free(RGBA_Pipe_Op *op) evas_common_draw_context_apply_clean_cutouts(&op->context.cutout); } -#ifdef BUILD_PTHREAD /* main api calls */ static void * evas_common_pipe_thread(void *data) @@ -109,9 +110,7 @@ evas_common_pipe_thread(void *data) } return NULL; } -#endif -#ifdef BUILD_PTHREAD static Eina_List *im_task = NULL; static Eina_List *text_task = NULL; static Thinfo task_thinfo[TH_MAX]; @@ -164,13 +163,10 @@ evas_pipe_prepare_push(RGBA_Pipe_Op *op) current++; } -#endif - static void evas_common_pipe_begin(RGBA_Image *im) { #define SZ 128 -#ifdef BUILD_PTHREAD unsigned int x, y, cpu; RGBA_Pipe_Thread_Info *info; unsigned int estimatex, estimatey; @@ -217,21 +213,18 @@ evas_common_pipe_begin(RGBA_Image *im) /* tell worker threads to start */ pthread_barrier_wait(&(thbarrier[0])); -#endif } EAPI void evas_common_pipe_flush(RGBA_Image *im) { if (!im->cache_entry.pipe) return; -#ifdef BUILD_PTHREAD if (thread_num > 1) { /* sync worker threads */ pthread_barrier_wait(&(thbarrier[1])); } else -#endif { RGBA_Pipe_Thread_Info info; RGBA_Pipe *p; @@ -698,7 +691,6 @@ evas_common_pipe_map_render(RGBA_Image *root) evas_common_pipe_flush(root); } -#ifdef BUILD_PTHREAD static void* evas_common_pipe_load(void *data) { @@ -765,14 +757,12 @@ evas_common_pipe_load(void *data) return NULL; } -#endif static volatile int bval = 0; static void evas_common_pipe_load_do(RGBA_Image *im) { -#ifdef BUILD_PTHREAD int i; for (i = 0; i < thread_num; i++) @@ -783,7 +773,6 @@ evas_common_pipe_load_do(RGBA_Image *im) /* sync worker threads */ pthread_barrier_wait(&(task_thbarrier[1])); -#endif } EAPI void @@ -884,12 +873,16 @@ evas_common_pipe_init(void) for (i = 0; i < thread_num; i++) { pthread_attr_t attr; +#ifdef HAVE_PTHREAD_AFFINITY cpu_set_t cpu; - +#endif + pthread_attr_init(&attr); +#ifdef HAVE_PTHREAD_AFFINITY CPU_ZERO(&cpu); CPU_SET(i % cpunum, &cpu); pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu); +#endif thinfo[i].thread_num = i; thinfo[i].tasks = NULL; thinfo[i].barrier = thbarrier; @@ -904,12 +897,16 @@ evas_common_pipe_init(void) for (i = 0; i < thread_num; i++) { pthread_attr_t attr; +#ifdef HAVE_PTHREAD_AFFINITY cpu_set_t cpu; - - pthread_attr_init(&attr); +#endif + + pthread_attr_init(&attr); +#ifdef HAVE_PTHREAD_AFFINITY CPU_ZERO(&cpu); CPU_SET(i % cpunum, &cpu); pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu); +#endif task_thinfo[i].thread_num = i; task_thinfo[i].tasks = NULL; task_thinfo[i].barrier = task_thbarrier; diff --git a/legacy/evas/src/lib/file/evas_module.c b/legacy/evas/src/lib/file/evas_module.c index 52421adbd7..de20035374 100644 --- a/legacy/evas/src/lib/file/evas_module.c +++ b/legacy/evas/src/lib/file/evas_module.c @@ -446,9 +446,7 @@ evas_module_load(Evas_Module *em) if (!em->definition->func.open(em)) return 0; em->loaded = 1; -#ifdef BUILD_ASYNC_PRELOAD LKI(em->lock); -#endif return 1; } @@ -464,33 +462,23 @@ evas_module_unload(Evas_Module *em) // em->definition->func.close(em); // em->loaded = 0; -#ifdef BUILD_ASYNC_PRELOAD LKD(em->lock); -#endif } void evas_module_ref(Evas_Module *em) { -#ifdef BUILD_ASYNC_PRELOAD LKL(em->lock); -#endif em->ref++; -#ifdef BUILD_ASYNC_PRELOAD LKU(em->lock); -#endif } void evas_module_unref(Evas_Module *em) { -#ifdef BUILD_ASYNC_PRELOAD LKL(em->lock); -#endif em->ref--; -#ifdef BUILD_ASYNC_PRELOAD LKU(em->lock); -#endif } static int use_count = 0; diff --git a/legacy/evas/src/lib/include/evas_common.h b/legacy/evas/src/lib/include/evas_common.h index 838870f6d8..85a455d93e 100644 --- a/legacy/evas/src/lib/include/evas_common.h +++ b/legacy/evas/src/lib/include/evas_common.h @@ -173,14 +173,6 @@ extern EAPI int _evas_log_dom_global; # define __ARM_ARCH__ 73 #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 LKI(x) eina_lock_new(&(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 RWLKU(x) eina_rwlock_release(&(x)) -#ifdef BUILD_PTHREAD - # define TH(x) pthread_t x # define THI(x) int x # define TH_MAX 8 -#else -# define TH(x) -# define THI(x) -# define TH_MAX 0 - -#endif - #include #include FT_FREETYPE_H #include FT_GLYPH_H @@ -535,11 +518,10 @@ struct _Image_Entry_Flags Eina_Bool lru : 1; Eina_Bool alpha_sparse : 1; -#ifdef BUILD_ASYNC_PRELOAD Eina_Bool preload_done : 1; Eina_Bool delete_me : 1; + Eina_Bool pending : 1; -#endif Eina_Bool animated : 1; Eina_Bool rotated : 1; }; @@ -613,11 +595,9 @@ struct _Image_Entry void *loader; } info; -#ifdef BUILD_ASYNC_PRELOAD LK(lock); LK(lock_cancel); Eina_Bool unload_cancel : 1; -#endif Image_Entry_Flags flags; Evas_Image_Scale_Hint scale_hint; diff --git a/legacy/evas/src/static_deps/Makefile.am b/legacy/evas/src/static_deps/Makefile.am index 08a0f5ba3d..5222db440b 100644 --- a/legacy/evas/src/static_deps/Makefile.am +++ b/legacy/evas/src/static_deps/Makefile.am @@ -1,7 +1,3 @@ MAINTAINERCLEANFILES = Makefile.in -SUBDIRS = - -if EVAS_USE_LINEBREAK -SUBDIRS += liblinebreak -endif +SUBDIRS = liblinebreak