Mathieu Taillefumier <mathieu.taillefumier@free.fr>
Iván Briano <ivan@profusion.mobi>
Gustavo Lima Chaves <glima@profusion.mobi>
-Samsung Electronics <tbd>
+Saumsung Electronics <tbd>
Samsung SAIT <tbd>
-Sung W. Park <sungwoo@gmail.com>
-Jiyoun Park <jy0703.park@samsung.com>
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.
-Evas @VERSION@
+Evas @VERSION@ BETA
******************************************************************************
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
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 <nash@nash.id.uau>
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"
# 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
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,
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])
EVAS_CHECK_IMAGE_LOADER([WBMP], [${want_evas_image_loader_wbmp}])
-EVAS_CHECK_IMAGE_LOADER([ICO], [${want_evas_image_loader_ico}])
#####################################################################
## Cpu based optimizations
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
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"
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
@author Gustavo Lima Chaves <glima@@profusion.mobi>
@author Samsung Electronics <tbd>
@author Samsung SAIT <tbd>
-@author Sung W. Park <sungwoo@@gmail.com>
-@author Jiyoun Park <jy0703.park@@samsung.com>
@date 2000-2011
@section toc Table of Contents
%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.
%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
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
%{_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)
])
-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],
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);
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);
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
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,
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;
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)
{
size_t file_length;
size_t key_length;
struct stat st;
- Image_Timestamp tstamp;
assert(cache != NULL);
#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;
#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)
{
{
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)
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);
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
LKU(im->lock_references);
#endif
- if (references <= 1)
+ if (references == 1)
{
if (!(im->flags.dirty))
{
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
(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;
(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;
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;
{
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
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);
-#include <sys/types.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/mman.h>
-
#include "evas_common.h"
#include "evas_private.h"
#include "../engines/common/evas_convert_color.h"
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;
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 =
{
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.
*
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))
if (o->engine_data)
{
int stride = 0;
-
+
#ifdef EVAS_FRAME_QUEUING
evas_common_pipe_op_image_flush(o->engine_data);
#endif
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
_proxy_subrender(Evas *e, Evas_Object *source)
{
void *ctx;
- Evas_Object *obj2, *clip;
+ Evas_Object *obj2;
int w,h;
if (!source) return;
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,
}
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,
o->cur.opaque_valid = 0;
o->cur.source = NULL;
o->prev = o->cur;
- o->tmpf_fd = -1;
return o;
}
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);
MAGIC_CHECK_END();
/* free obj */
o->magic = 0;
- EVAS_MEMPOOL_FREE(_mp_obj, o);
+ EVAS_MEMPOOL_FREE(_mp_obj,o);
}
static void
/* 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.
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);
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);
* @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)
}
if (v_to_l) free(v_to_l);
-#else
- line = NULL;
#endif
}
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;
* 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 <br> 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.
* 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 <br> 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.
#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;
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,
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);
{
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,
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
{
}
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,
/* 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);
(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)
}
}
#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
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 \
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;
#else
(void) use_kerning;
#endif
-
+/*
if (fi->src->current_size != fi->size)
{
FTLOCK();
FTUNLOCK();
fi->src->current_size = fi->size;
}
-
+*/
im = dst->image.data;
/* Load the glyph according to the first letter of the script, preety
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;
* 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);
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 */
* 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);
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 */
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);
# 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);
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) \
{ "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
// THIS IS DEPRECATED. WILL GO EVENTUALLTY. NO NEED TO SUPPORT ANYMORE
#include "evas_common.h"
-#include <unistd.h>
#ifdef BUILD_PIPE_RENDER
{
RGBA_Font *fn = (RGBA_Font *) _fn;
RGBA_Font_Int *fi;
+ size_t char_index;
if (text_props->info)
{
}
#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);
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)
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;
{
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;
{
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
{
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;
}
}
}
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;
}
int dx, dy;
int x, y, w, h;
- c_tmp.mask = NULL;
c_tmp.use = 1;
c_tmp.x = 0;
c_tmp.y = 0;
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);
#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
#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
#include <Eina.h>
#include "Evas.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
/* macros needed to log message through eina_log */
extern EAPI int _evas_log_dom_global;
#ifdef _EVAS_DEFAULT_LOG_DOM
#ifdef BUILD_PTHREAD
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
+#ifndef __USE_GNU
+#define __USE_GNU
#endif
# include <pthread.h>
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;
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;
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
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;
struct {
int in_move, in_resize;
} doing;
-
- unsigned int ref;
unsigned char delete_me;
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
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
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)
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)
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
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)
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
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;
-struct _Evas_Engine_GL_Context
+struct _Evas_GL_Context
{
int references;
int w, h;
struct _Evas_GL_Texture_Pool
{
- Evas_Engine_GL_Context *gc;
+ Evas_GL_Context *gc;
GLuint texture, fb;
GLuint intformat, format, dataformat;
int w, h;
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;
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;
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,
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,
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,
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 *);
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);
#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
}
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) ||
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();
}
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;
}
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;
}
void
-evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc)
+evas_gl_common_context_newframe(Evas_GL_Context *gc)
{
int i;
}
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);
}
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;
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;
}
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;
}
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;
}
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?
}
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)
}
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)
{
}
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,
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
{
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,
}
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,
}
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,
}
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;
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;
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;
#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;
}
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();
}
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;
}
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;
}
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;
}
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;
}
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);
}
}
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;
}
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;
/*
}
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;
}
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;
#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;
}
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;
#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;
}
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;*/
}
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);
}
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;
}
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)
{
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
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)
int width;
int height;
int depth;
- Evas_Engine_GL_Context *gl_context;
+ Evas_GL_Context *gl_context;
struct {
int x1;
int y1;
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)
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;
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)
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
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
}
#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;
}
}
int depth;
int alpha;
int rot;
- Evas_Engine_GL_Context *gl_context;
+ Evas_GL_Context *gl_context;
struct {
int redraw : 1;
int drew : 1;
{
int i, j, num;
GLXFBConfig *fbc;
- int blacklist = 0;
if (gw->glxwin)
{
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
{
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)
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
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)
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)
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)
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)
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
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)
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
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)
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)
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
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)
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)
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)
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
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
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
+
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)
{
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)
{
}
else if (bit_count == 32)
{
- int none_zero_alpha = 0;
pix = surface;
for (y = 0; y < h; y++)
{
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;
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;