From: Shinwoo Kim Date: Tue, 29 Mar 2011 14:36:30 +0000 (+0900) Subject: Rollback to 19a13662bc08e5b0be6cee6b40d4c05e33bc3475 X-Git-Tag: accepted/2.0/20130306.225542~362 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a68c423e3df42803b27ed84c6a070b5c03e13e8;p=profile%2Fivi%2Fevas.git Rollback to 19a13662bc08e5b0be6cee6b40d4c05e33bc3475 --- diff --git a/AUTHORS b/AUTHORS index 75b5960..d9c7f7b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -18,7 +18,5 @@ Tom Hacohen Mathieu Taillefumier Iván Briano Gustavo Lima Chaves -Samsung Electronics +Saumsung Electronics Samsung SAIT -Sung W. Park -Jiyoun Park diff --git a/ChangeLog b/ChangeLog index 73dbbbc..3e796e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -135,65 +135,3 @@ 2011-02-27 Vincent Torri * Fixed static linking of the bmp, wbmp and tga loaders - -2011-03-07 Mike Blumenkrantz - - * Fix segv when trying to set gl viewpoint with NULL ctx - -2011-03-08 Carsten Haitzler (The Rasterman) - - * Fix problem with different x vsync api between SGI and EXT flavor - as they have the same base name, but different prototypes - * Add evas_object_ref() and evas_object_unref() to defer - deletion of objects until all references are removed - -2011-03-09 Carsten Haitzler (The Rasterman) - - * Fix bug with evas_object_del() calling DEL callback BEFORE - the HIDE one. - -2011-03-10 Sung W. Park - - * Fix bug with yinvert handling of native surfaces. - -2011-03-10 Carsten Haitzler (The Rasterman) - - * Fix issue with loading alpha BMP's with "check if all pixel alpha - are 0 or not and then force alpha off if all are 0". This - means you can never have a 100% empty/transparent BMP though - in 32bpp mode. - -2011-03-11 Carsten Haitzler (The Rasterman) - - * Add ICO loader to evas (also can load CUR cursor files in theory) - -2011-03-14 Carsten Haitzler (The Rasterman) - - * Add "load from memory" API: evas_object_image_memfile_set() by - popular demand. Can load an image format from a memory address. - -2011-03-15 Cedric BAIL - - * Fix issues with clipping and map. - -2011-03-18 Jiyoun Park - - * Fix wrong call to free when using mempool for Evas_Object. - -2011-03-19 Carsten Haitzler (The Rasterman) - - * Caching and timestamp checker for image files made much more - pedantic and it checks not just modified timestamp but also - inode number, size, and on linux, the nanonsecond resolution - timestamp as well. - -2011-03-19 Brett Nash (nash) - - * Proxy: Bypass the clip on smart clipped objects. This is probably - what you want if you are using proxies, as it means clips don't cause - the object to be invisible by the proxy. - -2011-03-22 Gustavo Sverzut Barbieri (k-s) - - * Fix build of GL and static modules. - * Fix ico loader static build. diff --git a/README.in b/README.in index bfcfaba..29a581d 100644 --- a/README.in +++ b/README.in @@ -1,4 +1,4 @@ -Evas @VERSION@ +Evas @VERSION@ BETA ****************************************************************************** @@ -799,8 +799,7 @@ draw large runs effectively. However it is useless on GL and similar back-ends as the cost in sending a word sized texture kills the performance gain (and GL is -pretty good at drawing lots of small things anyway). If it detects a GL -backend is in use, it disables itself. +pretty good at drawing lots of small things anyway). By default words (strings) of more then 50 characters are not cached. The system caches 40 words by default, but this can be changed by @@ -821,15 +820,14 @@ Metric caching saves character metrics between characters in words. This enables it to render words much quicker as it avoids things like space calculations and kerning calculation. -The cache size is also controlled by EVAS_WORD_CACHE_MAX_WORDS. +The cache size is also controlled by EVAS_WORD_CACHE_MAX_WORDS It is useful for GL in particular, although software engines do get some gain. -Generally it is recommended you enable one or both of word or metric caching, -depending on your engine use. If you are only using software, enable word +Generally it is recommended you enable either word or metric caching, +depending on your engine use. If you are using software, enable word caching (and neon on arm if you can), for GL, turn on metric caching. -A simple solution is enable both, and let the engine sort it out at run time. If you have any issues with metric caching, please report them to either the e-devel mailing list or Brett Nash diff --git a/configure.ac b/configure.ac index 72342ca..d986ce2 100644 --- a/configure.ac +++ b/configure.ac @@ -126,7 +126,6 @@ want_evas_image_loader_xpm="yes" want_evas_image_loader_bmp="yes" want_evas_image_loader_tga="yes" want_evas_image_loader_wbmp="yes" -want_evas_image_loader_ico="yes" want_evas_font_loader_eet="yes" @@ -633,17 +632,13 @@ EVAS_CHECK_ENGINE([software-16-wince], [${want_evas_engine_software_16_wince}], # common gl have_evas_engine_gl_common="no" -have_static_evas_engine_gl_common="no" if test "x$have_evas_engine_gl_x11" = "xyes" \ + || test "x$have_evas_engine_gl_x11" = "xstatic" \ || test "x$have_evas_engine_gl_glew" = "xyes" \ - || test "x$have_evas_engine_gl_sdl" = "xyes"; then - have_evas_engine_gl_common="yes" -fi -if test "x$have_evas_engine_gl_x11" = "xstatic" \ || test "x$have_evas_engine_gl_glew" = "xstatic" \ + || test "x$have_evas_engine_gl_sdl" = "xyes" \ || test "x$have_evas_engine_gl_sdl" = "xstatic"; then have_evas_engine_gl_common="yes" - have_static_evas_engine_gl_common="yes" fi if test "x$have_evas_engine_gl_common" = "xyes"; then @@ -655,11 +650,6 @@ AC_SUBST([evas_engine_gl_common_libs]) AM_CONDITIONAL(BUILD_ENGINE_GL_COMMON, [test "x$have_evas_engine_gl_common" = "xyes"]) -AM_CONDITIONAL(EVAS_STATIC_BUILD_GL_COMMON, test "x${have_static_evas_engine_gl_common}" = "xyes") -if test "x${have_static_evas_engine_gl_common}" = "xyes"; then - AC_DEFINE(EVAS_STATIC_BUILD_GL_COMMON, [1], [Build GL generic engine as part of libevas]) -fi - # gl_sdl if test "x$have_evas_engine_gl_sdl" = "xyes" || test "x$have_evas_engine_gl_sdl" = "xstatic" ; then AC_CHECK_DECL(SDL_GL_CONTEXT_MAJOR_VERSION, @@ -696,11 +686,6 @@ AC_ARG_ENABLE([static-software-generic], AC_MSG_CHECKING([Whether to build software generic engine as part of libevas]) AC_MSG_RESULT([${have_static_software_generic}]) -if test "x${have_static_module}" = "xyes" -a "x${have_static_software_generic}" = "xno"; then - AC_MSG_WARN([Forcing --enable-static-software-generic as engines must be compiled statically]) - have_static_software_generic="yes" -fi - AM_CONDITIONAL(EVAS_STATIC_BUILD_SOFTWARE_GENERIC, test "x${have_static_software_generic}" = "xyes") if test "x${have_static_software_generic}" = "xyes"; then AC_DEFINE(EVAS_STATIC_BUILD_SOFTWARE_GENERIC, [1], [Build software generic engine as part of libevas]) @@ -835,7 +820,6 @@ EVAS_CHECK_IMAGE_LOADER([TGA], [${want_evas_image_loader_tga}]) EVAS_CHECK_IMAGE_LOADER([WBMP], [${want_evas_image_loader_wbmp}]) -EVAS_CHECK_IMAGE_LOADER([ICO], [${want_evas_image_loader_ico}]) ##################################################################### ## Cpu based optimizations @@ -1611,7 +1595,6 @@ src/modules/loaders/png/Makefile src/modules/loaders/tiff/Makefile src/modules/loaders/xpm/Makefile src/modules/loaders/bmp/Makefile -src/modules/loaders/ico/Makefile src/modules/loaders/tga/Makefile src/modules/loaders/svg/Makefile src/modules/loaders/pmaps/Makefile @@ -1707,19 +1690,18 @@ echo " Software 16bit WinCE.......: $have_evas_engine_software_16_wince" echo " Software 16bit SDL.........: $have_evas_engine_software_sdl (primitive: $sdl_primitive)" echo echo "Image Loaders:" -echo " BMP.....................: $have_evas_image_loader_bmp" echo " EDB.....................: $have_evas_image_loader_edb" echo " EET.....................: $have_evas_image_loader_eet" echo " GIF.....................: $have_evas_image_loader_gif" -echo " ICO.....................: $have_evas_image_loader_ico" echo " JPEG....................: $have_evas_image_loader_jpeg (region: $have_jpeg_region)" echo " PMAPS...................: $have_evas_image_loader_pmaps" echo " PNG.....................: $have_evas_image_loader_png" echo " SVG.....................: $have_evas_image_loader_svg" -echo " TGA.....................: $have_evas_image_loader_tga" echo " TIFF....................: $have_evas_image_loader_tiff" -echo " WBMP....................: $have_evas_image_loader_wbmp" echo " XPM.....................: $have_evas_image_loader_xpm" +echo " BMP.....................: $have_evas_image_loader_bmp" +echo " TGA.....................: $have_evas_image_loader_tga" +echo " WBMP....................: $have_evas_image_loader_wbmp" echo echo "Font Sourcing Systems:" echo " EET.....................: $have_evas_font_loader_eet" @@ -1821,8 +1803,8 @@ echo " prefix...............: $prefix" echo if test "x${have_static_module}" = "xyes" ; then echo -e "\0033\01331;31mWarning\0033\01331;0m: You are trying to link statically one or more modules to Evas." -echo " You must know what you are doing, or else you will have a lot of" -echo " problems. And Kenny will be killed." +echo " You must know what you are doing, or else you will have a lot of problems." +echo " And Kenny will be killed." echo " Think about that." echo fi diff --git a/doc/evas.dox.in b/doc/evas.dox.in index 2721361..9ec03a0 100644 --- a/doc/evas.dox.in +++ b/doc/evas.dox.in @@ -27,8 +27,6 @@ @author Gustavo Lima Chaves @author Samsung Electronics @author Samsung SAIT -@author Sung W. Park -@author Jiyoun Park @date 2000-2011 @section toc Table of Contents diff --git a/evas.spec.in b/evas.spec.in index ff110f1..58d59bf 100644 --- a/evas.spec.in +++ b/evas.spec.in @@ -44,7 +44,6 @@ %bcond_without module_saver_eet %bcond_without module_loader_xpm %bcond_without module_loader_bmp -%bcond_without module_loader_wbmp %bcond_without module_loader_tga # This just keeps a missing doxygen from killing the build. @@ -61,7 +60,6 @@ %define ac_with_module_loader_xpm --%{?with_module_loader_xpm:en}%{!?with_module_loader_xpm:dis}able-image-loader-xpm %define ac_with_module_loader_svg --%{?with_module_loader_svg:en}%{!?with_module_loader_svg:dis}able-image-loader-svg %define ac_with_module_loader_bmp --%{?with_module_loader_bmp:en}%{!?with_module_loader_bmp:dis}able-image-loader-bmp -%define ac_with_module_loader_wbmp --%{?with_module_loader_wbmp:en}%{!?with_module_loader_wbmp:dis}able-image-loader-wbmp %define ac_with_module_loader_tga --%{?with_module_loader_tga:en}%{!?with_module_loader_tga:dis}able-image-loader-tga %define ac_with_module_saver_eet --%{?with_module_saver_eet:en}%{!?with_module_saver_eet:dis}able-image-saver-eet %define ac_with_module_saver_jpeg --%{?with_module_saver_jpeg:en}%{!?with_module_saver_jpeg:dis}able-image-saver-jpeg @@ -249,15 +247,6 @@ BuildRequires: libjpeg-devel BMP Image loader module for Evas %endif -%if %{with module_loader_wbmp} -%package module_loader_wbmp -Summary: WBMP Image loader module for Evas -Group: System Environment/Libraries -BuildRequires: libjpeg-devel -%description module_loader_wbmp -WBMP Image loader module for Evas -%endif - %if %{with module_loader_tga} %package module_loader_tga Summary: TGA Image loader module for Evas @@ -558,12 +547,6 @@ test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT %{_libdir}/evas/modules/loaders/bmp/*/module.so %endif -%if %{with module_loader_wbmp} -%files module_loader_wbmp -%defattr(-, root, root) -%{_libdir}/evas/modules/loaders/wbmp/*/module.so -%endif - %if %{with module_loader_tga} %files module_loader_tga %defattr(-, root, root) diff --git a/m4/evas_check_loader.m4 b/m4/evas_check_loader.m4 index 17685e4..00a9618 100644 --- a/m4/evas_check_loader.m4 +++ b/m4/evas_check_loader.m4 @@ -328,26 +328,6 @@ fi ]) -dnl use: EVAS_CHECK_LOADER_DEP_ICO(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) - -AC_DEFUN([EVAS_CHECK_LOADER_DEP_ICO], -[ - -have_dep="yes" -evas_image_loader_[]$1[]_cflags="" -evas_image_loader_[]$1[]_libs="" - -AC_SUBST([evas_image_loader_$1_cflags]) -AC_SUBST([evas_image_loader_$1_libs]) - -if test "x${have_dep}" = "xyes" ; then - m4_default([$3], [:]) -else - m4_default([$4], [:]) -fi - -]) - dnl use: EVAS_CHECK_LOADER_DEP_TGA(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) AC_DEFUN([EVAS_CHECK_LOADER_DEP_TGA], diff --git a/src/lib/Evas.h b/src/lib/Evas.h index 4c26a95..d9fd805 100644 --- a/src/lib/Evas.h +++ b/src/lib/Evas.h @@ -898,9 +898,6 @@ typedef void (*Evas_Async_Events_Put_Cb)(void *target, Evas_Callback_Type t EAPI void evas_object_name_set (Evas_Object *obj, const char *name) EINA_ARG_NONNULL(1); EAPI const char *evas_object_name_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; - EAPI void evas_object_ref (Evas_Object *obj); - EAPI void evas_object_unref (Evas_Object *obj); - EAPI void evas_object_del (Evas_Object *obj) EINA_ARG_NONNULL(1); EAPI void evas_object_move (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); EAPI void evas_object_resize (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); @@ -1245,7 +1242,6 @@ typedef void (*Evas_Object_Image_Pixels_Get_Cb) (void *data, Evas_Object *o); EAPI Evas_Object *evas_object_image_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; EAPI Evas_Object *evas_object_image_filled_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; - EAPI void evas_object_image_memfile_set (Evas_Object *obj, void *data, int size, char *format, char *key) EINA_ARG_NONNULL(1, 2); EAPI void evas_object_image_file_set (Evas_Object *obj, const char *file, const char *key) EINA_ARG_NONNULL(1); EAPI void evas_object_image_file_get (const Evas_Object *obj, const char **file, const char **key) EINA_ARG_NONNULL(1, 2); EAPI void evas_object_image_border_set (Evas_Object *obj, int l, int r, int t, int b) EINA_ARG_NONNULL(1); diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index be84a2b..382e26e 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -133,11 +133,6 @@ SUBDIRS += ../modules/loaders/gif EVAS_STATIC_MODULE += ../modules/loaders/gif/libevas_loader_gif.la EVAS_STATIC_LIBADD += @evas_image_loader_gif_libs@ endif -if EVAS_STATIC_BUILD_ICO -SUBDIRS += ../modules/loaders/ico -EVAS_STATIC_MODULE += ../modules/loaders/ico/libevas_loader_ico.la -EVAS_STATIC_LIBADD += @evas_image_loader_ico_libs@ -endif if EVAS_STATIC_BUILD_JPEG SUBDIRS += ../modules/loaders/jpeg EVAS_STATIC_MODULE += ../modules/loaders/jpeg/libevas_loader_jpeg.la diff --git a/src/lib/cache/evas_cache_image.c b/src/lib/cache/evas_cache_image.c index 5dcbd9b..b75261d 100644 --- a/src/lib/cache/evas_cache_image.c +++ b/src/lib/cache/evas_cache_image.c @@ -281,41 +281,10 @@ _evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry *ie) cache->func.dealloc(ie); } -static Eina_Bool -_timestamp_compare(Image_Timestamp *tstamp, struct stat *st) -{ - if (tstamp->mtime != st->st_mtime) return EINA_FALSE; - if (tstamp->size != st->st_size) return EINA_FALSE; - if (tstamp->ino != st->st_ino) return EINA_FALSE; -#ifdef _STAT_VER_LINUX -#if (defined __USE_MISC && defined st_mtime) - if (tstamp->mtime_nsec != (unsigned long int)st->st_mtim.tv_nsec) return EINA_FALSE; -#else - if (tstamp->mtime_nsec != (unsigned long int)st->st_mtimensec) return EINA_FALSE; -#endif -#endif - return EINA_TRUE; -} - -static void -_timestamp_build(Image_Timestamp *tstamp, struct stat *st) -{ - tstamp->mtime = st->st_mtime; - tstamp->size = st->st_size; - tstamp->ino = st->st_ino; -#ifdef _STAT_VER_LINUX -#if (defined __USE_MISC && defined st_mtime) - tstamp->mtime_nsec = (unsigned long int)st->st_mtim.tv_nsec; -#else - tstamp->mtime_nsec = (unsigned long int)st->st_mtimensec; -#endif -#endif -} - static Image_Entry * _evas_cache_image_entry_new(Evas_Cache_Image *cache, const char *hkey, - Image_Timestamp *tstamp, + time_t timestamp, const char *file, const char *key, RGBA_Image_Loadopts *lo, @@ -353,8 +322,8 @@ _evas_cache_image_entry_new(Evas_Cache_Image *cache, ie->file = file ? eina_stringshare_add(file) : NULL; ie->key = key ? eina_stringshare_add(key) : NULL; - if (tstamp) ie->tstamp = *tstamp; - else memset(&ie->tstamp, 0, sizeof(Image_Timestamp)); + ie->timestamp = timestamp; + ie->laststat = time(NULL); ie->load_opts.scale_down_by = 0; ie->load_opts.dpi = 0; @@ -769,6 +738,8 @@ evas_cache_image_shutdown(Evas_Cache_Image *cache) free(cache); } +#define STAT_GAP 2 + EAPI Image_Entry * evas_cache_image_request(Evas_Cache_Image *cache, const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error) { @@ -781,7 +752,6 @@ evas_cache_image_request(Evas_Cache_Image *cache, const char *file, const char * size_t file_length; size_t key_length; struct stat st; - Image_Timestamp tstamp; assert(cache != NULL); @@ -875,12 +845,18 @@ evas_cache_image_request(Evas_Cache_Image *cache, const char *file, const char * #endif if (im) { - int ok = 1; - - stat_done = 1; - if (stat(file, &st) < 0) goto on_stat_error; + time_t t; + int ok; + + ok = 1; + t = time(NULL); + if ((t - im->laststat) > STAT_GAP) { - if (!_timestamp_compare(&(im->tstamp), &st)) ok = 0; + stat_done = 1; + if (stat(file, &st) < 0) goto on_stat_error; + + im->laststat = t; + if (st.st_mtime != im->timestamp) ok = 0; } if (ok) goto on_ok; @@ -897,16 +873,25 @@ evas_cache_image_request(Evas_Cache_Image *cache, const char *file, const char * #endif if (im) { - int ok = 1; + int ok; + ok = 1; if (!stat_done) { - stat_done = 1; - if (stat(file, &st) < 0) goto on_stat_error; - if (!_timestamp_compare(&(im->tstamp), &st)) ok = 0; + time_t t; + + t = time(NULL); + if ((t - im->laststat) > STAT_GAP) + { + stat_done = 1; + if (stat(file, &st) < 0) goto on_stat_error; + + im->laststat = t; + if (st.st_mtime != im->timestamp) ok = 0; + } } else - if (!_timestamp_compare(&(im->tstamp), &st)) ok = 0; + if (st.st_mtime != im->timestamp) ok = 0; if (ok) { @@ -922,8 +907,8 @@ evas_cache_image_request(Evas_Cache_Image *cache, const char *file, const char * { if (stat(file, &st) < 0) goto on_stat_error; } - _timestamp_build(&tstamp, &st); - im = _evas_cache_image_entry_new(cache, hkey, &tstamp, file, key, lo, error); + + im = _evas_cache_image_entry_new(cache, hkey, st.st_mtime, file, key, lo, error); if (!im) return NULL; if (cache->func.debug) @@ -979,7 +964,6 @@ evas_cache_image_drop(Image_Entry *im) LKL(im->lock_references); #endif im->references--; - if (im->references < 0) im->references = 0; references = im->references; #ifdef EVAS_FRAME_QUEUING LKU(im->lock_references); @@ -1086,6 +1070,18 @@ evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned error = cache->func.dirty(im_dirty, im); if (cache->func.debug) cache->func.debug("dirty-out", im_dirty); +/* + im_dirty = _evas_cache_image_entry_new(cache, NULL, im->timestamp, im->file, im->key, &im->load_opts, &error); + if (!im_dirty) goto on_error; + + if (cache->func.debug) + cache->func.debug("dirty-src", im); + error = cache->func.dirty(im_dirty, im); + if (cache->func.debug) + cache->func.debug("dirty-out", im_dirty); + + if (error != 0) goto on_error; + */ #ifdef EVAS_FRAME_QUEUING LKL(im_dirty->lock_references); #endif @@ -1133,7 +1129,7 @@ evas_cache_image_alone(Image_Entry *im) LKU(im->lock_references); #endif - if (references <= 1) + if (references == 1) { if (!(im->flags.dirty)) { @@ -1156,6 +1152,18 @@ evas_cache_image_alone(Image_Entry *im) error = cache->func.dirty(im_dirty, im); if (cache->func.debug) cache->func.debug("dirty-out", im_dirty); +/* + im_dirty = _evas_cache_image_entry_new(cache, NULL, im->timestamp, im->file, im->key, &im->load_opts, &error); + if (!im_dirty) goto on_error; + + if (cache->func.debug) + cache->func.debug("dirty-src", im); + error = cache->func.dirty(im_dirty, im); + if (cache->func.debug) + cache->func.debug("dirty-out", im_dirty); + + if (error != 0) goto on_error; + */ #ifdef EVAS_FRAME_QUEUING LKL(im_dirty->lock_references); #endif @@ -1186,7 +1194,7 @@ evas_cache_image_copied_data(Evas_Cache_Image *cache, unsigned int w, unsigned i (cspace == EVAS_COLORSPACE_YCBCR422P709_PL)) w &= ~0x1; - im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); + im = _evas_cache_image_entry_new(cache, NULL, 0, NULL, NULL, NULL, NULL); if (!im) return NULL; im->space = cspace; @@ -1223,7 +1231,7 @@ evas_cache_image_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, D (cspace == EVAS_COLORSPACE_YCBCR422P709_PL)) w &= ~0x1; - im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); + im = _evas_cache_image_entry_new(cache, NULL, 0, NULL, NULL, NULL, NULL); im->w = w; im->h = h; im->flags.alpha = alpha; @@ -1292,7 +1300,7 @@ evas_cache_image_size_set(Image_Entry *im, unsigned int w, unsigned int h) cache = im->cache; - new = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, &error); + new = _evas_cache_image_entry_new(cache, NULL, 0, NULL, NULL, NULL, &error); if (!new) goto on_error; new->flags.alpha = im->flags.alpha; @@ -1543,7 +1551,7 @@ evas_cache_image_empty(Evas_Cache_Image *cache) { Image_Entry *im; - im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); + im = _evas_cache_image_entry_new(cache, NULL, 0, NULL, NULL, NULL, NULL); if (!im) return NULL; #ifdef EVAS_FRAME_QUEUING diff --git a/src/lib/canvas/evas_clip.c b/src/lib/canvas/evas_clip.c index fc663fa..55f7dad 100644 --- a/src/lib/canvas/evas_clip.c +++ b/src/lib/canvas/evas_clip.c @@ -7,8 +7,6 @@ evas_object_clip_dirty(Evas_Object *obj) Eina_List *l; Evas_Object *data; - if (obj->cur.cache.clip.dirty) return ; - obj->cur.cache.clip.dirty = 1; EINA_LIST_FOREACH(obj->clip.clipees, l, data) evas_object_clip_dirty(data); diff --git a/src/lib/canvas/evas_object_image.c b/src/lib/canvas/evas_object_image.c index 2940f9d..8f71561 100644 --- a/src/lib/canvas/evas_object_image.c +++ b/src/lib/canvas/evas_object_image.c @@ -1,8 +1,3 @@ -#include -#include -#include -#include - #include "evas_common.h" #include "evas_private.h" #include "../engines/common/evas_convert_color.h" @@ -62,9 +57,6 @@ struct _Evas_Object_Image Evas_Object_Image_Pixels_Get_Cb get_pixels; void *get_pixels_data; } func; - - const char *tmpf; - int tmpf_fd; Evas_Image_Scale_Hint scale_hint; Evas_Image_Content_Hint content_hint; @@ -108,7 +100,6 @@ static void _proxy_unset(Evas_Object *proxy); static void _proxy_set(Evas_Object *proxy, Evas_Object *src); static void _proxy_error(Evas_Object *proxy, void *context, void *output, void *surface, int x, int y); -static void _cleanup_tmpf(Evas_Object *obj); static const Evas_Object_Func object_func = { @@ -188,120 +179,6 @@ evas_object_image_filled_add(Evas *e) return obj; } -static void -_cleanup_tmpf(Evas_Object *obj) -{ - Evas_Object_Image *o; - - o = (Evas_Object_Image *)(obj->object_data); - if (!o->tmpf) return; -#ifdef __linux__ -#else - unlink(o->tmpf); -#endif - if (o->tmpf_fd >= 0) close(o->tmpf_fd); - eina_stringshare_del(o->tmpf); - o->tmpf_fd = -1; - o->tmpf = NULL; -} - -static void -_create_tmpf(Evas_Object *obj, void *data, int size, char *format __UNUSED__) -{ - Evas_Object_Image *o; - char buf[4096]; - void *dst; - int fd = -1; - - o = (Evas_Object_Image *)(obj->object_data); -#ifdef __linux__ - snprintf(buf, sizeof(buf), "/dev/shm/.evas-tmpf-%i-%p-%i-XXXXXX", - (int)getpid(), data, (int)size); - fd = mkstemp(buf); -#endif - if (fd < 0) - { - snprintf(buf, sizeof(buf), "/tmp/.evas-tmpf-%i-%p-%i-XXXXXX", - (int)getpid(), data, (int)size); - fd = mkstemp(buf); - } - if (fd < 0) return; - if (ftruncate(fd, size) < 0) - { - unlink(buf); - close(fd); - return; - } - unlink(buf); - dst = mmap(NULL, size, - PROT_READ | PROT_WRITE, - MAP_SHARED, - fd, 0); - if (dst == MAP_FAILED) - { - close(fd); - return; - } - o->tmpf_fd = fd; -#ifdef __linux__ - snprintf(buf, sizeof(buf), "/proc/%li/fd/%i", (long)getpid(), fd); -#endif - o->tmpf = eina_stringshare_add(buf); - memcpy(dst, data, size); - munmap(dst, size); -} - -/** - * Sets the data for an image from memory to be loaded - * - * This is the same as evas_object_image_file_set() but the file to be loaded - * may exist at an address in memory (the data for the file, not the filename - * itself). The @p data at the address is copied and stored for future use, so - * no @p data needs to be kept after this call is made. It will be managed and - * freed for you when no longer needed. The @p size is limited to 2 gigabytes - * in size, and must be greater than 0. A NULL @p data pointer is also invalid. - * Set the filename to NULL to reset to empty state and have the image file - * data freed from memory using evas_object_image_file_set(). - * - * The @p format is optional (pass NULL if you don't need/use it). It is used - * to help Evas guess better which loader to use for the data. It may simply - * be the "extension" of the file as it would normally be on disk such as - * "jpg" or "png" or "gif" etc. - * - * @param obj The given image object. - * @param data The image file data address - * @param size The size of the image file data in bytes - * @param format The format of the file (optional), or NULL if not needed - * @param key The image key in file, or NULL. - */ -EAPI void -evas_object_image_memfile_set(Evas_Object *obj, void *data, int size, char *format, char *key) -{ - Evas_Object_Image *o; - - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - o = (Evas_Object_Image *)(obj->object_data); - MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); - return; - MAGIC_CHECK_END(); - _cleanup_tmpf(obj); - evas_object_image_file_set(obj, NULL, NULL); - if ((size < 1) || (!data)) return; - - _create_tmpf(obj, data, size, format); - evas_object_image_file_set(obj, o->tmpf, key); - if (!o->engine_data) - { - _cleanup_tmpf(obj); - return; - } - // invalidate the cache effectively - evas_object_image_alpha_set(obj, !o->cur.has_alpha); - evas_object_image_alpha_set(obj, !o->cur.has_alpha); -} - /** * Sets the filename and key of the given image object. * @@ -325,7 +202,6 @@ evas_object_image_file_set(Evas_Object *obj, const char *file, const char *key) MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); - if ((o->tmpf) && (file != o->tmpf)) _cleanup_tmpf(obj); if ((o->cur.file) && (file) && (!strcmp(o->cur.file, file))) { if ((!o->cur.key) && (!key)) @@ -1427,7 +1303,7 @@ evas_object_image_alpha_set(Evas_Object *obj, Eina_Bool has_alpha) if (o->engine_data) { int stride = 0; - + #ifdef EVAS_FRAME_QUEUING evas_common_pipe_op_image_flush(o->engine_data); #endif @@ -2513,30 +2389,19 @@ _proxy_error(Evas_Object *proxy, void *context, void *output, void *surface, return; } - static void -_proxy_subrender_recurse(Evas_Object *obj, Evas_Object *clip, void *output, void *surface, void *ctx, int x, int y){ +_proxy_subrender_recurse(Evas_Object *obj, void *output, void *surface, void *ctx, int x, int y){ Evas_Object *obj2; Evas *e; e = obj->layer->evas; if (obj->clip.clipees) return; - /* evas_object_is_visible, inline and tweaked to handle it's clip hidden*/ - if (!obj->cur.visible) return; - if (!clip || clip != obj->cur.clipper) - { - if (!obj->cur.cache.clip.visible) return; - if (obj->cur.cache.clip.a == 0 && - obj->cur.render_op == EVAS_RENDER_BLEND) return; - } - if (obj->func->is_visible && !obj->func->is_visible(obj)) return; - - if (!obj->pre_render_done) - obj->func->render_pre(obj); + if (!evas_object_is_visible(obj)) return; + obj->pre_render_done = 1; ctx = e->engine.func->context_new(output); if (obj->smart.smart) { EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2){ - _proxy_subrender_recurse(obj2, clip, output, surface, ctx, x,y); + _proxy_subrender_recurse(obj2, output, surface, ctx, x,y); } } else @@ -2557,7 +2422,7 @@ static void _proxy_subrender(Evas *e, Evas_Object *source) { void *ctx; - Evas_Object *obj2, *clip; + Evas_Object *obj2; int w,h; if (!source) return; @@ -2595,9 +2460,8 @@ _proxy_subrender(Evas *e, Evas_Object *source) ctx = e->engine.func->context_new(e->engine.data.output); if (source->smart.smart) { - clip = evas_object_smart_clipped_clipper_get(source); EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(source), obj2){ - _proxy_subrender_recurse(obj2, clip, e->engine.data.output, + _proxy_subrender_recurse(obj2, e->engine.data.output, source->proxy.surface, ctx, -source->cur.geometry.x, @@ -2606,8 +2470,6 @@ _proxy_subrender(Evas *e, Evas_Object *source) } else { - if (!source->pre_render_done) - source->func->render_pre(source); source->func->render(source, e->engine.data.output, ctx, source->proxy.surface, -source->cur.geometry.x, @@ -2797,7 +2659,6 @@ evas_object_image_new(void) o->cur.opaque_valid = 0; o->cur.source = NULL; o->prev = o->cur; - o->tmpf_fd = -1; return o; } @@ -2813,7 +2674,6 @@ evas_object_image_free(Evas_Object *obj) return; MAGIC_CHECK_END(); /* free obj */ - _cleanup_tmpf(obj); if (o->cur.file) eina_stringshare_del(o->cur.file); if (o->cur.key) eina_stringshare_del(o->cur.key); if (o->cur.source) _proxy_unset(obj); diff --git a/src/lib/canvas/evas_object_line.c b/src/lib/canvas/evas_object_line.c index f835aee..f50df7e 100644 --- a/src/lib/canvas/evas_object_line.c +++ b/src/lib/canvas/evas_object_line.c @@ -280,7 +280,7 @@ evas_object_line_free(Evas_Object *obj) MAGIC_CHECK_END(); /* free obj */ o->magic = 0; - EVAS_MEMPOOL_FREE(_mp_obj, o); + EVAS_MEMPOOL_FREE(_mp_obj,o); } static void diff --git a/src/lib/canvas/evas_object_main.c b/src/lib/canvas/evas_object_main.c index 531790e..5f44d72 100644 --- a/src/lib/canvas/evas_object_main.c +++ b/src/lib/canvas/evas_object_main.c @@ -354,53 +354,6 @@ evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y) /* routines apps will call */ /** - * Increments object reference count to defer deletion - * - * This increments the reference count of an object, which if greater than - * 0 will defer deletion by evas_object_del() until all references are - * released back to 0. References cannot go below 0 and unreferencing more - * times that referencing will result in the reference count being limited - * to 0. References are limited to 2^32 - 1 for an object. Referencing it more - * than this will result in it being limited to this value. - * - * @param obj The given evas object to reference - * @ingroup Evas_Object_Group_Basic - * @since 1.1.0 - */ -EAPI void -evas_object_ref(Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - obj->ref++; - if (obj->ref == 0) obj->ref--; -} - -/** - * Decrements object reference count to defer deletion - * - * This decrements the reference count of an object. If the object has had - * evas_object_del() called on it while references were more than 0, it will - * be deleted at the time this function is called as it normally would have - * been. See evas_object_ref() for more information. - * - * @param obj The given evas object to unreference - * @ingroup Evas_Object_Group_Basic - * @since 1.1.0 - */ -EAPI void -evas_object_unref(Evas_Object *obj) -{ - MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); - return; - MAGIC_CHECK_END(); - if (obj->ref == 0) return; - obj->ref--; - if ((obj->del_ref) && (obj->ref == 0)) evas_object_del(obj); -} - -/** * Deletes the given evas object and frees its memory. * * The object's 'free' callback is called when this function is called. @@ -419,25 +372,12 @@ evas_object_del(Evas_Object *obj) if (obj->delete_me) return; - if (obj->ref > 0) - { - obj->del_ref = 1; - return; - } #ifdef EVAS_FRAME_QUEUING evas_common_frameq_flush(); #endif - evas_object_hide(obj); - if (obj->focused) - { - obj->focused = 0; - obj->layer->evas->focused = NULL; - _evas_object_event_new(); - evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL); - _evas_post_event_callback_call(obj->layer->evas); - } _evas_object_event_new(); + evas_object_event_callback_call(obj, EVAS_CALLBACK_DEL, NULL); _evas_post_event_callback_call(obj->layer->evas); if (obj->name) evas_object_name_set(obj, NULL); @@ -446,9 +386,18 @@ evas_object_del(Evas_Object *obj) evas_object_free(obj, 1); return; } + if (obj->focused) + { + obj->focused = 0; + obj->layer->evas->focused = NULL; + _evas_object_event_new(); + evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL); + _evas_post_event_callback_call(obj->layer->evas); + } obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed; obj->mouse_grabbed = 0; obj->mouse_in = 0; + evas_object_hide(obj); evas_object_grabs_cleanup(obj); while (obj->clip.clipees) evas_object_clip_unset(obj->clip.clipees->data); diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index 2604eff..3f81b65 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -2023,7 +2023,7 @@ _layout_format_push(Ctxt *c, Evas_Object_Textblock_Format *fmt) * @param c the context to work on - Not NULL. * @param fmt the format to free. * @return the next format in the stack, or format if there's none. - * @see _layout_format_push() + * @see _layout_format_pop() */ static Evas_Object_Textblock_Format * _layout_format_pop(Ctxt *c, Evas_Object_Textblock_Format *fmt) @@ -2183,8 +2183,6 @@ _layout_line_order(Ctxt *c __UNUSED__, Evas_Object_Textblock_Line *line) } if (v_to_l) free(v_to_l); -#else - line = NULL; #endif } @@ -2820,14 +2818,11 @@ skip: ti->parent.text_node->bidi_props, ti->parent.text_pos); evas_common_text_props_script_set (&ti->text_props, ti->text); - if (ti->parent.format->font.font) - { - c->ENFN->font_text_props_info_create(c->ENDT, - ti->parent.format->font.font, - ti->text, &ti->text_props, - ti->parent.text_node->bidi_props, - ti->parent.text_pos, tmp_len); - } + c->ENFN->font_text_props_info_create(c->ENDT, + ti->parent.format->font.font, + ti->text, &ti->text_props, + ti->parent.text_node->bidi_props, + ti->parent.text_pos, tmp_len); } str += tmp_len; cur_len -= tmp_len; @@ -6538,9 +6533,6 @@ _evas_textblock_cursor_is_at_the_end(const Evas_Textblock_Cursor *cur) * This behavior is because visible formats are like characters and invisible * should be stacked in a way that the last one is added last. * - * This function works with native formats, that means that style defined - * tags like
won't work here. For those kind of things use markup prepend. - * * @param cur the cursor to where to add format at. * @param format the format to add. * @return Returns true if a visible format was added, false otherwise. @@ -6671,9 +6663,6 @@ evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *form * should be stacked in a way that the last one is added last. * If the format is visible the cursor is advanced after it. * - * This function works with native formats, that means that style defined - * tags like
won't work here. For those kind of things use markup prepend. - * * @param cur the cursor to where to add format at. * @param format the format to add. * @return Returns true if a visible format was added, false otherwise. diff --git a/src/lib/canvas/evas_render.c b/src/lib/canvas/evas_render.c index b09f2bc..f3f07ee 100644 --- a/src/lib/canvas/evas_render.c +++ b/src/lib/canvas/evas_render.c @@ -2,8 +2,8 @@ #include "evas_private.h" // debug rendering -/* #define REND_DGB 1 */ -/* #define STDOUT_DBG 1 */ +//#define REND_DGB 1 +//#define STDOUT_DBG 1 #ifdef REND_DGB static FILE *dbf = NULL; @@ -881,7 +881,6 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, obj->cur.geometry.y + off_y2, obj->cur.geometry.w, obj->cur.geometry.h); - e->engine.func->context_clip_set(e->engine.data.output, ctx, x, y, w, h); obj->func->render(obj, e->engine.data.output, ctx, @@ -920,11 +919,6 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, y = obj->cur.cache.clip.y; w = obj->cur.cache.clip.w; h = obj->cur.cache.clip.h; - RECTS_CLIP_TO_RECT(x, y, w, h, - obj->cur.clipper->cur.cache.clip.x, - obj->cur.clipper->cur.cache.clip.y, - obj->cur.clipper->cur.cache.clip.w, - obj->cur.clipper->cur.cache.clip.h); e->engine.func->context_clip_set(e->engine.data.output, e->engine.data.context, x + off_x, y + off_y, w, h); @@ -988,33 +982,7 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, { if (!obj->cur.map) { - int x, y, w, h; - RDI(level); - - x = obj->cur.cache.clip.x + off_x; - y = obj->cur.cache.clip.y + off_y; - w = obj->cur.cache.clip.w; - h = obj->cur.cache.clip.h; - - if (obj->cur.clipper) - { - if (_evas_render_has_map(obj)) - evas_object_clip_recalc(obj); - - RD(" clipper: %i %i %ix%i\n", - obj->cur.clipper->cur.cache.clip.x + off_x, - obj->cur.clipper->cur.cache.clip.y + off_y, - obj->cur.clipper->cur.cache.clip.w, - obj->cur.clipper->cur.cache.clip.h); - - RECTS_CLIP_TO_RECT(x, y, w, h, - obj->cur.clipper->cur.cache.clip.x + off_x, - obj->cur.clipper->cur.cache.clip.y + off_y, - obj->cur.clipper->cur.cache.clip.w, - obj->cur.clipper->cur.cache.clip.h); - } - RD(" clip: %i %i %ix%i [%i %i %ix%i]\n", obj->cur.cache.clip.x + off_x, obj->cur.cache.clip.y + off_y, @@ -1025,7 +993,11 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, obj->cur.geometry.w, obj->cur.geometry.h); e->engine.func->context_clip_set(e->engine.data.output, - ctx, x, y, w, h); + ctx, + obj->cur.cache.clip.x + off_x, + obj->cur.cache.clip.y + off_y, + obj->cur.cache.clip.w, + obj->cur.cache.clip.h); } else { @@ -1048,26 +1020,6 @@ evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, } else { - if (obj->cur.clipper) - { - int x, y, w, h; - - if (_evas_render_has_map(obj)) - evas_object_clip_recalc(obj); - x = obj->cur.cache.clip.x; - y = obj->cur.cache.clip.y; - w = obj->cur.cache.clip.w; - h = obj->cur.cache.clip.h; - RECTS_CLIP_TO_RECT(x, y, w, h, - obj->cur.clipper->cur.cache.clip.x, - obj->cur.clipper->cur.cache.clip.y, - obj->cur.clipper->cur.cache.clip.w, - obj->cur.clipper->cur.cache.clip.h); - e->engine.func->context_clip_set(e->engine.data.output, - e->engine.data.context, - x + off_x, y + off_y, w, h); - } - RDI(level); RD(" draw normal obj\n"); obj->func->render(obj, e->engine.data.output, context, surface, @@ -1112,10 +1064,10 @@ evas_render_updates_internal(Evas *e, /* phase 1. add extra updates for changed objects */ if (e->invalidate || e->render_objects.count <= 0) - clean_them = _evas_render_phase1_process(e, - &e->active_objects, - &e->restack_objects, - &e->delete_objects, + clean_them = _evas_render_phase1_process(e, + &e->active_objects, + &e->restack_objects, + &e->delete_objects, &e->render_objects, &redraw_all); @@ -1317,6 +1269,26 @@ evas_render_updates_internal(Evas *e, (eina_array_data_get(&e->temporary_objects, offset) == obj)) offset++; x = cx; y = cy; w = cw; h = ch; + if (obj->cur.clipper) + { + if (_evas_render_has_map(obj)) + { + evas_object_clip_recalc(obj); + } +/* hmmmm clip seems to kill eweather in elm-test + printf("clip: %4i %4i %4ix%4i to %4i %4i %4ix%4i\n", + x, y, w, h, + obj->cur.cache.clip.x + off_x, + obj->cur.cache.clip.y + off_y, + obj->cur.cache.clip.w, + obj->cur.cache.clip.h); + */ + RECTS_CLIP_TO_RECT(x, y, w, h, + obj->cur.cache.clip.x + off_x, + obj->cur.cache.clip.y + off_y, + obj->cur.cache.clip.w, + obj->cur.cache.clip.h); + } if (((w > 0) && (h > 0)) || (obj->smart.smart)) { if (!obj->smart.smart) @@ -1386,6 +1358,9 @@ evas_render_updates_internal(Evas *e, } } #endif + e->engine.func->context_clip_set(e->engine.data.output, + e->engine.data.context, + x, y, w, h); clean_them |= evas_render_mapped(e, obj, e->engine.data.context, surface, off_x, off_y, 0 #ifdef REND_DGB diff --git a/src/lib/engines/common/Makefile.am b/src/lib/engines/common/Makefile.am index 62b96aa..c3290b9 100644 --- a/src/lib/engines/common/Makefile.am +++ b/src/lib/engines/common/Makefile.am @@ -82,7 +82,6 @@ evas_convert_rgb_8.h \ evas_convert_yuv.h \ evas_draw.h \ evas_font.h \ -evas_font_default_walk.x \ evas_font_private.h \ evas_image.h \ evas_image_private.h \ diff --git a/src/lib/engines/common/evas_font_draw.c b/src/lib/engines/common/evas_font_draw.c index daa6dfa..3be396a 100644 --- a/src/lib/engines/common/evas_font_draw.c +++ b/src/lib/engines/common/evas_font_draw.c @@ -263,9 +263,6 @@ evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt index) if (!fi->fash) fi->fash = _fash_gl_new(); if (fi->fash) _fash_gl_add(fi->fash, index, fg); - /* This '+ 200' is just an estimation of how much memory freetype will use - * on it's size. This value is not really used anywhere in code - it's - * only for statistics. */ size = sizeof(RGBA_Font_Glyph) + sizeof(Eina_List) + (fg->glyph_out->bitmap.width * fg->glyph_out->bitmap.rows) + 200; fi->usage += size; @@ -499,7 +496,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font #else (void) use_kerning; #endif - +/* if (fi->src->current_size != fi->size) { FTLOCK(); @@ -507,7 +504,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font FTUNLOCK(); fi->src->current_size = fi->size; } - +*/ im = dst->image.data; /* Load the glyph according to the first letter of the script, preety @@ -524,6 +521,14 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font if (!*tmp && (tmp > text)) tmp--; evas_common_font_glyph_search(fn, &fi, *tmp); } + if (fi->src->current_size != fi->size) + { + FTLOCK(); + FT_Activate_Size(fi->ft.size); + FTUNLOCK(); + fi->src->current_size = fi->size; + } + EVAS_FONT_WALK_TEXT_VISUAL_START() { FT_UInt index; @@ -538,6 +543,14 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font * the use of harfbuzz */ index = evas_common_font_glyph_search(fn, &fi, text[EVAS_FONT_WALK_POS]); + + if (fi->src->current_size != fi->size) + { + FTLOCK(); + FT_Activate_Size(fi->ft.size); + FTUNLOCK(); + fi->src->current_size = fi->size; + } #endif LKL(fi->ft_mutex); fg = evas_common_font_int_cache_glyph_get(fi, index); @@ -828,6 +841,14 @@ evas_font_word_prerender(RGBA_Draw_Context *dc, const Eina_Unicode *in_text, con evas_common_font_glyph_search(fn, &fi, *tmp); } + if (fi->src->current_size != fi->size) + { + FTLOCK(); + FT_Activate_Size(fi->ft.size); + FTUNLOCK(); + fi->src->current_size = fi->size; + } + /* First pass: Work out how big and populate */ /* It's a bit hackish to use index and fg here as they are internal, * but that'll have to be good enough ATM */ @@ -845,6 +866,14 @@ evas_font_word_prerender(RGBA_Draw_Context *dc, const Eina_Unicode *in_text, con * the use of harfbuzz */ index = evas_common_font_glyph_search(fn, &fi, text[EVAS_FONT_WALK_POS]); + + if (fi->src->current_size != fi->size) + { + FTLOCK(); + FT_Activate_Size(fi->ft.size); + FTUNLOCK(); + fi->src->current_size = fi->size; + } #endif LKL(fi->ft_mutex); fg = evas_common_font_int_cache_glyph_get(fi, index); diff --git a/src/lib/engines/common/evas_font_ot.c b/src/lib/engines/common/evas_font_ot.c index 6a6a4e4..62ed99a 100644 --- a/src/lib/engines/common/evas_font_ot.c +++ b/src/lib/engines/common/evas_font_ot.c @@ -194,8 +194,6 @@ evas_common_font_ot_populate_text_props(void *_fn, const Eina_Unicode *text, hb_glyph_info_t *infos; int slen; unsigned int i; - Evas_Font_Glyph_Info *gl_itr; - Evas_Font_OT_Info *ot_itr; fi = fn->fonts->data; /* Load the font needed for this script */ @@ -248,20 +246,13 @@ evas_common_font_ot_populate_text_props(void *_fn, const Eina_Unicode *text, sizeof(Evas_Font_Glyph_Info)); positions = hb_buffer_get_glyph_positions(buffer); infos = hb_buffer_get_glyph_infos(buffer); - gl_itr = props->info->glyph; - ot_itr = props->info->ot; for (i = 0 ; i < props->len ; i++) { - ot_itr->source_cluster = infos->cluster; - ot_itr->x_offset = positions->x_offset; - ot_itr->y_offset = positions->y_offset; - gl_itr->index = infos->codepoint; - gl_itr->advance = positions->x_advance; - - ot_itr++; - gl_itr++; - infos++; - positions++; + props->info->ot[i].source_cluster = infos[i].cluster; + props->info->ot[i].x_offset = positions[i].x_offset; + props->info->ot[i].y_offset = positions[i].y_offset; + props->info->glyph[i].index = infos[i].codepoint; + props->info->glyph[i].advance = positions[i].x_advance; } hb_buffer_destroy(buffer); diff --git a/src/lib/engines/common/evas_font_private.h b/src/lib/engines/common/evas_font_private.h index eed3faf..cc68578 100644 --- a/src/lib/engines/common/evas_font_private.h +++ b/src/lib/engines/common/evas_font_private.h @@ -24,11 +24,6 @@ extern LK(lock_ot); // for harfbuzz calls # 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); @@ -37,6 +32,10 @@ void evas_common_font_int_use_increase(int size); void evas_common_font_int_use_trim(void); void evas_common_font_int_unload(RGBA_Font_Int *fi); void evas_common_font_int_reload(RGBA_Font_Int *fi); +/* Macros for text walking */ +# define OTLOCK() +# define OTUNLOCK() +# endif /* 6th bit is on is the same as frac part >= 0.5 */ # define EVAS_FONT_ROUND_26_6_TO_INT(x) \ diff --git a/src/lib/engines/common/evas_image_load.c b/src/lib/engines/common/evas_image_load.c index ba6b38d..b113040 100644 --- a/src/lib/engines/common/evas_image_load.c +++ b/src/lib/engines/common/evas_image_load.c @@ -30,14 +30,12 @@ static const struct ext_loader_s loaders[] = { "pnm", "pmaps" }, { "bmp", "bmp" }, { "tga", "tga" }, - { "wbmp", "wbmp" }, - { "ico", "ico" }, - { "cur", "ico" } + { "wbmp", "wbmp" } }; static const char *loaders_name[] = { - "png", "jpeg", "eet", "xpm", "tiff", "gif", "svg", "pmaps", "edb", "bmp", "tga", "wbmp", "ico" + "png", "jpeg", "eet", "xpm", "tiff", "gif", "svg", "pmaps", "edb", "bmp", "tga", "wbmp" }; struct evas_image_foreach_loader_data diff --git a/src/lib/engines/common/evas_pipe.c b/src/lib/engines/common/evas_pipe.c index 1f1b030..bda94ee 100644 --- a/src/lib/engines/common/evas_pipe.c +++ b/src/lib/engines/common/evas_pipe.c @@ -1,7 +1,6 @@ // THIS IS DEPRECATED. WILL GO EVENTUALLTY. NO NEED TO SUPPORT ANYMORE #include "evas_common.h" -#include #ifdef BUILD_PIPE_RENDER diff --git a/src/lib/engines/common/evas_text_utils.c b/src/lib/engines/common/evas_text_utils.c index 616cd7e..fe54ca4 100644 --- a/src/lib/engines/common/evas_text_utils.c +++ b/src/lib/engines/common/evas_text_utils.c @@ -175,6 +175,7 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text, { RGBA_Font *fn = (RGBA_Font *) _fn; RGBA_Font_Int *fi; + size_t char_index; if (text_props->info) { @@ -199,8 +200,6 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text, } #ifdef OT_SUPPORT - size_t char_index; - Evas_Font_Glyph_Info *gl_itr; const Eina_Unicode *base_char; evas_common_font_ot_populate_text_props(fn, text, text_props, len); @@ -218,20 +217,19 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text, evas_common_font_glyph_search(fn, &fi, *base_char); } - gl_itr = text_props->info->glyph; for (char_index = 0 ; char_index < text_props->len ; char_index++) { FT_UInt index; RGBA_Font_Glyph *fg; Eina_Bool is_replacement = EINA_FALSE; /* If we got a malformed index, show the replacement char instead */ - if (gl_itr->index == 0) + if (text_props->info->glyph[char_index].index == 0) { - gl_itr->index = + text_props->info->glyph[char_index].index = evas_common_font_glyph_search(fn, &fi, REPLACEMENT_CHAR); is_replacement = EINA_TRUE; } - index = gl_itr->index; + index = text_props->info->glyph[char_index].index; LKL(fi->ft_mutex); fg = evas_common_font_int_cache_glyph_get(fi, index); if (!fg) @@ -243,25 +241,25 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text, if (is_replacement) { /* Update the advance accordingly */ - gl_itr->advance = + text_props->info->glyph[char_index].advance = fg->glyph->advance.x >> 10; /* FIXME: reload fi, a bit slow, but I have no choice. */ evas_common_font_glyph_search(fn, &fi, *base_char); } - gl_itr->x_bear = fg->glyph_out->left; - gl_itr->width = fg->glyph_out->bitmap.width; + text_props->info->glyph[char_index].x_bear = + fg->glyph_out->left; + text_props->info->glyph[char_index].width = + fg->glyph_out->bitmap.width; /* text_props->info->glyph[char_index].advance = * text_props->info->glyph[char_index].index = * already done by the ot function */ if (EVAS_FONT_CHARACTER_IS_INVISIBLE( text[text_props->info->ot[char_index].source_cluster])) - gl_itr->index = 0; + text_props->info->glyph[char_index].index = 0; - gl_itr++; } #else /* We are walking the string in visual ordering */ - Evas_Font_Glyph_Info *gl_itr; Eina_Bool use_kerning; FT_UInt prev_index; FT_Face pface = NULL; @@ -284,9 +282,8 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text, { adv_d = 1; } - - gl_itr = text_props->info->glyph; - for ( ; i > 0 ; gl_itr++, text += adv_d, i--) + char_index = 0; + for ( ; i > 0 ; char_index++, text += adv_d, i--) { FT_UInt index; RGBA_Font_Glyph *fg; @@ -334,7 +331,8 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text, { if (evas_common_font_query_kerning(fi, index, prev_index, &kern)) { - (gl_itr - 1)->advance += kern; + text_props->info->glyph[char_index - 1].advance += + kern; } } else @@ -342,7 +340,8 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text, { if (evas_common_font_query_kerning(fi, prev_index, index, &kern)) { - (gl_itr - 1)->advance += kern; + text_props->info->glyph[char_index - 1].advance += + kern; } } } @@ -351,12 +350,15 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text, LKU(fi->ft_mutex); if (EVAS_FONT_CHARACTER_IS_INVISIBLE(_gl)) - gl_itr->index = 0; - - gl_itr->index = index; - gl_itr->x_bear = fg->glyph_out->left; - gl_itr->advance = fg->glyph->advance.x >> 10; - gl_itr->width = fg->glyph_out->bitmap.width; + text_props->info->glyph[char_index].index = 0; + + text_props->info->glyph[char_index].index = index; + text_props->info->glyph[char_index].x_bear = + fg->glyph_out->left; + text_props->info->glyph[char_index].advance = + fg->glyph->advance.x >> 10; + text_props->info->glyph[char_index].width = + fg->glyph_out->bitmap.width; prev_index = index; } diff --git a/src/lib/engines/common_16/evas_soft16_line.c b/src/lib/engines/common_16/evas_soft16_line.c index b22a85d..1884baf 100644 --- a/src/lib/engines/common_16/evas_soft16_line.c +++ b/src/lib/engines/common_16/evas_soft16_line.c @@ -376,7 +376,6 @@ evas_common_soft16_line_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, i int dx, dy; int x, y, w, h; - c_tmp.mask = NULL; c_tmp.use = 1; c_tmp.x = 0; c_tmp.y = 0; diff --git a/src/lib/file/evas_module.c b/src/lib/file/evas_module.c index 6466abd..4e37f1a 100644 --- a/src/lib/file/evas_module.c +++ b/src/lib/file/evas_module.c @@ -125,7 +125,6 @@ EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, eet); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, edb); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, tga); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, wbmp); -EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, ico); EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, edb); EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, eet); EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, jpeg); @@ -241,9 +240,6 @@ static const struct { #ifdef EVAS_STATIC_BUILD_WBMP EVAS_EINA_STATIC_MODULE_USE(image_loader, wbmp), #endif -#ifdef EVAS_STATIC_BUILD_ICO - EVAS_EINA_STATIC_MODULE_USE(image_loader, ico), -#endif #ifdef EVAS_STATIC_BUILD_EDB EVAS_EINA_STATIC_MODULE_USE(image_saver, edb), #endif diff --git a/src/lib/include/evas_cairo_common.h b/src/lib/include/evas_cairo_common.h index 57fc791..cdc5e96 100644 --- a/src/lib/include/evas_cairo_common.h +++ b/src/lib/include/evas_cairo_common.h @@ -116,44 +116,44 @@ struct _Evas_Cairo_Polygon_Point #endif /* -Evas_Engine_GL_Context *evas_gl_common_context_new(void); -void evas_gl_common_context_free(Evas_Engine_GL_Context *gc); -void evas_gl_common_context_use(Evas_Engine_GL_Context *gc); -void evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h); -void evas_gl_common_context_color_set(Evas_Engine_GL_Context *gc, int r, int g, int b, int a); -void evas_gl_common_context_blend_set(Evas_Engine_GL_Context *gc, int blend); -void evas_gl_common_context_dither_set(Evas_Engine_GL_Context *gc, int dither); -void evas_gl_common_context_texture_set(Evas_Engine_GL_Context *gc, Evas_GL_Texture *tex, int smooth, int w, int h); -void evas_gl_common_context_font_texture_set(Evas_Engine_GL_Context *gc, Evas_GL_Font_Texture *ft); -void evas_gl_common_context_clip_set(Evas_Engine_GL_Context *gc, int on, int x, int y, int w, int h); -void evas_gl_common_context_read_buf_set(Evas_Engine_GL_Context *gc, GLenum buf); -void evas_gl_common_context_write_buf_set(Evas_Engine_GL_Context *gc, GLenum buf); - -Evas_GL_Texture *evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im, int smooth); +Evas_GL_Context *evas_gl_common_context_new(void); +void evas_gl_common_context_free(Evas_GL_Context *gc); +void evas_gl_common_context_use(Evas_GL_Context *gc); +void evas_gl_common_context_resize(Evas_GL_Context *gc, int w, int h); +void evas_gl_common_context_color_set(Evas_GL_Context *gc, int r, int g, int b, int a); +void evas_gl_common_context_blend_set(Evas_GL_Context *gc, int blend); +void evas_gl_common_context_dither_set(Evas_GL_Context *gc, int dither); +void evas_gl_common_context_texture_set(Evas_GL_Context *gc, Evas_GL_Texture *tex, int smooth, int w, int h); +void evas_gl_common_context_font_texture_set(Evas_GL_Context *gc, Evas_GL_Font_Texture *ft); +void evas_gl_common_context_clip_set(Evas_GL_Context *gc, int on, int x, int y, int w, int h); +void evas_gl_common_context_read_buf_set(Evas_GL_Context *gc, GLenum buf); +void evas_gl_common_context_write_buf_set(Evas_GL_Context *gc, GLenum buf); + +Evas_GL_Texture *evas_gl_common_texture_new(Evas_GL_Context *gc, RGBA_Image *im, int smooth); void evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im, int smooth); void evas_gl_common_texture_free(Evas_GL_Texture *tex); void evas_gl_common_texture_mipmaps_build(Evas_GL_Texture *tex, RGBA_Image *im, int smooth); -Evas_GL_Image *evas_gl_common_image_load(Evas_Engine_GL_Context *gc, char *file, char *key); -Evas_GL_Image *evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, int w, int h, int *data); -Evas_GL_Image *evas_gl_common_image_new_from_copied_data(Evas_Engine_GL_Context *gc, int w, int h, int *data); -Evas_GL_Image *evas_gl_common_image_new(Evas_Engine_GL_Context *gc, int w, int h); +Evas_GL_Image *evas_gl_common_image_load(Evas_GL_Context *gc, char *file, char *key); +Evas_GL_Image *evas_gl_common_image_new_from_data(Evas_GL_Context *gc, int w, int h, int *data); +Evas_GL_Image *evas_gl_common_image_new_from_copied_data(Evas_GL_Context *gc, int w, int h, int *data); +Evas_GL_Image *evas_gl_common_image_new(Evas_GL_Context *gc, int w, int h); void evas_gl_common_image_free(Evas_GL_Image *im); void evas_gl_common_image_dirty(Evas_GL_Image *im); Evas_GL_Polygon *evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y); Evas_GL_Polygon *evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly); -void evas_gl_common_swap_rect(Evas_Engine_GL_Context *gc, int x, int y, int w, int h); +void evas_gl_common_swap_rect(Evas_GL_Context *gc, int x, int y, int w, int h); -void evas_gl_common_rect_draw(Evas_Engine_GL_Context *gc, RGBA_Draw_Context *dc, int x, int y, int w, int h); -void evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, RGBA_Draw_Context *dc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth); -void evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2); -void evas_gl_common_poly_draw(Evas_Engine_GL_Context *gc, RGBA_Draw_Context *dc, Evas_GL_Polygon *poly); +void evas_gl_common_rect_draw(Evas_GL_Context *gc, RGBA_Draw_Context *dc, int x, int y, int w, int h); +void evas_gl_common_image_draw(Evas_GL_Context *gc, RGBA_Draw_Context *dc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth); +void evas_gl_common_line_draw(Evas_GL_Context *gc, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2); +void evas_gl_common_poly_draw(Evas_GL_Context *gc, RGBA_Draw_Context *dc, Evas_GL_Polygon *poly); -Evas_GL_Font_Texture *evas_gl_font_texture_new(Evas_Engine_GL_Context *gc, RGBA_Font_Glyph *fg); +Evas_GL_Font_Texture *evas_gl_font_texture_new(Evas_GL_Context *gc, RGBA_Font_Glyph *fg); void evas_gl_font_texture_free(Evas_GL_Font_Texture *ft); -void evas_gl_font_texture_draw(Evas_Engine_GL_Context *gc, void *surface, RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg, int x, int y); +void evas_gl_font_texture_draw(Evas_GL_Context *gc, void *surface, RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg, int x, int y); */ #endif diff --git a/src/lib/include/evas_common.h b/src/lib/include/evas_common.h index eb5e9c7..6e9cb6d 100644 --- a/src/lib/include/evas_common.h +++ b/src/lib/include/evas_common.h @@ -12,10 +12,6 @@ #include #include "Evas.h" -#include -#include -#include - /* macros needed to log message through eina_log */ extern EAPI int _evas_log_dom_global; #ifdef _EVAS_DEFAULT_LOG_DOM @@ -123,8 +119,8 @@ extern EAPI int _evas_log_dom_global; #ifdef BUILD_PTHREAD -#ifndef _GNU_SOURCE -#define _GNU_SOURCE +#ifndef __USE_GNU +#define __USE_GNU #endif # include @@ -399,7 +395,6 @@ typedef unsigned char DATA8; typedef struct _Image_Entry Image_Entry; typedef struct _Image_Entry_Flags Image_Entry_Flags; -typedef struct _Image_Timestamp Image_Timestamp; typedef struct _Engine_Image_Entry Engine_Image_Entry; typedef struct _Evas_Cache_Target Evas_Cache_Target; typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread; @@ -546,16 +541,6 @@ struct _Evas_Cache_Target void *data; }; -struct _Image_Timestamp -{ - time_t mtime; - off_t size; - ino_t ino; -#ifdef _STAT_VER_LINUX - unsigned long int mtime_nsec; -#endif -}; - struct _Image_Entry { EINA_INLIST; @@ -568,9 +553,10 @@ struct _Image_Entry const char *key; Evas_Cache_Target *targets; - Evas_Preload_Pthread *preload; + Evas_Preload_Pthread *preload; - Image_Timestamp tstamp; + time_t timestamp; + time_t laststat; int references; #ifdef EVAS_FRAME_QUEUING diff --git a/src/lib/include/evas_inline.x b/src/lib/include/evas_inline.x index 3137579..73f3f42 100644 --- a/src/lib/include/evas_inline.x +++ b/src/lib/include/evas_inline.x @@ -206,33 +206,28 @@ evas_object_clip_recalc(Evas_Object *obj) else cvis = obj->cur.visible; cr = obj->cur.color.r; cg = obj->cur.color.g; cb = obj->cur.color.b; ca = obj->cur.color.a; - if (obj->cur.clipper) + if ((obj->cur.clipper) && + (obj->cur.clipper->cur.map_parent == obj->cur.map_parent)) { // this causes problems... hmmm - if (obj->cur.clipper->cur.cache.clip.dirty) - evas_object_clip_recalc(obj->cur.clipper); - - // I don't know why this test was here in the first place. As I have - // no issue showing up due to this, I keep it and move color out of it. - if (obj->cur.clipper->cur.map_parent == obj->cur.map_parent) - { - nx = obj->cur.clipper->cur.cache.clip.x; - ny = obj->cur.clipper->cur.cache.clip.y; - nw = obj->cur.clipper->cur.cache.clip.w; - nh = obj->cur.clipper->cur.cache.clip.h; - RECTS_CLIP_TO_RECT(cx, cy, cw, ch, nx, ny, nw, nh); - } - - nvis = obj->cur.clipper->cur.cache.clip.visible; - nr = obj->cur.clipper->cur.cache.clip.r; - ng = obj->cur.clipper->cur.cache.clip.g; - nb = obj->cur.clipper->cur.cache.clip.b; - na = obj->cur.clipper->cur.cache.clip.a; - cvis = cvis * nvis; - cr = (cr * (nr + 1)) >> 8; - cg = (cg * (ng + 1)) >> 8; - cb = (cb * (nb + 1)) >> 8; - ca = (ca * (na + 1)) >> 8; + if (obj->cur.clipper->cur.cache.clip.dirty) + evas_object_clip_recalc(obj->cur.clipper); + nx = obj->cur.clipper->cur.cache.clip.x; + ny = obj->cur.clipper->cur.cache.clip.y; + nw = obj->cur.clipper->cur.cache.clip.w; + nh = obj->cur.clipper->cur.cache.clip.h; + RECTS_CLIP_TO_RECT(cx, cy, cw, ch, nx, ny, nw, nh); + + nvis = obj->cur.clipper->cur.cache.clip.visible; + nr = obj->cur.clipper->cur.cache.clip.r; + ng = obj->cur.clipper->cur.cache.clip.g; + nb = obj->cur.clipper->cur.cache.clip.b; + na = obj->cur.clipper->cur.cache.clip.a; + cvis = cvis * nvis; + cr = (cr * (nr + 1)) >> 8; + cg = (cg * (ng + 1)) >> 8; + cb = (cb * (nb + 1)) >> 8; + ca = (ca * (na + 1)) >> 8; } if ((ca == 0 && obj->cur.render_op == EVAS_RENDER_BLEND) || (cw <= 0) || (ch <= 0)) cvis = 0; obj->cur.cache.clip.x = cx; diff --git a/src/lib/include/evas_private.h b/src/lib/include/evas_private.h index 012a449..6103bfd 100644 --- a/src/lib/include/evas_private.h +++ b/src/lib/include/evas_private.h @@ -460,8 +460,6 @@ struct _Evas_Object struct { int in_move, in_resize; } doing; - - unsigned int ref; unsigned char delete_me; @@ -490,7 +488,6 @@ struct _Evas_Object Eina_Bool changed_move : 1; Eina_Bool changed_move_only : 1; Eina_Bool changed_nomove : 1; - Eina_Bool del_ref : 1; }; struct _Evas_Func_Node diff --git a/src/modules/engines/Makefile.am b/src/modules/engines/Makefile.am index 40337a8..bdc9ba1 100644 --- a/src/modules/engines/Makefile.am +++ b/src/modules/engines/Makefile.am @@ -17,20 +17,15 @@ endif if !EVAS_STATIC_BUILD_FB SUBDIRS += fb endif - -if !EVAS_STATIC_BUILD_GL_COMMON -SUBDIRS += gl_common -endif if !EVAS_STATIC_BUILD_GL_GLEW -SUBDIRS += gl_glew +SUBDIRS += gl_common gl_glew endif if !EVAS_STATIC_BUILD_GL_X11 -SUBDIRS += gl_x11 +SUBDIRS += gl_common gl_x11 endif if !EVAS_STATIC_BUILD_GL_SDL -SUBDIRS += gl_sdl +SUBDIRS += gl_common gl_sdl endif - if !EVAS_STATIC_BUILD_QUARTZ SUBDIRS += quartz endif diff --git a/src/modules/engines/buffer/Makefile.am b/src/modules/engines/buffer/Makefile.am index aa02fc6..45d92cd 100644 --- a/src/modules/engines/buffer/Makefile.am +++ b/src/modules/engines/buffer/Makefile.am @@ -17,13 +17,13 @@ BUFFER_SOURCES = \ evas_engine.c \ evas_outbuf.c +pkgdir = $(libdir)/evas/modules/engines/buffer/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_Buffer.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_BUFFER -pkgdir = $(libdir)/evas/modules/engines/buffer/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(BUFFER_SOURCES) diff --git a/src/modules/engines/cairo_x11/Makefile.am b/src/modules/engines/cairo_x11/Makefile.am index d2fa180..33153ff 100644 --- a/src/modules/engines/cairo_x11/Makefile.am +++ b/src/modules/engines/cairo_x11/Makefile.am @@ -18,13 +18,13 @@ evas_x_main.c CAIRO_X11_LIBADD = @evas_engine_cairo_x11_libs@ $(top_builddir)/src/modules/engines/cairo_common/libevas_engine_cairo_common.la +pkgdir = $(libdir)/evas/modules/engines/cairo_x11/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_Cairo_X11.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_CAIRO_X11 -pkgdir = $(libdir)/evas/modules/engines/cairo_x11/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(CAIRO_X11_SOURCES) diff --git a/src/modules/engines/direct3d/Makefile.am b/src/modules/engines/direct3d/Makefile.am index 6b64ef5..5847494 100644 --- a/src/modules/engines/direct3d/Makefile.am +++ b/src/modules/engines/direct3d/Makefile.am @@ -29,13 +29,13 @@ evas_direct3d_vertex_buffer_cache.cpp DIRECT3D_LIBADD = @evas_engine_direct3d_libs@ +pkgdir = $(libdir)/evas/modules/engines/direct3d/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_Direct3D.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_DIRECT3D -pkgdir = $(libdir)/evas/modules/engines/direct3d/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(DIRECT3D_SOURCES) module_la_CXXFLAGS = -fno-exceptions diff --git a/src/modules/engines/directfb/Makefile.am b/src/modules/engines/directfb/Makefile.am index fae87da..ff571b5 100644 --- a/src/modules/engines/directfb/Makefile.am +++ b/src/modules/engines/directfb/Makefile.am @@ -17,13 +17,13 @@ if BUILD_ENGINE_DIRECTFB DIRECTFB_SOURCES = evas_engine.c polygon.c DIRECTFB_LIBADD = @evas_engine_directfb_libs@ +pkgdir = $(libdir)/evas/modules/engines/directfb/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_DirectFB.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_DIRECTFB -pkgdir = $(libdir)/evas/modules/engines/directfb/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(DIRECTFB_SOURCES) diff --git a/src/modules/engines/fb/Makefile.am b/src/modules/engines/fb/Makefile.am index 47527f7..58c70ca 100644 --- a/src/modules/engines/fb/Makefile.am +++ b/src/modules/engines/fb/Makefile.am @@ -19,13 +19,13 @@ evas_outbuf.c FB_LIBADD = @evas_engine_fb_libs@ +pkgdir = $(libdir)/evas/modules/engines/fb/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_FB.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_FB -pkgdir = $(libdir)/evas/modules/engines/fb/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(FB_SOURCES) module_la_LIBADD = @EINA_LIBS@ $(FB_LIBADD) $(top_builddir)/src/lib/libevas.la diff --git a/src/modules/engines/gl_common/evas_gl_common.h b/src/modules/engines/gl_common/evas_gl_common.h index 893e00f..d83bdd1 100644 --- a/src/modules/engines/gl_common/evas_gl_common.h +++ b/src/modules/engines/gl_common/evas_gl_common.h @@ -102,7 +102,7 @@ typedef struct _Evas_GL_Program Evas_GL_Program; typedef struct _Evas_GL_Program_Source Evas_GL_Program_Source; typedef struct _Evas_GL_Shared Evas_GL_Shared; -typedef struct _Evas_Engine_GL_Context Evas_Engine_GL_Context; +typedef struct _Evas_GL_Context Evas_GL_Context; typedef struct _Evas_GL_Texture_Pool Evas_GL_Texture_Pool; typedef struct _Evas_GL_Texture Evas_GL_Texture; typedef struct _Evas_GL_Image Evas_GL_Image; @@ -218,7 +218,7 @@ struct _Evas_GL_Shared -struct _Evas_Engine_GL_Context +struct _Evas_GL_Context { int references; int w, h; @@ -297,7 +297,7 @@ struct _Evas_Engine_GL_Context struct _Evas_GL_Texture_Pool { - Evas_Engine_GL_Context *gc; + Evas_GL_Context *gc; GLuint texture, fb; GLuint intformat, format, dataformat; int w, h; @@ -318,7 +318,7 @@ struct _Evas_GL_Texture_Pool struct _Evas_GL_Texture { - Evas_Engine_GL_Context *gc; + Evas_GL_Context *gc; Evas_GL_Image *im; Evas_GL_Texture_Pool *pt, *ptu, *ptv; int x, y, w, h; @@ -330,7 +330,7 @@ struct _Evas_GL_Texture struct _Evas_GL_Image { - Evas_Engine_GL_Context *gc; + Evas_GL_Context *gc; RGBA_Image *im; Evas_GL_Texture *tex; RGBA_Image_Loadopts load_opts; @@ -410,29 +410,26 @@ extern Evas_GL_Program_Source shader_tex_nomul_vert_src; void glerr(int err, const char *file, const char *func, int line, const char *op); -Evas_Engine_GL_Context *evas_gl_common_context_new(void); -void evas_gl_common_context_free(Evas_Engine_GL_Context *gc); -void evas_gl_common_context_use(Evas_Engine_GL_Context *gc); -void evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc); -void evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot); -void evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc, Evas_GL_Image *surface); - -void evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc, +Evas_GL_Context *evas_gl_common_context_new(void); +void evas_gl_common_context_free(Evas_GL_Context *gc); +void evas_gl_common_context_use(Evas_GL_Context *gc); +void evas_gl_common_context_newframe(Evas_GL_Context *gc); +void evas_gl_common_context_resize(Evas_GL_Context *gc, int w, int h, int rot); +void evas_gl_common_context_target_surface_set(Evas_GL_Context *gc, Evas_GL_Image *surface); + +void evas_gl_common_context_line_push(Evas_GL_Context *gc, int x1, int y1, int x2, int y2, int clip, int cx, int cy, int cw, int ch, int r, int g, int b, int a); -void evas_gl_common_context_rectangle_push(Evas_Engine_GL_Context *gc, +void evas_gl_common_context_rectangle_push(Evas_GL_Context *gc, int x, int y, int w, int h, int r, int g, int b, int a); -void evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc, +void evas_gl_common_context_image_push(Evas_GL_Context *gc, Evas_GL_Texture *tex, double sx, double sy, double sw, double sh, int x, int y, int w, int h, int r, int g, int b, int a, Eina_Bool smooth, Eina_Bool tex_only); -<<<<<<< HEAD -void evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc, -======= void evas_gl_common_context_image_mask_push(Evas_GL_Context *gc, Evas_GL_Texture *tex, Evas_GL_Texture *texm, @@ -444,18 +441,17 @@ void evas_gl_common_context_image_mask_push(Evas_GL_Context *gc, void evas_gl_common_context_font_push(Evas_GL_Context *gc, ->>>>>>> EFL_upgrade[add] Evas_GL_Texture *tex, double sx, double sy, double sw, double sh, int x, int y, int w, int h, int r, int g, int b, int a); -void evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc, +void evas_gl_common_context_yuv_push(Evas_GL_Context *gc, Evas_GL_Texture *tex, double sx, double sy, double sw, double sh, int x, int y, int w, int h, int r, int g, int b, int a, Eina_Bool smooth); -void evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc, +void evas_gl_common_context_image_map_push(Evas_GL_Context *gc, Evas_GL_Texture *tex, int npoints, RGBA_Map_Point *p, @@ -464,7 +460,7 @@ void evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *g Eina_Bool smooth, Eina_Bool tex_only, Eina_Bool yuv); -void evas_gl_common_context_flush(Evas_Engine_GL_Context *gc); +void evas_gl_common_context_flush(Evas_GL_Context *gc); int evas_gl_common_shader_program_init(Evas_GL_Program *p, Evas_GL_Program_Source *vert, @@ -472,39 +468,39 @@ int evas_gl_common_shader_program_init(Evas_GL_Program *p, const char *name); void evas_gl_common_shader_program_shutdown(Evas_GL_Program *p); -void evas_gl_common_rect_draw(Evas_Engine_GL_Context *gc, int x, int y, int w, int h); +void evas_gl_common_rect_draw(Evas_GL_Context *gc, int x, int y, int w, int h); void evas_gl_texture_pool_empty(Evas_GL_Texture_Pool *pt); -Evas_GL_Texture *evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im); -Evas_GL_Texture *evas_gl_common_texture_native_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_GL_Image *im); -Evas_GL_Texture *evas_gl_common_texture_render_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha); -Evas_GL_Texture *evas_gl_common_texture_dynamic_new(Evas_Engine_GL_Context *gc, Evas_GL_Image *im); +Evas_GL_Texture *evas_gl_common_texture_new(Evas_GL_Context *gc, RGBA_Image *im); +Evas_GL_Texture *evas_gl_common_texture_native_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_GL_Image *im); +Evas_GL_Texture *evas_gl_common_texture_render_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha); +Evas_GL_Texture *evas_gl_common_texture_dynamic_new(Evas_GL_Context *gc, Evas_GL_Image *im); void evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im); void evas_gl_common_texture_free(Evas_GL_Texture *tex); -Evas_GL_Texture *evas_gl_common_texture_alpha_new(Evas_Engine_GL_Context *gc, DATA8 *pixels, unsigned int w, unsigned int h, int fh); +Evas_GL_Texture *evas_gl_common_texture_alpha_new(Evas_GL_Context *gc, DATA8 *pixels, unsigned int w, unsigned int h, int fh); void evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, unsigned int w, unsigned int h, int fh); -Evas_GL_Texture *evas_gl_common_texture_yuv_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h); +Evas_GL_Texture *evas_gl_common_texture_yuv_new(Evas_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h); void evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h); -void evas_gl_common_image_all_unload(Evas_Engine_GL_Context *gc); +void evas_gl_common_image_all_unload(Evas_GL_Context *gc); void evas_gl_common_image_ref(Evas_GL_Image *im); void evas_gl_common_image_unref(Evas_GL_Image *im); -Evas_GL_Image *evas_gl_common_image_load(Evas_Engine_GL_Context *gc, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error); -Evas_GL_Image *evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace); -Evas_GL_Image *evas_gl_common_image_new_from_copied_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace); -Evas_GL_Image *evas_gl_common_image_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, int cspace); +Evas_GL_Image *evas_gl_common_image_load(Evas_GL_Context *gc, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error); +Evas_GL_Image *evas_gl_common_image_new_from_data(Evas_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace); +Evas_GL_Image *evas_gl_common_image_new_from_copied_data(Evas_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace); +Evas_GL_Image *evas_gl_common_image_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha, int cspace); Evas_GL_Image *evas_gl_common_image_alpha_set(Evas_GL_Image *im, int alpha); void evas_gl_common_image_native_enable(Evas_GL_Image *im); void evas_gl_common_image_native_disable(Evas_GL_Image *im); void evas_gl_common_image_scale_hint_set(Evas_GL_Image *im, int hint); void evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint); -void evas_gl_common_image_cache_flush(Evas_Engine_GL_Context *gc); +void evas_gl_common_image_cache_flush(Evas_GL_Context *gc); void evas_gl_common_image_free(Evas_GL_Image *im); -Evas_GL_Image *evas_gl_common_image_surface_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha); +Evas_GL_Image *evas_gl_common_image_surface_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha); void evas_gl_common_image_dirty(Evas_GL_Image *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); -void evas_gl_common_image_map_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int npoints, RGBA_Map_Point *p, int smooth, int level); -void evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth); +void evas_gl_common_image_map_draw(Evas_GL_Context *gc, Evas_GL_Image *im, int npoints, RGBA_Map_Point *p, int smooth, int level); +void evas_gl_common_image_draw(Evas_GL_Context *gc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth); void *evas_gl_font_texture_new(void *gc, RGBA_Font_Glyph *fg); void evas_gl_font_texture_free(void *); @@ -512,9 +508,9 @@ void evas_gl_font_texture_draw(void *gc, void *surface, void *dc, R Evas_GL_Polygon *evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y); Evas_GL_Polygon *evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly); -void evas_gl_common_poly_draw(Evas_Engine_GL_Context *gc, Evas_GL_Polygon *poly, int x, int y); +void evas_gl_common_poly_draw(Evas_GL_Context *gc, Evas_GL_Polygon *poly, int x, int y); -void evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, int x1, int y1, int x2, int y2); +void evas_gl_common_line_draw(Evas_GL_Context *gc, int x1, int y1, int x2, int y2); extern void (*glsym_glGenFramebuffers) (GLsizei a, GLuint *b); extern void (*glsym_glBindFramebuffer) (GLenum a, GLuint b); diff --git a/src/modules/engines/gl_common/evas_gl_context.c b/src/modules/engines/gl_common/evas_gl_context.c index 5991b78..5eceb64 100644 --- a/src/modules/engines/gl_common/evas_gl_context.c +++ b/src/modules/engines/gl_common/evas_gl_context.c @@ -107,9 +107,9 @@ gl_symbols(void) #endif } -static void shader_array_flush(Evas_Engine_GL_Context *gc); +static void shader_array_flush(Evas_GL_Context *gc); -static Evas_Engine_GL_Context *_evas_gl_common_context = NULL; +static Evas_GL_Context *_evas_gl_common_context = NULL; static Evas_GL_Shared *shared = NULL; void @@ -287,12 +287,11 @@ _evas_gl_common_version_check() } static void -_evas_gl_common_viewport_set(Evas_Engine_GL_Context *gc) +_evas_gl_common_viewport_set(Evas_GL_Context *gc) { GLfloat proj[16]; int w = 1, h = 1, m = 1, rot = 1, foc = 0; - EINA_SAFETY_ON_NULL_RETURN(gc); foc = gc->foc; // surface in pipe 0 will be the same as all pipes if ((gc->pipe[0].shader.surface == gc->def_surface) || @@ -477,23 +476,23 @@ _evas_gl_common_viewport_set(Evas_Engine_GL_Context *gc) GLERR(__FUNCTION__, __FILE__, __LINE__, ""); } -Evas_Engine_GL_Context * +Evas_GL_Context * evas_gl_common_context_new(void) { - Evas_Engine_GL_Context *gc; + Evas_GL_Context *gc; const char *s; int i; #if 1 if (_evas_gl_common_context) { - _evas_gl_common_context->references++; - return _evas_gl_common_context; + _evas_gl_common_context->references++; + return _evas_gl_common_context; } #endif if (!_evas_gl_common_version_check()) return NULL; - gc = calloc(1, sizeof(Evas_Engine_GL_Context)); + gc = calloc(1, sizeof(Evas_GL_Context)); if (!gc) return NULL; gl_symbols(); @@ -777,7 +776,7 @@ evas_gl_common_context_new(void) } void -evas_gl_common_context_free(Evas_Engine_GL_Context *gc) +evas_gl_common_context_free(Evas_GL_Context *gc) { int i, j; Eina_List *l; @@ -841,7 +840,7 @@ evas_gl_common_context_free(Evas_Engine_GL_Context *gc) } void -evas_gl_common_context_use(Evas_Engine_GL_Context *gc) +evas_gl_common_context_use(Evas_GL_Context *gc) { if (_evas_gl_common_context == gc) return; _evas_gl_common_context = gc; @@ -849,7 +848,7 @@ evas_gl_common_context_use(Evas_Engine_GL_Context *gc) } void -evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc) +evas_gl_common_context_newframe(Evas_GL_Context *gc) { int i; @@ -960,7 +959,7 @@ evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc) } void -evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot) +evas_gl_common_context_resize(Evas_GL_Context *gc, int w, int h, int rot) { if ((gc->w == w) && (gc->h == h) && (gc->rot == rot)) return; evas_gl_common_context_flush(gc); @@ -972,7 +971,7 @@ evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot) } void -evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc, +evas_gl_common_context_target_surface_set(Evas_GL_Context *gc, Evas_GL_Image *surface) { if (surface == gc->pipe[0].shader.surface) return; @@ -1040,7 +1039,7 @@ evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc, static inline void -array_alloc(Evas_Engine_GL_Context *gc, int n) +array_alloc(Evas_GL_Context *gc, int n) { gc->havestuff = EINA_TRUE; if (gc->pipe[n].array.num <= gc->pipe[n].array.alloc) return; @@ -1066,7 +1065,7 @@ array_alloc(Evas_Engine_GL_Context *gc, int n) } static int -pipe_region_intersects(Evas_Engine_GL_Context *gc, int n, +pipe_region_intersects(Evas_GL_Context *gc, int n, int x, int y, int w, int h) { int i, rx, ry, rw, rh, ii; @@ -1105,7 +1104,7 @@ pipe_region_intersects(Evas_Engine_GL_Context *gc, int n, } static void -pipe_region_expand(Evas_Engine_GL_Context *gc, int n, +pipe_region_expand(Evas_GL_Context *gc, int n, int x, int y, int w, int h) { int x1, y1, x2, y2; @@ -1133,7 +1132,7 @@ pipe_region_expand(Evas_Engine_GL_Context *gc, int n, } static Eina_Bool -vertex_array_size_check(Evas_Engine_GL_Context *gc, int pn, int n) +vertex_array_size_check(Evas_GL_Context *gc, int pn, int n) { return 1; // this fixup breaks for expedite test 32. why? @@ -1146,7 +1145,7 @@ vertex_array_size_check(Evas_Engine_GL_Context *gc, int pn, int n) } void -evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc, +evas_gl_common_context_line_push(Evas_GL_Context *gc, int x1, int y1, int x2, int y2, int clip, int cx, int cy, int cw, int ch, int r, int g, int b, int a) @@ -1202,11 +1201,7 @@ evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc, } void -<<<<<<< HEAD -evas_gl_common_context_rectangle_push(Evas_Engine_GL_Context *gc, -======= evas_gl_common_context_rectangle_push(Evas_GL_Context *gc, ->>>>>>> EFL_upgrade[add] int x, int y, int w, int h, int r, int g, int b, int a) { @@ -1353,7 +1348,7 @@ again: } void -evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc, +evas_gl_common_context_image_push(Evas_GL_Context *gc, Evas_GL_Texture *tex, double sx, double sy, double sw, double sh, int x, int y, int w, int h, @@ -1559,9 +1554,9 @@ again: if ((tex->im) && (tex->im->native.data) && (!tex->im->native.yinvert)) { tx1 = ((double)(tex->x) + sx) / (double)tex->pt->w; - ty1 = 1.0 - ((double)(tex->y) + sy) / (double)tex->pt->h; + ty1 = ((double)(tex->y) + sy + sh) / (double)tex->pt->h; tx2 = ((double)(tex->x) + sx + sw) / (double)tex->pt->w; - ty2 = 1.0 - ((double)(tex->y) + sy + sh) / (double)tex->pt->h; + ty2 = ((double)(tex->y) + sy) / (double)tex->pt->h; } else { @@ -1844,7 +1839,7 @@ again: void -evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc, +evas_gl_common_context_font_push(Evas_GL_Context *gc, Evas_GL_Texture *tex, double sx, double sy, double sw, double sh, int x, int y, int w, int h, @@ -2003,7 +1998,7 @@ again: } void -evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc, +evas_gl_common_context_yuv_push(Evas_GL_Context *gc, Evas_GL_Texture *tex, double sx, double sy, double sw, double sh, int x, int y, int w, int h, @@ -2190,7 +2185,7 @@ again: } void -evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc, +evas_gl_common_context_image_map_push(Evas_GL_Context *gc, Evas_GL_Texture *tex, int npoints, RGBA_Map_Point *p, @@ -2585,13 +2580,13 @@ again: } void -evas_gl_common_context_flush(Evas_Engine_GL_Context *gc) +evas_gl_common_context_flush(Evas_GL_Context *gc) { shader_array_flush(gc); } static void -shader_array_flush(Evas_Engine_GL_Context *gc) +shader_array_flush(Evas_GL_Context *gc) { int i, gw, gh, setclip, cy, fbo = 0, done = 0; diff --git a/src/modules/engines/gl_common/evas_gl_font.c b/src/modules/engines/gl_common/evas_gl_font.c index d867a09..ac0edf8 100644 --- a/src/modules/engines/gl_common/evas_gl_font.c +++ b/src/modules/engines/gl_common/evas_gl_font.c @@ -3,7 +3,7 @@ void * evas_gl_font_texture_new(void *context, RGBA_Font_Glyph *fg) { - Evas_Engine_GL_Context *gc = context; + Evas_GL_Context *gc = context; Evas_GL_Texture *tex; DATA8 *data; int w, h, j, nw; @@ -99,7 +99,7 @@ evas_gl_font_texture_free(void *tex) void evas_gl_font_texture_draw(void *context, void *surface __UNUSED__, void *draw_context, RGBA_Font_Glyph *fg, int x, int y) { - Evas_Engine_GL_Context *gc = context; + Evas_GL_Context *gc = context; RGBA_Draw_Context *dc = draw_context; Evas_GL_Texture *tex; Cutout_Rects *rects; diff --git a/src/modules/engines/gl_common/evas_gl_image.c b/src/modules/engines/gl_common/evas_gl_image.c index 75e9ce6..e119df9 100644 --- a/src/modules/engines/gl_common/evas_gl_image.c +++ b/src/modules/engines/gl_common/evas_gl_image.c @@ -1,7 +1,7 @@ #include "evas_gl_private.h" void -evas_gl_common_image_all_unload(Evas_Engine_GL_Context *gc) +evas_gl_common_image_all_unload(Evas_GL_Context *gc) { Eina_List *l; Evas_GL_Image *im; @@ -21,7 +21,7 @@ evas_gl_common_image_all_unload(Evas_Engine_GL_Context *gc) } static void -_evas_gl_image_cache_trim(Evas_Engine_GL_Context *gc) +_evas_gl_image_cache_trim(Evas_GL_Context *gc) { int size = evas_common_image_get_cache(); @@ -97,7 +97,7 @@ evas_gl_common_image_unref(Evas_GL_Image *im) } Evas_GL_Image * -evas_gl_common_image_load(Evas_Engine_GL_Context *gc, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error) +evas_gl_common_image_load(Evas_GL_Context *gc, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error) { Evas_GL_Image *im; RGBA_Image *im_im; @@ -142,7 +142,7 @@ evas_gl_common_image_load(Evas_Engine_GL_Context *gc, const char *file, const ch } Evas_GL_Image * -evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace) +evas_gl_common_image_new_from_data(Evas_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace) { Evas_GL_Image *im; Eina_List *l; @@ -196,7 +196,7 @@ evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, unsigned int w, u } Evas_GL_Image * -evas_gl_common_image_new_from_copied_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace) +evas_gl_common_image_new_from_copied_data(Evas_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace) { Evas_GL_Image *im; @@ -237,7 +237,7 @@ evas_gl_common_image_new_from_copied_data(Evas_Engine_GL_Context *gc, unsigned i } Evas_GL_Image * -evas_gl_common_image_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, int cspace) +evas_gl_common_image_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha, int cspace) { Evas_GL_Image *im; @@ -425,7 +425,7 @@ evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint) } void -evas_gl_common_image_cache_flush(Evas_Engine_GL_Context *gc) +evas_gl_common_image_cache_flush(Evas_GL_Context *gc) { _evas_gl_image_cache_trim(gc); } @@ -453,7 +453,7 @@ evas_gl_common_image_free(Evas_GL_Image *im) } Evas_GL_Image * -evas_gl_common_image_surface_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha) +evas_gl_common_image_surface_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha) { Evas_GL_Image *im; @@ -486,7 +486,7 @@ evas_gl_common_image_dirty(Evas_GL_Image *im, unsigned int x, unsigned int y, un } static void -_evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im) +_evas_gl_common_image_update(Evas_GL_Context *gc, Evas_GL_Image *im) { if (!im->im) return; /* @@ -553,7 +553,7 @@ _evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im) } void -evas_gl_common_image_map_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, +evas_gl_common_image_map_draw(Evas_GL_Context *gc, Evas_GL_Image *im, int npoints, RGBA_Map_Point *p, int smooth, int level __UNUSED__) { RGBA_Draw_Context *dc; @@ -590,7 +590,7 @@ evas_gl_common_image_map_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, } void -evas_gl_common_image_draw(Evas_Engine_GL_Context *gc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth) +evas_gl_common_image_draw(Evas_GL_Context *gc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth) { RGBA_Draw_Context *dc; Evas_GL_Image *imm; diff --git a/src/modules/engines/gl_common/evas_gl_line.c b/src/modules/engines/gl_common/evas_gl_line.c index a76fa6a..33a3187 100644 --- a/src/modules/engines/gl_common/evas_gl_line.c +++ b/src/modules/engines/gl_common/evas_gl_line.c @@ -1,7 +1,7 @@ #include "evas_gl_private.h" void -evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, int x1, int y1, int x2, int y2) +evas_gl_common_line_draw(Evas_GL_Context *gc, int x1, int y1, int x2, int y2) { RGBA_Draw_Context *dc; int r, g, b, a; diff --git a/src/modules/engines/gl_common/evas_gl_polygon.c b/src/modules/engines/gl_common/evas_gl_polygon.c index fa6b312..fda1400 100644 --- a/src/modules/engines/gl_common/evas_gl_polygon.c +++ b/src/modules/engines/gl_common/evas_gl_polygon.c @@ -120,7 +120,7 @@ polygon_edge_sorter(const void *a, const void *b) } void -evas_gl_common_poly_draw(Evas_Engine_GL_Context *gc, Evas_GL_Polygon *poly, int dx, int dy) +evas_gl_common_poly_draw(Evas_GL_Context *gc, Evas_GL_Polygon *poly, int dx, int dy) { Cutout_Rects *rects; Cutout_Rect *r; diff --git a/src/modules/engines/gl_common/evas_gl_rectangle.c b/src/modules/engines/gl_common/evas_gl_rectangle.c index 2714cfd..a5cbece 100644 --- a/src/modules/engines/gl_common/evas_gl_rectangle.c +++ b/src/modules/engines/gl_common/evas_gl_rectangle.c @@ -1,7 +1,7 @@ #include "evas_gl_private.h" void -evas_gl_common_rect_draw(Evas_Engine_GL_Context *gc, int x, int y, int w, int h) +evas_gl_common_rect_draw(Evas_GL_Context *gc, int x, int y, int w, int h) { Cutout_Rects *rects; Cutout_Rect *r; diff --git a/src/modules/engines/gl_common/evas_gl_texture.c b/src/modules/engines/gl_common/evas_gl_texture.c index 6e8246b..0810472 100644 --- a/src/modules/engines/gl_common/evas_gl_texture.c +++ b/src/modules/engines/gl_common/evas_gl_texture.c @@ -63,7 +63,7 @@ _nearest_pow2(int num) } static void -_tex_adjust(Evas_Engine_GL_Context *gc, int *w, int *h) +_tex_adjust(Evas_GL_Context *gc, int *w, int *h) { if (gc->shared->info.tex_npo2) return; /*if (gc->shared->info.tex_rect) return;*/ @@ -72,7 +72,7 @@ _tex_adjust(Evas_Engine_GL_Context *gc, int *w, int *h) } static int -_tex_round_slot(Evas_Engine_GL_Context *gc, int h) +_tex_round_slot(Evas_GL_Context *gc, int h) { if (!gc->shared->info.tex_npo2) h = _nearest_pow2(h); @@ -117,7 +117,7 @@ _tex_sub_2d(int x, int y, int w, int h, int fmt, int type, const void *pix) } static Evas_GL_Texture_Pool * -_pool_tex_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, GLenum format) +_pool_tex_new(Evas_GL_Context *gc, int w, int h, int intformat, GLenum format) { Evas_GL_Texture_Pool *pt; @@ -215,7 +215,7 @@ _pool_tex_alloc(Evas_GL_Texture_Pool *pt, int w, int h __UNUSED__, int *u, int * } static Evas_GL_Texture_Pool * -_pool_tex_find(Evas_Engine_GL_Context *gc, int w, int h, +_pool_tex_find(Evas_GL_Context *gc, int w, int h, int intformat, int format, int *u, int *v, Eina_List **l_after, int atlas_w) { @@ -264,7 +264,7 @@ _pool_tex_find(Evas_Engine_GL_Context *gc, int w, int h, } Evas_GL_Texture * -evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im) +evas_gl_common_texture_new(Evas_GL_Context *gc, RGBA_Image *im) { Evas_GL_Texture *tex; Eina_List *l_after = NULL; @@ -331,7 +331,7 @@ evas_gl_common_texture_new(Evas_Engine_GL_Context *gc, RGBA_Image *im) } static Evas_GL_Texture_Pool * -_pool_tex_render_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, int format) +_pool_tex_render_new(Evas_GL_Context *gc, int w, int h, int intformat, int format) { Evas_GL_Texture_Pool *pt; @@ -396,7 +396,7 @@ _pool_tex_render_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, in } static Evas_GL_Texture_Pool * -_pool_tex_native_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, int format, Evas_GL_Image *im) +_pool_tex_native_new(Evas_GL_Context *gc, int w, int h, int intformat, int format, Evas_GL_Image *im) { Evas_GL_Texture_Pool *pt; @@ -457,7 +457,7 @@ _pool_tex_native_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, in } static Evas_GL_Texture_Pool * -_pool_tex_dynamic_new(Evas_Engine_GL_Context *gc, int w, int h, int intformat, int format) +_pool_tex_dynamic_new(Evas_GL_Context *gc, int w, int h, int intformat, int format) { Evas_GL_Texture_Pool *pt = NULL; @@ -696,7 +696,7 @@ pt_unref(Evas_GL_Texture_Pool *pt) } Evas_GL_Texture * -evas_gl_common_texture_native_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_GL_Image *im) +evas_gl_common_texture_native_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_GL_Image *im) { Evas_GL_Texture *tex; @@ -734,7 +734,7 @@ evas_gl_common_texture_native_new(Evas_Engine_GL_Context *gc, unsigned int w, un } Evas_GL_Texture * -evas_gl_common_texture_render_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha) +evas_gl_common_texture_render_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha) { Evas_GL_Texture *tex; @@ -772,7 +772,7 @@ evas_gl_common_texture_render_new(Evas_Engine_GL_Context *gc, unsigned int w, un } Evas_GL_Texture * -evas_gl_common_texture_dynamic_new(Evas_Engine_GL_Context *gc, Evas_GL_Image *im) +evas_gl_common_texture_dynamic_new(Evas_GL_Context *gc, Evas_GL_Image *im) { Evas_GL_Texture *tex; @@ -916,7 +916,7 @@ evas_gl_common_texture_free(Evas_GL_Texture *tex) } Evas_GL_Texture * -evas_gl_common_texture_alpha_new(Evas_Engine_GL_Context *gc, DATA8 *pixels, +evas_gl_common_texture_alpha_new(Evas_GL_Context *gc, DATA8 *pixels, unsigned int w, unsigned int h, int fh) { Evas_GL_Texture *tex; @@ -973,7 +973,7 @@ evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, } Evas_GL_Texture * -evas_gl_common_texture_yuv_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h) +evas_gl_common_texture_yuv_new(Evas_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h) { Evas_GL_Texture *tex; diff --git a/src/modules/engines/gl_glew/Makefile.am b/src/modules/engines/gl_glew/Makefile.am index 13307f7..2042b4a 100644 --- a/src/modules/engines/gl_glew/Makefile.am +++ b/src/modules/engines/gl_glew/Makefile.am @@ -18,13 +18,13 @@ evas_glew_win32_main.c GL_GLEW_LIBADD = @evas_engine_gl_glew_libs@ $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la +pkgdir = $(libdir)/evas/modules/engines/gl_glew/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_GL_Glew.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_GL_GLEW -pkgdir = $(libdir)/evas/modules/engines/gl_glew/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(GL_GLEW_SOURCES) diff --git a/src/modules/engines/gl_glew/evas_engine.h b/src/modules/engines/gl_glew/evas_engine.h index 46393fb..d38c4fa 100644 --- a/src/modules/engines/gl_glew/evas_engine.h +++ b/src/modules/engines/gl_glew/evas_engine.h @@ -48,7 +48,7 @@ struct _Evas_GL_Glew_Window int width; int height; int depth; - Evas_Engine_GL_Context *gl_context; + Evas_GL_Context *gl_context; struct { int x1; int y1; diff --git a/src/modules/engines/gl_sdl/Makefile.am b/src/modules/engines/gl_sdl/Makefile.am index 57da21b..4af0ed5 100644 --- a/src/modules/engines/gl_sdl/Makefile.am +++ b/src/modules/engines/gl_sdl/Makefile.am @@ -17,13 +17,13 @@ evas_engine.c GL_SDL_LIBADD = @evas_engine_gl_sdl_libs@ $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la +pkgdir = $(libdir)/evas/modules/engines/gl_sdl/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_GL_SDL.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_GL_SDL -pkgdir = $(libdir)/evas/modules/engines/gl_sdl/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(GL_SDL_SOURCES) diff --git a/src/modules/engines/gl_sdl/evas_engine.h b/src/modules/engines/gl_sdl/evas_engine.h index 7d46720..36d91b4 100644 --- a/src/modules/engines/gl_sdl/evas_engine.h +++ b/src/modules/engines/gl_sdl/evas_engine.h @@ -55,7 +55,7 @@ struct _Render_Engine Evas_Engine_Info_GL_SDL *info; int w, h; - Evas_Engine_GL_Context *gl_context; + Evas_GL_Context *gl_context; struct { int redraw : 1; int drew : 1; diff --git a/src/modules/engines/gl_x11/Makefile.am b/src/modules/engines/gl_x11/Makefile.am index 91cd0d4..de391da 100644 --- a/src/modules/engines/gl_x11/Makefile.am +++ b/src/modules/engines/gl_x11/Makefile.am @@ -18,13 +18,13 @@ evas_x_main.c GL_X11_LIBADD = @evas_engine_gl_x11_libs@ $(top_builddir)/src/modules/engines/gl_common/libevas_engine_gl_common.la +pkgdir = $(libdir)/evas/modules/engines/gl_x11/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_GL_X11.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_GL_X11 -pkgdir = $(libdir)/evas/modules/engines/gl_x11/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(GL_X11_SOURCES) diff --git a/src/modules/engines/gl_x11/evas_engine.c b/src/modules/engines/gl_x11/evas_engine.c index f943209..8523df4 100644 --- a/src/modules/engines/gl_x11/evas_engine.c +++ b/src/modules/engines/gl_x11/evas_engine.c @@ -66,8 +66,7 @@ int (*glsym_glXWaitVideoSync) (int a, int b, unsigned int *c) = NULL; XID (*glsym_glXCreatePixmap) (Display *a, void *b, Pixmap c, const int *d) = NULL; void (*glsym_glXDestroyPixmap) (Display *a, XID b) = NULL; void (*glsym_glXQueryDrawable) (Display *a, XID b, int c, unsigned int *d) = NULL; -int (*glsym_glxSwapIntervalSGI) (int a) = NULL; -void (*glsym_glxSwapIntervalEXT) (Display *s, GLXDrawable b, int c) = NULL; +void (*glsym_glxSwapInterval) (int a) = NULL; #endif static void @@ -141,10 +140,10 @@ _sym_init(void) FINDSYM(glsym_glXQueryDrawable, "glXQueryDrawableEXT", glsym_func_void); FINDSYM(glsym_glXQueryDrawable, "glXQueryDrawableARB", glsym_func_void); - FINDSYM(glsym_glxSwapIntervalSGI, "glXSwapIntervalMESA", glsym_func_int); - FINDSYM(glsym_glxSwapIntervalSGI, "glXSwapIntervalSGI", glsym_func_int); - - FINDSYM(glsym_glxSwapIntervalEXT, "glXSwapIntervalEXT", glsym_func_void); + FINDSYM(glsym_glxSwapInterval, "glxSwapInterval", glsym_func_void); + FINDSYM(glsym_glxSwapInterval, "glxSwapIntervalEXT", glsym_func_void); + FINDSYM(glsym_glxSwapInterval, "glxSwapIntervalARB", glsym_func_void); + FINDSYM(glsym_glxSwapInterval, "glxSwapIntervalSGI", glsym_func_void); #endif } @@ -669,21 +668,12 @@ eng_output_flush(void *data) #ifdef VSYNC_TO_SCREEN if ((re->info->vsync)/* || (1)*/) { - if (glsym_glxSwapIntervalEXT) - { - if (!re->vsync) - { - if (re->info->vsync) glsym_glxSwapIntervalEXT(re->win->disp, re->win->win, 1); - else glsym_glxSwapIntervalEXT(re->win->disp, re->win->win, 0); - re->vsync = 1; - } - } - if (glsym_glxSwapIntervalSGI) + if (glsym_glxSwapInterval) { if (!re->vsync) { - if (re->info->vsync) glsym_glxSwapIntervalSGI(1); - else glsym_glxSwapIntervalSGI(0); + if (re->info->vsync) glsym_glxSwapInterval(1); + else glsym_glxSwapInterval(0); re->vsync = 1; } } diff --git a/src/modules/engines/gl_x11/evas_engine.h b/src/modules/engines/gl_x11/evas_engine.h index 0d63f9d..30a0c04 100644 --- a/src/modules/engines/gl_x11/evas_engine.h +++ b/src/modules/engines/gl_x11/evas_engine.h @@ -82,7 +82,7 @@ struct _Evas_GL_X11_Window int depth; int alpha; int rot; - Evas_Engine_GL_Context *gl_context; + Evas_GL_Context *gl_context; struct { int redraw : 1; int drew : 1; diff --git a/src/modules/engines/gl_x11/evas_x_main.c b/src/modules/engines/gl_x11/evas_x_main.c index e370e75..95437dd 100644 --- a/src/modules/engines/gl_x11/evas_x_main.c +++ b/src/modules/engines/gl_x11/evas_x_main.c @@ -285,7 +285,6 @@ eng_window_new(Display *disp, { int i, j, num; GLXFBConfig *fbc; - int blacklist = 0; if (gw->glxwin) { @@ -318,99 +317,20 @@ eng_window_new(Display *disp, fprintf(stderr, "renderer: %s\n", renderer); fprintf(stderr, "version: %s\n", version); } - // examples: - // vendor: NVIDIA Corporation - // renderer: NVIDIA Tegra - // version: OpenGL ES 2.0 - // or - // vendor: Imagination Technologies - // renderer: PowerVR SGX 540 - // version: OpenGL ES 2.0 - // or - // vendor: NVIDIA Corporation - // renderer: GeForce GT 330M/PCI/SSE2 - // version: 3.3.0 NVIDIA 256.53 - // or - // vendor: NVIDIA Corporation - // renderer: GeForce GT 220/PCI/SSE2 - // version: 3.2.0 NVIDIA 195.36.24 - // or - // vendor: NVIDIA Corporation - // renderer: GeForce 8600 GTS/PCI/SSE2 - // version: 3.3.0 NVIDIA 260.19.36 - // or - // vendor: ATI Technologies Inc. - // renderer: ATI Mobility Radeon HD 4650 - // version: 3.2.9756 Compatibility Profile Context - // or - // vendor: Tungsten Graphics, Inc - // renderer: Mesa DRI Mobile Intel® GM45 Express Chipset GEM 20100330 DEVELOPMENT x86/MMX/SSE2 - // version: 2.1 Mesa 7.9-devel - // or - // vendor: Advanced Micro Devices, Inc. - // renderer: Mesa DRI R600 (RS780 9610) 20090101 TCL DRI2 - // version: 2.1 Mesa 7.9-devel - // or - // vendor: NVIDIA Corporation - // renderer: GeForce 9600 GT/PCI/SSE2 - // version: 3.3.0 NVIDIA 260.19.29 - // or - // vendor: ATI Technologies Inc. - // renderer: ATI Radeon HD 4800 Series - // version: 3.3.10237 Compatibility Profile Context - // or - // vendor: Advanced Micro Devices, Inc. - // renderer: Mesa DRI R600 (RV770 9442) 20090101 TCL DRI2 - // version: 2.0 Mesa 7.8.2 - // or - // vendor: Tungsten Graphics, Inc - // renderer: Mesa DRI Mobile Intel® GM45 Express Chipset GEM 20100330 DEVELOPMENT - // version: 2.1 Mesa 7.9-devel - // or (bad - software renderer) - // vendor: Mesa Project - // renderer: Software Rasterizer - // version: 2.1 Mesa 7.9-devel - // or (bad - software renderer) - // vendor: VMware, Inc. - // renderer: Gallium 0.4 on softpipe - // version: 2.1 Mesa 7.9-devel - - if (strstr((const char *)vendor, "Mesa Project")) - { - if (strstr((const char *)renderer, "Software Rasterizer")) - blacklist = 1; - } - if (strstr((const char *)renderer, "softpipe")) - blacklist = 1; - if (blacklist) - { - ERR("OpenGL Driver blacklisted:"); - ERR("Vendor: %s", (const char *)vendor); - ERR("Renderer: %s", (const char *)renderer); - ERR("Version: %s", (const char *)version); - eng_window_free(gw); - return NULL; - } - if (strstr((const char *)vendor, "NVIDIA")) + if (strstr((const char*)vendor, "NVIDIA")) + // FIXME: also same as tegra2 - maybe check renderer too + // + // vendor: NVIDIA Corporation + // renderer: NVIDIA Tegra + // version: OpenGL ES 2.0 + // + // vs (for example) + // + // vendor: NVIDIA Corporation + // renderer: GeForce GT 220/PCI/SSE2 + // version: 3.2.0 NVIDIA 195.36.24 { - if (!strstr((const char *)renderer, "NVIDIA Tegra")) - { - int v1 = 0, v2 = 0, v3 = 0; - - if (sscanf((const char *)version, - "%*s %*s %i.%i.%i", - &v1, &v2, &v3) != 3) - { - v1 = v2 = v3 = 0; - if (sscanf((const char *)version, - "%*s %*s %i.%i", - &v1, &v2) != 2) - v1 = 0; - } - // ALSO as of some nvidia driver version loose binding is - // probably not needed - if (v1 < 195) gw->detected.loose_binding = 1; - } + gw->detected.loose_binding = 1; } else { diff --git a/src/modules/engines/quartz/Makefile.am b/src/modules/engines/quartz/Makefile.am index 17be2de..df92e17 100644 --- a/src/modules/engines/quartz/Makefile.am +++ b/src/modules/engines/quartz/Makefile.am @@ -14,13 +14,13 @@ if BUILD_ENGINE_QUARTZ QUARTZ_SOURCES = evas_engine.c QUARTZ_LIBADD = @evas_engine_quartz_libs@ +pkgdir = $(libdir)/evas/modules/engines/quartz/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_Quartz.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_QUARTZ -pkgdir = $(libdir)/evas/modules/engines/quartz/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(QUARTZ_SOURCES) diff --git a/src/modules/engines/software_16/Makefile.am b/src/modules/engines/software_16/Makefile.am index 1735d7b..47eaf10 100644 --- a/src/modules/engines/software_16/Makefile.am +++ b/src/modules/engines/software_16/Makefile.am @@ -15,10 +15,10 @@ if BUILD_ENGINE_SOFTWARE_16 SOFTWARE_16_SOURCES = evas_engine.c +pkgdir = $(libdir)/evas/modules/engines/software_16/$(MODULE_ARCH) if !EVAS_STATIC_BUILD_SOFTWARE_16 -pkgdir = $(libdir)/evas/modules/engines/software_16/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(SOFTWARE_16_SOURCES) module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la diff --git a/src/modules/engines/software_16_ddraw/Makefile.am b/src/modules/engines/software_16_ddraw/Makefile.am index d32019e..c075691 100644 --- a/src/modules/engines/software_16_ddraw/Makefile.am +++ b/src/modules/engines/software_16_ddraw/Makefile.am @@ -20,13 +20,13 @@ evas_ddraw_main.cpp SOFTWARE_16_DDRAW_LIBADD = @evas_engine_software_16_ddraw_libs@ +pkgdir = $(libdir)/evas/modules/engines/software_16_ddraw/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_Software_16_DDraw.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW -pkgdir = $(libdir)/evas/modules/engines/software_16_ddraw/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(SOFTWARE_16_DDRAW_SOURCES) diff --git a/src/modules/engines/software_16_sdl/Makefile.am b/src/modules/engines/software_16_sdl/Makefile.am index 5a8dc2f..bcaa15b 100644 --- a/src/modules/engines/software_16_sdl/Makefile.am +++ b/src/modules/engines/software_16_sdl/Makefile.am @@ -10,13 +10,13 @@ SOFTWARE_SDL_SOURCES = \ evas_engine.c \ evas_engine.h +pkgdir = $(libdir)/evas/modules/engines/software_16_sdl/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_SDL_16.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_SOFTWARE_SDL -pkgdir = $(libdir)/evas/modules/engines/software_16_sdl/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(SOFTWARE_SDL_SOURCES) diff --git a/src/modules/engines/software_16_wince/Makefile.am b/src/modules/engines/software_16_wince/Makefile.am index d7e39b4..984b418 100644 --- a/src/modules/engines/software_16_wince/Makefile.am +++ b/src/modules/engines/software_16_wince/Makefile.am @@ -22,13 +22,13 @@ evas_wince_gdi_buffer.c SOFTWARE_16_WINCE_LIBADD = @evas_engine_software_16_wince_libs@ +pkgdir = $(libdir)/evas/modules/engines/software_16_wince/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_Software_16_WinCE.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_SOFTWARE_16_WINCE -pkgdir = $(libdir)/evas/modules/engines/software_16_wince/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(SOFTWARE_16_WINCE_SOURCE) diff --git a/src/modules/engines/software_16_x11/Makefile.am b/src/modules/engines/software_16_x11/Makefile.am index dc24584..979f315 100644 --- a/src/modules/engines/software_16_x11/Makefile.am +++ b/src/modules/engines/software_16_x11/Makefile.am @@ -19,13 +19,13 @@ evas_x_buffer.c SOFTWARE_16_X11_LIBADD = @evas_engine_software_16_x11_libs@ +pkgdir = $(libdir)/evas/modules/engines/software_16_x11/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_Software_16_X11.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_SOFTWARE_16_X11 -pkgdir = $(libdir)/evas/modules/engines/software_16_x11/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(SOFTWARE_16_X11_SOURCES) diff --git a/src/modules/engines/software_8/Makefile.am b/src/modules/engines/software_8/Makefile.am index 4c48018..9f100f6 100644 --- a/src/modules/engines/software_8/Makefile.am +++ b/src/modules/engines/software_8/Makefile.am @@ -15,10 +15,10 @@ if BUILD_ENGINE_SOFTWARE_8 SOFTWARE_8_SOURCES = evas_engine.c +pkgdir = $(libdir)/evas/modules/engines/software_8/$(MODULE_ARCH) if !EVAS_STATIC_BUILD_SOFTWARE_8_X11 -pkgdir = $(libdir)/evas/modules/engines/software_8/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(SOFTWARE_8_SOURCES) module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la diff --git a/src/modules/engines/software_8_x11/Makefile.am b/src/modules/engines/software_8_x11/Makefile.am index bfb2b9b..497fe84 100644 --- a/src/modules/engines/software_8_x11/Makefile.am +++ b/src/modules/engines/software_8_x11/Makefile.am @@ -20,13 +20,13 @@ evas_x_buffer.c SOFTWARE_8_X11_LIBADD = @evas_engine_software_8_x11_libs@ +pkgdir = $(libdir)/evas/modules/engines/software_8_x11/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_Software_8_X11.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_SOFTWARE_8_X11 -pkgdir = $(libdir)/evas/modules/engines/software_8_x11/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(SOFTWARE_8_X11_SOURCES) diff --git a/src/modules/engines/software_ddraw/Makefile.am b/src/modules/engines/software_ddraw/Makefile.am index 7a5856e..440e291 100644 --- a/src/modules/engines/software_ddraw/Makefile.am +++ b/src/modules/engines/software_ddraw/Makefile.am @@ -20,13 +20,13 @@ evas_ddraw_main.cpp SOFTWARE_DDRAW_LIBADD = @evas_engine_software_ddraw_libs@ +pkgdir = $(libdir)/evas/modules/engines/software_ddraw/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_Software_DDraw.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_SOFTWARE_DDRAW -pkgdir = $(libdir)/evas/modules/engines/software_ddraw/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(SOFTWARE_DDRAW_SOURCES) module_la_CXXFLAGS = -fno-rtti -fno-exceptions diff --git a/src/modules/engines/software_gdi/Makefile.am b/src/modules/engines/software_gdi/Makefile.am index 02a60c0..dfebabe 100644 --- a/src/modules/engines/software_gdi/Makefile.am +++ b/src/modules/engines/software_gdi/Makefile.am @@ -20,13 +20,13 @@ evas_gdi_main.c SOFTWARE_GDI_LIBADD = @evas_engine_software_gdi_libs@ +pkgdir = $(libdir)/evas/modules/engines/software_gdi/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_Software_Gdi.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_SOFTWARE_GDI -pkgdir = $(libdir)/evas/modules/engines/software_gdi/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(SOFTWARE_GDI_SOURCES) module_la_LIBADD = $(top_builddir)/src/lib/libevas.la @EINA_LIBS@ $(SOFTWARE_GDI_LIBADD) diff --git a/src/modules/engines/software_generic/Makefile.am b/src/modules/engines/software_generic/Makefile.am index 8278969..de7f982 100644 --- a/src/modules/engines/software_generic/Makefile.am +++ b/src/modules/engines/software_generic/Makefile.am @@ -13,10 +13,10 @@ AM_CFLAGS = @WIN32_CFLAGS@ SOFTWARE_GENERIC_SOURCES = evas_engine.c +pkgdir = $(libdir)/evas/modules/engines/software_generic/$(MODULE_ARCH) if !EVAS_STATIC_BUILD_SOFTWARE_GENERIC -pkgdir = $(libdir)/evas/modules/engines/software_generic/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(SOFTWARE_GENERIC_SOURCES) diff --git a/src/modules/engines/software_qtopia/Makefile.am b/src/modules/engines/software_qtopia/Makefile.am index fdbd47c..a4202a9 100644 --- a/src/modules/engines/software_qtopia/Makefile.am +++ b/src/modules/engines/software_qtopia/Makefile.am @@ -21,13 +21,13 @@ evas_qt_main.cpp SOFTWARE_QTOPIA_LIBADD = @evas_engine_software_qtopia_libs@ +pkgdir = $(libdir)/evas/modules/engines/software_qtopia/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_Software_Qtopia.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_SOFTWARE_QTOPIA -pkgdir = $(libdir)/evas/modules/engines/software_qtopia/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(SOFTWARE_QTOPIA_SOURCES) module_la_LIBADD = @EINA_LIBS@ $(SOFTWARE_QTOPIA_LIBADD) $(top_builddir)/src/lib/libevas.la diff --git a/src/modules/engines/software_sdl/Makefile.am b/src/modules/engines/software_sdl/Makefile.am index 57892f6..4e3e386 100644 --- a/src/modules/engines/software_sdl/Makefile.am +++ b/src/modules/engines/software_sdl/Makefile.am @@ -17,13 +17,13 @@ if BUILD_ENGINE_SOFTWARE_SDL SOFTWARE_SDL_SOURCES = evas_engine.c SOFTWARE_SDL_LIBADD = @evas_engine_software_sdl_libs@ +pkgdir = $(libdir)/evas/modules/engines/software_sdl/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_SDL.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_SOFTWARE_SDL -pkgdir = $(libdir)/evas/modules/engines/software_sdl/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(SOFTWARE_SDL_SOURCES) diff --git a/src/modules/engines/software_x11/Makefile.am b/src/modules/engines/software_x11/Makefile.am index 86960b7..7e20f2d 100644 --- a/src/modules/engines/software_x11/Makefile.am +++ b/src/modules/engines/software_x11/Makefile.am @@ -37,12 +37,13 @@ evas_xcb_main.c endif +pkgdir = $(libdir)/evas/modules/engines/software_x11/$(MODULE_ARCH) + includes_HEADERS = Evas_Engine_Software_X11.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_SOFTWARE_X11 -pkgdir = $(libdir)/evas/modules/engines/software_x11/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(SOFTWARE_X11_SOURCES) diff --git a/src/modules/engines/xrender_x11/Makefile.am b/src/modules/engines/xrender_x11/Makefile.am index 4ad72a7..74df4bd 100644 --- a/src/modules/engines/xrender_x11/Makefile.am +++ b/src/modules/engines/xrender_x11/Makefile.am @@ -32,13 +32,13 @@ endif XRENDER_X11_LIBADD = @evas_engine_xrender_xcb_libs@ @evas_engine_xrender_x11_libs@ +pkgdir = $(libdir)/evas/modules/engines/xrender_x11/$(MODULE_ARCH) includes_HEADERS = Evas_Engine_XRender_X11.h includesdir = $(includedir)/evas-@VMAJ@ if !EVAS_STATIC_BUILD_XRENDER_X11 -pkgdir = $(libdir)/evas/modules/engines/xrender_x11/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = $(XRENDER_X11_SOURCES) diff --git a/src/modules/loaders/Makefile.am b/src/modules/loaders/Makefile.am index 222bef1..e1ed01d 100644 --- a/src/modules/loaders/Makefile.am +++ b/src/modules/loaders/Makefile.am @@ -2,12 +2,6 @@ MAINTAINERCLEANFILES = Makefile.in SUBDIRS = -if BUILD_LOADER_BMP -if !EVAS_STATIC_BUILD_BMP -SUBDIRS += bmp -endif -endif - if BUILD_LOADER_EDB if !EVAS_STATIC_BUILD_EDB SUBDIRS += edb @@ -26,12 +20,6 @@ SUBDIRS += gif endif endif -if BUILD_LOADER_ICO -if !EVAS_STATIC_BUILD_ICO -SUBDIRS += ico -endif -endif - if BUILD_LOADER_JPEG if !EVAS_STATIC_BUILD_JPEG SUBDIRS += jpeg @@ -56,27 +44,33 @@ SUBDIRS += svg endif endif -if BUILD_LOADER_TGA -if !EVAS_STATIC_BUILD_TGA -SUBDIRS += tga -endif -endif - if BUILD_LOADER_TIFF if !EVAS_STATIC_BUILD_TIFF SUBDIRS += tiff endif endif -if BUILD_LOADER_WBMP -if !EVAS_STATIC_BUILD_WBMP -SUBDIRS += wbmp -endif -endif - if BUILD_LOADER_XPM if !EVAS_STATIC_BUILD_XPM SUBDIRS += xpm endif endif +if BUILD_LOADER_BMP +if !EVAS_STATIC_BUILD_BMP +SUBDIRS += bmp +endif +endif + +if BUILD_LOADER_TGA +if !EVAS_STATIC_BUILD_TGA +SUBDIRS += tga +endif +endif + +if BUILD_LOADER_WBMP +if !EVAS_STATIC_BUILD_WBMP +SUBDIRS += wbmp +endif +endif + diff --git a/src/modules/loaders/bmp/evas_image_load_bmp.c b/src/modules/loaders/bmp/evas_image_load_bmp.c index 465df6f..a06d807 100644 --- a/src/modules/loaders/bmp/evas_image_load_bmp.c +++ b/src/modules/loaders/bmp/evas_image_load_bmp.c @@ -161,7 +161,6 @@ evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key if (!read_int(f, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all if (image_size == 0) image_size = fsize - offset; - if ((comp == 0) && (bit_count == 32)) hasa = 1; // GIMP seems to store it this way } else if (head_size == 108) // Windows 95/NT4 + (v4) { @@ -436,7 +435,6 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key if (!read_int(f, &tmp2)) goto close_file; important_colors = tmp2; // number of important colors - 0 if all if (image_size == 0) image_size = fsize - offset; - if ((comp == 0) && (bit_count == 32)) hasa = 1; // GIMP seems to store it this way } else if (head_size == 108) // Windows 95/NT4 + (v4) { @@ -951,7 +949,6 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key } else if (bit_count == 32) { - int none_zero_alpha = 0; pix = surface; for (y = 0; y < h; y++) { @@ -962,7 +959,6 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key g = p[1]; r = p[2]; a = p[3]; - if (a) none_zero_alpha = 1; if (!hasa) a = 0xff; *pix = ARGB_JOIN(a, r, g, b); p += 4; @@ -973,17 +969,6 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key if (fix > 0) p += 4 - fix; // align row read if (p >= buffer_end) break; } - if (!none_zero_alpha) - { - ie->flags.alpha = 0; - if (hasa) - { - unsigned int *pixend = pix + (w * h); - - for (pix = surface; pix < pixend; pix++) - A_VAL(pix) = 0xff; - } - } } else goto close_file;