2002-11-08 00:02:15 -08:00
|
|
|
#ifndef EVAS_COMMON_H
|
|
|
|
#define EVAS_COMMON_H
|
|
|
|
|
2018-11-07 10:01:48 -08:00
|
|
|
//#ifdef HAVE_CONFIG_H
|
2011-12-23 03:50:29 -08:00
|
|
|
#include "config.h" /* so that EAPI in Evas.h is correctly defined */
|
2018-11-07 10:01:48 -08:00
|
|
|
//#endif
|
2008-03-14 09:49:49 -07:00
|
|
|
|
2012-02-18 00:33:00 -08:00
|
|
|
#ifdef STDC_HEADERS
|
|
|
|
# include <stdlib.h>
|
|
|
|
# include <stddef.h>
|
|
|
|
#else
|
|
|
|
# ifdef HAVE_STDLIB_H
|
|
|
|
# include <stdlib.h>
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include <ctype.h>
|
2018-01-02 21:23:10 -08:00
|
|
|
#include <stdint.h>
|
2012-02-18 00:33:00 -08:00
|
|
|
#include <unistd.h>
|
|
|
|
|
2011-11-05 10:49:37 -07:00
|
|
|
#ifdef HAVE_ESCAPE
|
|
|
|
# include <Escape.h>
|
|
|
|
#endif
|
|
|
|
|
2011-04-22 04:47:14 -07:00
|
|
|
#ifdef HAVE_PIXMAN
|
|
|
|
#include <pixman.h>
|
|
|
|
#endif
|
|
|
|
|
2012-02-24 03:21:57 -08:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
#ifdef HAVE_EXOTIC
|
|
|
|
# include <Exotic.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <Eina.h>
|
2013-11-20 23:08:55 -08:00
|
|
|
#include <Eo.h>
|
2015-04-03 07:34:22 -07:00
|
|
|
#include <Ector.h>
|
2013-11-20 23:08:55 -08:00
|
|
|
|
|
|
|
#ifdef BUILD_LOADER_EET
|
|
|
|
# include <Eet.h>
|
|
|
|
#endif
|
2016-06-16 00:05:00 -07:00
|
|
|
|
2016-06-20 21:26:15 -07:00
|
|
|
#ifndef EFL_CANVAS_OBJECT_PROTECTED
|
|
|
|
# define EFL_CANVAS_OBJECT_PROTECTED
|
2016-06-16 00:05:00 -07:00
|
|
|
#endif
|
|
|
|
|
2012-02-24 03:21:57 -08:00
|
|
|
#include "Evas.h"
|
|
|
|
|
2017-04-13 15:25:29 -07:00
|
|
|
#include "Evas_Internal.h"
|
|
|
|
|
2017-11-06 18:22:09 -08:00
|
|
|
#include "../common/evas_font.h"
|
|
|
|
|
2015-04-28 05:24:11 -07:00
|
|
|
#ifdef EAPI
|
|
|
|
# undef EAPI
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
2018-01-18 01:04:03 -08:00
|
|
|
# ifdef EFL_BUILD
|
2015-04-28 05:24:11 -07:00
|
|
|
# ifdef DLL_EXPORT
|
|
|
|
# define EAPI __declspec(dllexport)
|
|
|
|
# else
|
|
|
|
# define EAPI
|
2018-01-18 01:04:03 -08:00
|
|
|
# endif
|
2015-04-28 05:24:11 -07:00
|
|
|
# else
|
|
|
|
# define EAPI __declspec(dllimport)
|
2018-01-18 01:04:03 -08:00
|
|
|
# endif
|
2015-04-28 05:24:11 -07:00
|
|
|
#else
|
|
|
|
# ifdef __GNUC__
|
|
|
|
# if __GNUC__ >= 4
|
|
|
|
# define EAPI __attribute__ ((visibility("default")))
|
|
|
|
# else
|
|
|
|
# define EAPI
|
|
|
|
# endif
|
|
|
|
# else
|
|
|
|
# define EAPI
|
|
|
|
# endif
|
2018-01-18 01:04:03 -08:00
|
|
|
#endif
|
2015-04-28 05:24:11 -07:00
|
|
|
|
2011-10-12 23:15:28 -07:00
|
|
|
#ifndef HAVE_LROUND
|
2011-10-12 23:55:12 -07:00
|
|
|
/* right now i dont care about rendering bugs on platforms without lround
|
|
|
|
(e.g. windows/vc++... yay!)
|
|
|
|
FIXME: http://cgit.freedesktop.org/cairo/tree/src/cairo-misc.c#n487
|
|
|
|
*/
|
|
|
|
#define lround(x) (((x) < 0) ? (long int)ceil((x) - 0.5) : (long int)floor((x) + 0.5))
|
2011-10-12 23:15:28 -07:00
|
|
|
#endif
|
|
|
|
|
evas_eet: Add Type Safety check
Summary:
The Function _evas_canvas3d_eet_file_free(void) is referenced in evas_model_load_file_eet()(file:evas_model_load_eet.c at line 122).
This call is under condition
if ((eet_file->mesh == NULL) || (eet_file->header == NULL)).
when either eet_file->mesh or eet_file->header are NULL, dereference of the corresponding pointer in function "_evas_canvas3d_eet_file_free()"
will generate Segmentation Fault.
@fix
Reviewers: raster, Hermet, tasn, wonsik, spacegrapher, cedric, jpeg
Subscribers: singh.amitesh, sachin.dev, alok25, yashu21985, mvsovani, cedric
Differential Revision: https://phab.enlightenment.org/D3369
2015-12-09 23:26:56 -08:00
|
|
|
/*macro to be used in eet loader/saver*/
|
|
|
|
#define EVAS_CANVAS3D_FILE_CACHE_FILE_ENTRY "evas_3d file"
|
|
|
|
|
2009-09-21 09:08:51 -07:00
|
|
|
/* macros needed to log message through eina_log */
|
2009-09-23 22:10:49 -07:00
|
|
|
extern EAPI int _evas_log_dom_global;
|
2009-10-22 08:22:22 -07:00
|
|
|
#ifdef _EVAS_DEFAULT_LOG_DOM
|
|
|
|
# undef _EVAS_DEFAULT_LOG_DOM
|
2009-09-21 09:08:51 -07:00
|
|
|
#endif
|
2009-10-22 08:22:22 -07:00
|
|
|
#define _EVAS_DEFAULT_LOG_DOM _evas_log_dom_global
|
2009-09-21 09:08:51 -07:00
|
|
|
|
|
|
|
#ifdef EVAS_DEFAULT_LOG_COLOR
|
2009-09-23 22:10:49 -07:00
|
|
|
# undef EVAS_DEFAULT_LOG_COLOR
|
2009-09-21 09:08:51 -07:00
|
|
|
#endif
|
2009-10-22 08:22:22 -07:00
|
|
|
#define EVAS_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
|
2009-09-21 09:08:51 -07:00
|
|
|
|
|
|
|
#ifdef ERR
|
2009-09-23 22:10:49 -07:00
|
|
|
# undef ERR
|
2009-09-21 09:08:51 -07:00
|
|
|
#endif
|
2009-10-22 08:22:22 -07:00
|
|
|
#define ERR(...) EINA_LOG_DOM_ERR(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
|
|
|
|
|
2009-09-21 09:08:51 -07:00
|
|
|
#ifdef DBG
|
2009-09-23 22:10:49 -07:00
|
|
|
# undef DBG
|
2009-09-21 09:08:51 -07:00
|
|
|
#endif
|
2009-10-22 08:22:22 -07:00
|
|
|
#define DBG(...) EINA_LOG_DOM_DBG(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
|
|
|
|
|
2009-09-21 09:08:51 -07:00
|
|
|
#ifdef INF
|
2009-09-23 22:10:49 -07:00
|
|
|
# undef INF
|
2009-09-21 09:08:51 -07:00
|
|
|
#endif
|
2009-10-22 08:22:22 -07:00
|
|
|
#define INF(...) EINA_LOG_DOM_INFO(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
|
|
|
|
|
2009-09-21 09:08:51 -07:00
|
|
|
#ifdef WRN
|
2009-09-23 22:10:49 -07:00
|
|
|
# undef WRN
|
2009-09-21 09:08:51 -07:00
|
|
|
#endif
|
2009-10-22 08:22:22 -07:00
|
|
|
#define WRN(...) EINA_LOG_DOM_WARN(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
|
|
|
|
|
2013-12-25 19:22:05 -08:00
|
|
|
#ifdef CRI
|
|
|
|
# undef CRI
|
2009-09-21 09:08:51 -07:00
|
|
|
#endif
|
2013-12-25 19:22:05 -08:00
|
|
|
#define CRI(...) EINA_LOG_DOM_CRIT(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
|
2009-09-21 09:08:51 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
#include "evas_options.h"
|
|
|
|
|
2009-03-13 23:48:25 -07:00
|
|
|
#if defined(__ARM_ARCH_3M__)
|
|
|
|
# define __ARM_ARCH__ 40
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_4__)
|
|
|
|
# define __ARM_ARCH__ 40
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_4T__)
|
|
|
|
# define __ARM_ARCH__ 41
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__ARM_ARCH_5__)
|
|
|
|
# define __ARM_ARCH__ 50
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_5T__)
|
|
|
|
# define __ARM_ARCH__ 51
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_5E__)
|
|
|
|
# define __ARM_ARCH__ 52
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_5TE__)
|
|
|
|
# define __ARM_ARCH__ 53
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_5TEJ__)
|
|
|
|
# define __ARM_ARCH__ 54
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__ARM_ARCH_6__)
|
|
|
|
# define __ARM_ARCH__ 60
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6J__)
|
|
|
|
# define __ARM_ARCH__ 61
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6K__)
|
|
|
|
# define __ARM_ARCH__ 62
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6Z__)
|
|
|
|
# define __ARM_ARCH__ 63
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6ZK__)
|
|
|
|
# define __ARM_ARCH__ 64
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6T2__)
|
|
|
|
# define __ARM_ARCH__ 65
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__ARM_ARCH_7__)
|
|
|
|
# define __ARM_ARCH__ 70
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_7A__)
|
|
|
|
# define __ARM_ARCH__ 71
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_7R__)
|
|
|
|
# define __ARM_ARCH__ 72
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_7M__)
|
|
|
|
# define __ARM_ARCH__ 73
|
|
|
|
#endif
|
|
|
|
|
2013-10-10 01:44:24 -07:00
|
|
|
#define SLK(x) Eina_Spinlock x
|
|
|
|
#define SLKI(x) eina_spinlock_new(&(x))
|
|
|
|
#define SLKD(x) eina_spinlock_free(&(x))
|
|
|
|
#define SLKL(x) eina_spinlock_take(&(x))
|
|
|
|
#define SLKT(x) eina_spinlock_take_try(&(x))
|
|
|
|
#define SLKU(x) eina_spinlock_release(&(x))
|
|
|
|
|
2011-04-24 13:25:34 -07:00
|
|
|
#define LK(x) Eina_Lock x
|
|
|
|
#define LKI(x) eina_lock_new(&(x))
|
|
|
|
#define LKD(x) eina_lock_free(&(x))
|
|
|
|
#define LKL(x) eina_lock_take(&(x))
|
|
|
|
#define LKT(x) eina_lock_take_try(&(x))
|
|
|
|
#define LKU(x) eina_lock_release(&(x))
|
2011-05-01 17:45:16 -07:00
|
|
|
#define LKDBG(x) eina_lock_debug(&(x))
|
2010-12-13 21:41:32 -08:00
|
|
|
|
2011-12-05 06:01:42 -08:00
|
|
|
/* for rwlocks */
|
|
|
|
#define RWLK(x) Eina_RWLock x
|
|
|
|
#define RWLKI(x) eina_rwlock_new(&(x))
|
|
|
|
#define RWLKD(x) eina_rwlock_free(&(x))
|
|
|
|
#define RDLKL(x) eina_rwlock_take_read(&(x))
|
|
|
|
#define WRLKL(x) eina_rwlock_take_write(&(x))
|
|
|
|
#define RWLKU(x) eina_rwlock_release(&(x))
|
|
|
|
|
2006-11-13 15:23:44 -08:00
|
|
|
# define TH(x) pthread_t x
|
|
|
|
# define THI(x) int x
|
2006-11-15 08:44:34 -08:00
|
|
|
# define TH_MAX 8
|
|
|
|
|
2005-12-27 09:17:31 -08:00
|
|
|
#ifdef __GNUC__
|
|
|
|
# if __GNUC__ >= 4
|
2006-01-09 23:36:51 -08:00
|
|
|
// BROKEN in gcc 4 on amd64
|
|
|
|
//# pragma GCC visibility push(hidden)
|
2005-12-27 09:17:31 -08:00
|
|
|
# endif
|
2007-06-04 11:31:30 -07:00
|
|
|
#define LIKELY(x) __builtin_expect(!!(x), 1)
|
|
|
|
#define UNLIKELY(x) __builtin_expect(!!(x), 0)
|
|
|
|
#else
|
|
|
|
#define LIKELY(x) (x)
|
|
|
|
#define UNLIKELY(x) (x)
|
2005-12-27 09:17:31 -08:00
|
|
|
#endif
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
2005-02-04 18:30:13 -08:00
|
|
|
/* use exact rects for updates not tiles */
|
2015-10-05 02:41:00 -07:00
|
|
|
//#define NEWTILER
|
2005-02-04 20:21:25 -08:00
|
|
|
#define TILESIZE 8
|
2009-09-16 02:48:05 -07:00
|
|
|
#define IMG_MAX_SIZE 65000
|
|
|
|
|
|
|
|
#define IMG_TOO_BIG(w, h) \
|
2009-09-24 07:44:05 -07:00
|
|
|
((((unsigned long long)w) * ((unsigned long long)h)) >= \
|
|
|
|
((1ULL << (29 * (sizeof(void *) / 4))) - 2048))
|
2005-02-04 18:30:13 -08:00
|
|
|
|
2012-12-06 11:44:11 -08:00
|
|
|
/* not every converter supports no-dither or line-dither, then they will
|
|
|
|
* fallback to table version, in these cases default to small table.
|
|
|
|
*/
|
|
|
|
#if defined(BUILD_NO_DITHER_MASK) || defined(BUILD_LINE_DITHER_MASK)
|
|
|
|
#ifndef BUILD_SMALL_DITHER_MASK
|
|
|
|
#define BUILD_SMALL_DITHER_MASK 1
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
#ifdef BUILD_SMALL_DITHER_MASK
|
2003-01-20 15:04:38 -08:00
|
|
|
# define DM_TABLE _evas_dither_44
|
2002-11-08 00:02:15 -08:00
|
|
|
# define DM_SIZE 4
|
|
|
|
# define DM_BITS 4
|
|
|
|
# define DM_DIV 16
|
|
|
|
# define USE_DITHER_44 1
|
|
|
|
#else
|
2003-01-20 15:04:38 -08:00
|
|
|
# define DM_TABLE _evas_dither_128128
|
2002-11-08 00:02:15 -08:00
|
|
|
# define DM_SIZE 128
|
|
|
|
# define DM_BITS 6
|
|
|
|
# define DM_DIV 64
|
|
|
|
# define USE_DITHER_128128 1
|
|
|
|
#endif
|
|
|
|
|
2010-08-10 00:36:23 -07:00
|
|
|
#define DM_MSK (DM_SIZE - 1)
|
|
|
|
#define DM_SHF(_b) (DM_BITS - (8 - _b))
|
|
|
|
/* Supports negative right shifts */
|
|
|
|
#define DM_SHR(x, _b) ((DM_SHF(_b) >= 0) ? \
|
|
|
|
((x) >> DM_SHF(_b)) : ((x) << -DM_SHF(_b)))
|
|
|
|
|
2006-10-02 04:24:26 -07:00
|
|
|
/* if more than 1/ALPHA_SPARSE_INV_FRACTION is "alpha" (1-254) then sparse
|
|
|
|
* alpha flag gets set */
|
|
|
|
#define ALPHA_SPARSE_INV_FRACTION 3
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
#if defined(__ARM_ARCH_3M__)
|
|
|
|
# define __ARM_ARCH__ 40
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_4__)
|
|
|
|
# define __ARM_ARCH__ 40
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_4T__)
|
|
|
|
# define __ARM_ARCH__ 41
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__ARM_ARCH_5__)
|
|
|
|
# define __ARM_ARCH__ 50
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_5T__)
|
|
|
|
# define __ARM_ARCH__ 51
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_5E__)
|
|
|
|
# define __ARM_ARCH__ 52
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_5TE__)
|
|
|
|
# define __ARM_ARCH__ 53
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_5TEJ__)
|
|
|
|
# define __ARM_ARCH__ 54
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__ARM_ARCH_6__)
|
|
|
|
# define __ARM_ARCH__ 60
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6J__)
|
|
|
|
# define __ARM_ARCH__ 61
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6K__)
|
|
|
|
# define __ARM_ARCH__ 62
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6Z__)
|
|
|
|
# define __ARM_ARCH__ 63
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6ZK__)
|
|
|
|
# define __ARM_ARCH__ 64
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_6T2__)
|
|
|
|
# define __ARM_ARCH__ 65
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__ARM_ARCH_7__)
|
|
|
|
# define __ARM_ARCH__ 70
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_7A__)
|
|
|
|
# define __ARM_ARCH__ 71
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_7R__)
|
|
|
|
# define __ARM_ARCH__ 72
|
|
|
|
#endif
|
|
|
|
#if defined(__ARM_ARCH_7M__)
|
|
|
|
# define __ARM_ARCH__ 73
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52)
|
|
|
|
/* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */
|
|
|
|
#define pld(addr, off) \
|
|
|
|
__asm__("pld [%[address], %[offset]]":: \
|
|
|
|
[address] "r" (addr), [offset] "i" (off))
|
|
|
|
#else
|
|
|
|
#define pld(addr, off)
|
|
|
|
#endif /* __ARMEL__ */
|
|
|
|
|
2011-12-23 03:50:29 -08:00
|
|
|
// these here are in config.h - just here for documentation
|
|
|
|
//#ifdef __ARM_ARCH__
|
|
|
|
// *IF* you enable pixman, this determines which things pixman will do
|
|
|
|
////#define PIXMAN_FONT 1
|
|
|
|
////#define PIXMAN_RECT 1
|
|
|
|
////#define PIXMAN_LINE 1
|
|
|
|
////#define PIXMAN_POLY 1
|
|
|
|
//#define PIXMAN_IMAGE 1
|
|
|
|
//#define PIXMAN_IMAGE_SCALE_SAMPLE 1
|
|
|
|
//#endif
|
|
|
|
// not related to pixman but an alternate rotate code
|
|
|
|
//#define TILE_ROTATE 1
|
|
|
|
|
|
|
|
#define TILE_CACHE_LINE_SIZE 64
|
|
|
|
|
2016-09-04 21:53:00 -07:00
|
|
|
#define RGBA_PLANE_MAX 3
|
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
#define UNROLL2(op...) op op
|
|
|
|
#define UNROLL4(op...) UNROLL2(op) UNROLL2(op)
|
|
|
|
#define UNROLL8(op...) UNROLL4(op) UNROLL4(op)
|
|
|
|
#define UNROLL16(op...) UNROLL8(op) UNROLL8(op)
|
|
|
|
|
|
|
|
#define UNROLL8_PLD_WHILE(start, size, end, op) \
|
|
|
|
pld(start, 0); \
|
|
|
|
end = start + (size & ~7); \
|
|
|
|
while (start < end) \
|
|
|
|
{ \
|
|
|
|
pld(start, 32); \
|
|
|
|
UNROLL8(op); \
|
|
|
|
} \
|
|
|
|
end += (size & 7); \
|
|
|
|
pld(start, 32); \
|
|
|
|
while (start < end) \
|
|
|
|
{ \
|
|
|
|
op; \
|
|
|
|
}
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
2013-06-03 19:17:21 -07:00
|
|
|
#include "../file/evas_module.h"
|
|
|
|
|
2018-11-12 08:10:08 -08:00
|
|
|
#include "evas_common_types.h"
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2008-04-11 17:32:30 -07:00
|
|
|
typedef struct _Image_Entry Image_Entry;
|
2011-08-11 18:52:29 -07:00
|
|
|
typedef struct _Image_Entry_Flags Image_Entry_Flags;
|
2011-08-10 23:04:08 -07:00
|
|
|
typedef struct _Image_Entry_Frame Image_Entry_Frame;
|
2011-03-19 00:08:59 -07:00
|
|
|
typedef struct _Image_Timestamp Image_Timestamp;
|
2008-04-11 17:32:30 -07:00
|
|
|
typedef struct _Engine_Image_Entry Engine_Image_Entry;
|
2009-01-19 06:06:09 -08:00
|
|
|
typedef struct _Evas_Cache_Target Evas_Cache_Target;
|
2010-09-08 23:36:01 -07:00
|
|
|
typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread;
|
2008-04-11 17:32:30 -07:00
|
|
|
|
2009-03-26 18:48:58 -07:00
|
|
|
#ifdef BUILD_PIPE_RENDER
|
2006-11-13 15:23:44 -08:00
|
|
|
typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op;
|
|
|
|
typedef struct _RGBA_Pipe RGBA_Pipe;
|
|
|
|
typedef struct _RGBA_Pipe_Thread_Info RGBA_Pipe_Thread_Info;
|
2009-03-26 18:48:58 -07:00
|
|
|
#endif
|
2002-11-08 00:02:15 -08:00
|
|
|
typedef struct _RGBA_Image RGBA_Image;
|
|
|
|
typedef struct _RGBA_Draw_Context RGBA_Draw_Context;
|
|
|
|
typedef struct _RGBA_Polygon_Point RGBA_Polygon_Point;
|
2010-03-24 09:39:39 -07:00
|
|
|
typedef struct _RGBA_Map_Point RGBA_Map_Point;
|
2012-06-14 02:58:16 -07:00
|
|
|
typedef struct _RGBA_Map RGBA_Map;
|
2006-05-02 00:28:49 -07:00
|
|
|
typedef struct _RGBA_Gfx_Compositor RGBA_Gfx_Compositor;
|
2016-03-22 21:33:08 -07:00
|
|
|
typedef struct _RGBA_Image_Data_Map RGBA_Image_Data_Map;
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2015-09-23 22:06:40 -07:00
|
|
|
typedef struct _Cutout_Rect Cutout_Rect;
|
2007-04-04 02:55:40 -07:00
|
|
|
typedef struct _Cutout_Rects Cutout_Rects;
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2007-07-16 00:25:35 -07:00
|
|
|
typedef struct _Convert_Pal Convert_Pal;
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2007-07-16 00:25:35 -07:00
|
|
|
typedef struct _Tilebuf Tilebuf;
|
2015-10-05 02:41:00 -07:00
|
|
|
typedef struct _Tilebuf_Rect Tilebuf_Rect;
|
|
|
|
|
|
|
|
#ifndef NEWTILER
|
|
|
|
typedef struct _Tilebuf_Tile Tilebuf_Tile;
|
|
|
|
#endif
|
2006-04-22 04:08:01 -07:00
|
|
|
|
2008-08-25 22:45:04 -07:00
|
|
|
typedef struct _Evas_Common_Transform Evas_Common_Transform;
|
|
|
|
|
2010-03-24 09:39:39 -07:00
|
|
|
// RGBA_Map_Point
|
|
|
|
// all coords are 20.12
|
|
|
|
// fp type - an int for now
|
|
|
|
typedef int FPc;
|
|
|
|
// fp # of bits of float accuracy
|
|
|
|
#define FP 8
|
|
|
|
// fp half (half of an fp unit)
|
|
|
|
#define FPH (1 << (FP - 1))
|
|
|
|
// one fp unit
|
|
|
|
#define FP1 (1 << (FP))
|
|
|
|
|
2006-05-02 00:28:49 -07:00
|
|
|
typedef void (*Gfx_Func_Copy) (DATA32 *src, DATA32 *dst, int len);
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
typedef void (*Gfx_Func_Convert) (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
2012-12-18 08:28:55 -08:00
|
|
|
|
|
|
|
typedef void (*Evas_Render_Done_Cb)(void *);
|
|
|
|
|
2008-07-10 09:38:54 -07:00
|
|
|
#include "../cache/evas_cache.h"
|
2017-11-06 18:22:09 -08:00
|
|
|
#include "../common/evas_font_draw.h"
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
2012-12-18 08:21:03 -08:00
|
|
|
typedef void (*Evas_Thread_Command_Cb)(void *data);
|
|
|
|
typedef struct _Evas_Thread_Command Evas_Thread_Command;
|
|
|
|
|
|
|
|
struct _Evas_Thread_Command
|
|
|
|
{
|
|
|
|
Evas_Thread_Command_Cb cb;
|
|
|
|
void *data;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
typedef enum _RGBA_Image_Flags
|
|
|
|
{
|
2006-09-30 03:18:37 -07:00
|
|
|
RGBA_IMAGE_NOTHING = (0),
|
2008-06-03 02:09:39 -07:00
|
|
|
/* RGBA_IMAGE_HAS_ALPHA = (1 << 0), */
|
2006-09-30 03:18:37 -07:00
|
|
|
RGBA_IMAGE_IS_DIRTY = (1 << 1),
|
|
|
|
RGBA_IMAGE_INDEXED = (1 << 2),
|
2014-03-16 23:19:47 -07:00
|
|
|
/* RGBA_IMAGE_ALPHA_ONLY = (1 << 3), */
|
2006-09-30 03:18:37 -07:00
|
|
|
RGBA_IMAGE_ALPHA_TILES = (1 << 4),
|
2008-06-03 02:09:39 -07:00
|
|
|
/* RGBA_IMAGE_ALPHA_SPARSE = (1 << 5), */
|
|
|
|
/* RGBA_IMAGE_LOADED = (1 << 6), */
|
|
|
|
/* RGBA_IMAGE_NEED_DATA = (1 << 7) */
|
2010-03-24 12:07:59 -07:00
|
|
|
RGBA_IMAGE_TODO_LOAD = (1 << 8),
|
2002-11-08 00:02:15 -08:00
|
|
|
} RGBA_Image_Flags;
|
|
|
|
|
|
|
|
typedef enum _Convert_Pal_Mode
|
|
|
|
{
|
|
|
|
PAL_MODE_NONE,
|
|
|
|
PAL_MODE_MONO,
|
|
|
|
PAL_MODE_GRAY4,
|
|
|
|
PAL_MODE_GRAY16,
|
|
|
|
PAL_MODE_GRAY64,
|
|
|
|
PAL_MODE_GRAY256,
|
|
|
|
PAL_MODE_RGB111,
|
|
|
|
PAL_MODE_RGB121,
|
|
|
|
PAL_MODE_RGB221,
|
|
|
|
PAL_MODE_RGB222,
|
|
|
|
PAL_MODE_RGB232,
|
|
|
|
PAL_MODE_RGB332,
|
2006-08-14 06:50:07 -07:00
|
|
|
PAL_MODE_RGB666,
|
2002-11-08 00:02:15 -08:00
|
|
|
PAL_MODE_LAST
|
|
|
|
} Convert_Pal_Mode;
|
|
|
|
|
2003-03-10 20:39:58 -08:00
|
|
|
typedef enum _CPU_Features
|
|
|
|
{
|
|
|
|
CPU_FEATURE_C = 0,
|
|
|
|
CPU_FEATURE_MMX = (1 << 0),
|
2003-09-10 01:52:18 -07:00
|
|
|
CPU_FEATURE_MMX2 = (1 << 1),
|
|
|
|
CPU_FEATURE_SSE = (1 << 2),
|
|
|
|
CPU_FEATURE_ALTIVEC = (1 << 3),
|
|
|
|
CPU_FEATURE_VIS = (1 << 4),
|
2009-03-13 23:48:25 -07:00
|
|
|
CPU_FEATURE_VIS2 = (1 << 5),
|
2011-09-29 19:35:31 -07:00
|
|
|
CPU_FEATURE_NEON = (1 << 6),
|
2018-11-22 08:59:47 -08:00
|
|
|
CPU_FEATURE_SSE3 = (1 << 7),
|
|
|
|
CPU_FEATURE_SVE = (1 << 8)
|
2003-03-10 20:39:58 -08:00
|
|
|
} CPU_Features;
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
2008-06-03 02:09:39 -07:00
|
|
|
struct _Image_Entry_Flags
|
|
|
|
{
|
2013-04-24 23:05:18 -07:00
|
|
|
Eina_Bool loaded : 1;
|
|
|
|
Eina_Bool in_progress : 1;
|
|
|
|
Eina_Bool dirty : 1;
|
|
|
|
Eina_Bool activ : 1;
|
|
|
|
|
|
|
|
Eina_Bool need_data : 1;
|
|
|
|
Eina_Bool lru_nodata : 1;
|
|
|
|
Eina_Bool cached : 1;
|
|
|
|
Eina_Bool alpha : 1;
|
|
|
|
|
|
|
|
Eina_Bool lru : 1;
|
|
|
|
Eina_Bool alpha_sparse : 1;
|
|
|
|
Eina_Bool preload_done : 1;
|
|
|
|
Eina_Bool delete_me : 1;
|
2016-11-21 21:33:48 -08:00
|
|
|
|
2013-04-24 23:05:18 -07:00
|
|
|
Eina_Bool pending : 1;
|
|
|
|
Eina_Bool rotated : 1;
|
|
|
|
Eina_Bool unload_cancel : 1;
|
2013-05-07 23:37:37 -07:00
|
|
|
Eina_Bool given_mmap : 1;
|
2013-06-23 19:41:32 -07:00
|
|
|
|
|
|
|
Eina_Bool updated_data : 1;
|
evas: jpeg loader - support flip, transpose, transverse
Summary:
Previously, jpeg image loader support rotation (90°, 180°, 270°) only.
this patch is about supporting flip(vertical, horizontal), transpose, transverse
@feature
Test Plan: I'm going to make tests in src/tests
Reviewers: cedric, raster, jpeg
CC: seoz, cedric
Differential Revision: https://phab.enlightenment.org/D1126
Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-07-06 10:58:47 -07:00
|
|
|
Eina_Bool flipped : 1;
|
2015-12-17 23:49:17 -08:00
|
|
|
Eina_Bool textured : 1;
|
2016-03-15 11:57:19 -07:00
|
|
|
Eina_Bool preload_pending : 1;
|
2011-08-10 23:04:08 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _Image_Entry_Frame
|
|
|
|
{
|
|
|
|
int index;
|
|
|
|
DATA32 *data; /* frame decoding data */
|
|
|
|
void *info; /* special image type info */
|
|
|
|
Eina_Bool loaded : 1;
|
2008-06-03 02:09:39 -07:00
|
|
|
};
|
|
|
|
|
2009-01-19 06:06:09 -08:00
|
|
|
struct _Evas_Cache_Target
|
|
|
|
{
|
2017-01-01 05:15:24 -08:00
|
|
|
EINA_INLIST;
|
|
|
|
const Eo *target;
|
|
|
|
void *data;
|
2018-08-27 00:39:22 -07:00
|
|
|
void (*preloaded_cb) (void *data); //Call when preloading done.
|
|
|
|
void *preloaded_data;
|
evas image: fix a bug in image preloading.
Summary:
Current preloading is too buggy since it's on thread-based.
This is a fundamental improvement to fix a bug.
The critical issue here is,
When preloading img object suddenly cancel its preloading,
the object possibly cannot render image next then because
renderer doesn't have any idea when async cancelling is
finished. Renderer just tries to render regardless of
image loading status, and this could occur no-texture(in gl case)
image object.
So, here improvement is, adding a notification for async cancelled
so that putting img objects to redraw images properly after their preloading is
cancelled.
The best scenario to reproduce this bug is this one.
Evas_Object *img2 = evas_object_image_filled_add(evas);
evas_object_image_file_set(img2, "test.jpg", NULL);
evas_object_image_preload(img2, EINA_FALSE);
evas_object_resize(img2, 200, 200);
evas_object_show(img2);
Evas_Object *img = evas_object_image_filled_add(evas);
evas_object_image_file_set(img, "test.jpg", NULL);
evas_object_image_preload(img, EINA_FALSE);
evas_object_move(img, 200, 200);
evas_object_resize(img, 200, 200);
evas_object_show(img);
evas_object_image_preload(img2, EINA_TRUE);
If you run this on gl backend, occasionally happens rendering fail.
Yet there other bugs on preloading feature....
@fix
Reviewers: #committers, raster
Subscribers: cedric, #reviewers, #committers, zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6919
2018-09-02 23:19:02 -07:00
|
|
|
Eina_Bool delete_me : 1;
|
|
|
|
Eina_Bool preload_cancel : 1;
|
2009-01-19 06:06:09 -08:00
|
|
|
};
|
|
|
|
|
2011-03-19 00:08:59 -07:00
|
|
|
struct _Image_Timestamp
|
|
|
|
{
|
|
|
|
time_t mtime;
|
|
|
|
off_t size;
|
|
|
|
ino_t ino;
|
|
|
|
#ifdef _STAT_VER_LINUX
|
|
|
|
unsigned long int mtime_nsec;
|
2011-08-11 18:52:29 -07:00
|
|
|
#endif
|
2011-03-19 00:08:59 -07:00
|
|
|
};
|
|
|
|
|
2008-04-11 17:32:30 -07:00
|
|
|
struct _Image_Entry
|
|
|
|
{
|
2009-03-13 08:18:39 -07:00
|
|
|
EINA_INLIST;
|
2008-12-01 18:33:09 -08:00
|
|
|
|
2017-01-05 16:37:40 -08:00
|
|
|
int magic;
|
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
Evas_Cache_Image *cache;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
const char *cache_key;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
const char *file;
|
|
|
|
const char *key;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2010-09-08 23:36:01 -07:00
|
|
|
Evas_Cache_Target *targets;
|
2011-03-19 00:08:59 -07:00
|
|
|
Evas_Preload_Pthread *preload;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2011-03-19 00:08:59 -07:00
|
|
|
Image_Timestamp tstamp;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
int references;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2010-07-16 15:52:04 -07:00
|
|
|
#ifdef BUILD_PIPE_RENDER
|
2013-05-30 20:55:14 -07:00
|
|
|
RGBA_Pipe *pipe;
|
2010-07-16 15:52:04 -07:00
|
|
|
#endif
|
|
|
|
|
2013-05-06 18:50:57 -07:00
|
|
|
Evas_Image_Load_Opts load_opts;
|
2014-03-16 22:52:47 -07:00
|
|
|
Evas_Colorspace space;
|
|
|
|
const Evas_Colorspace *cspaces; // owned by the loader, live as long as the loader
|
evas: add image orient set/get API in software backend for now.
Summary:
Added API's to rotate(0, 90, 180, 270), flip(horizontal, vertical, transpose, transverse)
evas image object. Also added example to demonstrate this.
Signed-off-by: kabeer khan <kabeer.khan@samsung.com>
Reviewers: raster, stephenmhouston, cedric
Subscribers: stephenmhouston, cedric
Differential Revision: https://phab.enlightenment.org/D1950
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-11 08:30:49 -08:00
|
|
|
Evas_Image_Orient orient;
|
2013-04-24 23:05:18 -07:00
|
|
|
|
2010-09-18 16:16:25 -07:00
|
|
|
unsigned int w;
|
|
|
|
unsigned int h;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2013-04-24 23:05:18 -07:00
|
|
|
unsigned char scale;
|
|
|
|
|
2015-07-07 05:29:31 -07:00
|
|
|
unsigned char need_unload : 1;
|
2017-01-05 16:37:40 -08:00
|
|
|
unsigned char load_failed : 1;
|
2019-06-13 15:34:09 -07:00
|
|
|
unsigned char need_data : 1;
|
2015-07-07 05:29:31 -07:00
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
struct
|
|
|
|
{
|
2010-09-18 16:16:25 -07:00
|
|
|
unsigned int w;
|
|
|
|
unsigned int h;
|
2009-03-13 08:18:39 -07:00
|
|
|
} allocated;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2014-06-29 23:37:03 -07:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
unsigned char l, r, t, b;
|
|
|
|
} borders; // Duplicated borders for use by GL engines.
|
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
struct
|
|
|
|
{
|
2013-06-03 19:17:21 -07:00
|
|
|
Evas_Module *module;
|
|
|
|
Evas_Image_Load_Func *loader;
|
2009-03-13 08:18:39 -07:00
|
|
|
} info;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2013-10-10 01:44:24 -07:00
|
|
|
SLK(lock);
|
|
|
|
SLK(lock_cancel);
|
2008-12-23 15:07:48 -08:00
|
|
|
|
2013-05-06 03:01:35 -07:00
|
|
|
/* for animation feature */
|
2013-05-06 18:50:57 -07:00
|
|
|
Evas_Image_Animated animated;
|
2013-05-06 03:01:35 -07:00
|
|
|
|
|
|
|
/* Reference to the file */
|
|
|
|
Eina_File *f;
|
|
|
|
void *loader_data;
|
2016-11-21 21:33:48 -08:00
|
|
|
|
2009-03-13 08:18:39 -07:00
|
|
|
Image_Entry_Flags flags;
|
2009-05-07 06:29:56 -07:00
|
|
|
Evas_Image_Scale_Hint scale_hint;
|
2009-05-01 00:11:07 -07:00
|
|
|
void *data1, *data2;
|
2009-05-07 06:29:56 -07:00
|
|
|
int server_id;
|
2009-05-11 06:09:43 -07:00
|
|
|
int connect_num;
|
2009-09-11 06:44:53 -07:00
|
|
|
int channel;
|
2019-03-04 10:36:57 -08:00
|
|
|
Evas_Load_Error load_error;
|
2019-06-13 15:34:09 -07:00
|
|
|
|
|
|
|
struct {
|
|
|
|
struct {
|
|
|
|
uint8_t *region;
|
|
|
|
} horizontal, vertical;
|
|
|
|
} stretch;
|
|
|
|
|
|
|
|
Eina_Rectangle content;
|
2008-04-11 17:32:30 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _Engine_Image_Entry
|
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
EINA_INLIST;
|
2008-12-01 18:33:09 -08:00
|
|
|
|
2008-04-11 17:32:30 -07:00
|
|
|
/* Upper Engine data. */
|
|
|
|
Image_Entry *src;
|
2008-12-01 18:33:09 -08:00
|
|
|
|
2008-04-11 17:32:30 -07:00
|
|
|
/* Cache stuff. */
|
|
|
|
Evas_Cache_Engine_Image *cache;
|
|
|
|
const char *cache_key;
|
2008-12-01 18:33:09 -08:00
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool cached : 1;
|
|
|
|
Eina_Bool activ : 1;
|
|
|
|
Eina_Bool dirty : 1;
|
|
|
|
Eina_Bool loaded : 1;
|
|
|
|
Eina_Bool need_parent : 1;
|
2008-04-11 17:32:30 -07:00
|
|
|
} flags;
|
2008-12-01 18:33:09 -08:00
|
|
|
|
2008-04-11 17:32:30 -07:00
|
|
|
int references;
|
|
|
|
int w;
|
|
|
|
int h;
|
|
|
|
};
|
|
|
|
|
2007-04-04 02:55:40 -07:00
|
|
|
struct _Cutout_Rect
|
|
|
|
{
|
|
|
|
int x, y, w, h;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _Cutout_Rects
|
|
|
|
{
|
2015-09-23 22:06:40 -07:00
|
|
|
Cutout_Rect *rects;
|
2007-04-04 02:55:40 -07:00
|
|
|
int active;
|
|
|
|
int max;
|
2015-09-23 22:06:40 -07:00
|
|
|
struct {
|
|
|
|
int x, w, y, h;
|
|
|
|
} last_add;
|
2007-04-04 02:55:40 -07:00
|
|
|
};
|
|
|
|
|
2008-08-25 22:45:04 -07:00
|
|
|
struct _Evas_Common_Transform
|
|
|
|
{
|
|
|
|
float mxx, mxy, mxz;
|
|
|
|
float myx, myy, myz;
|
|
|
|
float mzx, mzy, mzz;
|
|
|
|
};
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
struct _RGBA_Draw_Context
|
|
|
|
{
|
|
|
|
struct {
|
2017-01-30 21:50:52 -08:00
|
|
|
struct {
|
|
|
|
void *(*gl_new) (void *data, RGBA_Font_Glyph *fg);
|
|
|
|
void (*gl_free) (void *ext_dat);
|
2017-09-25 02:34:22 -07:00
|
|
|
void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y, int w, int h);
|
2017-03-08 02:33:15 -08:00
|
|
|
void *(*gl_image_new) (void *gc, RGBA_Font_Glyph *fg, int alpha, Evas_Colorspace cspace);
|
2017-01-30 21:50:52 -08:00
|
|
|
void (*gl_image_free) (void *image);
|
2017-03-08 02:33:15 -08:00
|
|
|
void (*gl_image_draw) (void *gc, void *im, int dx, int dy, int dw, int dh, int smooth);
|
2017-01-30 21:50:52 -08:00
|
|
|
} func;
|
|
|
|
void *data;
|
|
|
|
} font_ext;
|
2002-11-08 00:02:15 -08:00
|
|
|
struct {
|
2017-01-30 21:50:52 -08:00
|
|
|
int x, y, w, h;
|
|
|
|
} cutout_target;
|
2007-06-21 13:10:13 -07:00
|
|
|
struct RGBA_Draw_Context_clip {
|
2015-07-26 22:10:29 -07:00
|
|
|
Evas_Public_Data *evas; // for async unref
|
2015-09-02 22:06:36 -07:00
|
|
|
void *mask; // RGBA_Image (SW) or Evas_GL_Image (GL)
|
2017-01-30 21:50:52 -08:00
|
|
|
int x, y, w, h;
|
2014-11-12 17:04:00 -08:00
|
|
|
int mask_x, mask_y;
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool use : 1;
|
2015-07-26 22:10:29 -07:00
|
|
|
Eina_Bool async : 1;
|
2017-01-23 21:23:03 -08:00
|
|
|
Eina_Bool mask_color : 1; // true if masking with color (eg. filters)
|
2002-11-08 00:02:15 -08:00
|
|
|
} clip;
|
2017-01-30 21:50:52 -08:00
|
|
|
struct {
|
|
|
|
#ifdef HAVE_PIXMAN
|
|
|
|
pixman_image_t *pixman_color_image;
|
|
|
|
#endif
|
|
|
|
DATA32 col;
|
|
|
|
} col;
|
2007-04-04 02:55:40 -07:00
|
|
|
Cutout_Rects cutout;
|
2016-11-16 16:05:56 -08:00
|
|
|
struct {
|
2017-01-30 21:50:52 -08:00
|
|
|
DATA32 col;
|
|
|
|
Eina_Bool use : 1;
|
|
|
|
} mul;
|
2016-12-30 01:55:55 -08:00
|
|
|
struct {
|
2016-11-16 16:05:56 -08:00
|
|
|
Cutout_Rects *rects;
|
2017-01-30 21:50:52 -08:00
|
|
|
unsigned int used;
|
2016-11-16 16:05:56 -08:00
|
|
|
} cache;
|
2003-09-08 22:51:03 -07:00
|
|
|
struct {
|
2017-01-30 21:50:52 -08:00
|
|
|
unsigned char color_space;
|
2005-12-03 01:27:53 -08:00
|
|
|
} interpolation;
|
2017-01-30 21:50:52 -08:00
|
|
|
unsigned char render_op;
|
|
|
|
unsigned char anti_alias : 1;
|
2002-11-08 00:02:15 -08:00
|
|
|
};
|
|
|
|
|
2009-03-26 18:48:58 -07:00
|
|
|
#ifdef BUILD_PIPE_RENDER
|
2012-11-04 03:51:42 -08:00
|
|
|
#include "../common/evas_map_image.h"
|
2010-05-21 00:10:45 -07:00
|
|
|
|
2006-11-13 15:23:44 -08:00
|
|
|
struct _RGBA_Pipe_Op
|
|
|
|
{
|
|
|
|
RGBA_Draw_Context context;
|
2012-07-04 02:39:23 -07:00
|
|
|
Eina_Bool (*prepare_func) (void *data, RGBA_Image *dst, RGBA_Pipe_Op *op);
|
2012-06-09 21:58:24 -07:00
|
|
|
void (*op_func) (RGBA_Image *dst, const RGBA_Pipe_Op *op, const RGBA_Pipe_Thread_Info *info);
|
2006-11-13 15:23:44 -08:00
|
|
|
void (*free_func) (RGBA_Pipe_Op *op);
|
2012-07-04 02:39:23 -07:00
|
|
|
Cutout_Rects *rects;
|
2007-07-16 00:38:48 -07:00
|
|
|
|
2006-11-13 15:23:44 -08:00
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
int x, y, w, h;
|
|
|
|
} rect;
|
|
|
|
struct {
|
|
|
|
int x0, y0, x1, y1;
|
|
|
|
} line;
|
|
|
|
struct {
|
2012-07-04 02:39:23 -07:00
|
|
|
int x, y;
|
2006-11-13 15:23:44 -08:00
|
|
|
RGBA_Polygon_Point *points;
|
|
|
|
} poly;
|
|
|
|
struct {
|
|
|
|
int x, y;
|
2012-05-17 19:16:54 -07:00
|
|
|
Evas_Text_Props *intl_props;
|
2012-07-04 02:39:23 -07:00
|
|
|
RGBA_Gfx_Func func;
|
2006-11-13 15:23:44 -08:00
|
|
|
} text;
|
|
|
|
struct {
|
2008-11-04 01:19:35 -08:00
|
|
|
RGBA_Image *src;
|
|
|
|
int sx, sy, sw, sh, dx, dy, dw, dh;
|
|
|
|
int smooth;
|
|
|
|
char *text;
|
2006-11-13 15:23:44 -08:00
|
|
|
} image;
|
2010-03-24 09:39:39 -07:00
|
|
|
struct {
|
|
|
|
RGBA_Image *src;
|
2012-07-04 02:39:23 -07:00
|
|
|
RGBA_Map *m;
|
2011-02-08 04:10:58 -08:00
|
|
|
int npoints;
|
2010-03-24 09:39:39 -07:00
|
|
|
int smooth;
|
|
|
|
int level;
|
2011-02-08 04:10:58 -08:00
|
|
|
} map;
|
2006-11-13 15:23:44 -08:00
|
|
|
} op;
|
2012-07-04 02:39:23 -07:00
|
|
|
|
|
|
|
Eina_Bool render : 1;
|
2006-11-13 15:23:44 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
#define PIPE_LEN 256
|
|
|
|
|
|
|
|
struct _RGBA_Pipe
|
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
EINA_INLIST;
|
2006-11-13 15:23:44 -08:00
|
|
|
int op_num;
|
|
|
|
RGBA_Pipe_Op op[PIPE_LEN];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _RGBA_Pipe_Thread_Info
|
|
|
|
{
|
2012-06-09 21:58:24 -07:00
|
|
|
EINA_INLIST;
|
2012-07-04 02:39:23 -07:00
|
|
|
Eina_Rectangle area;
|
2006-11-13 15:23:44 -08:00
|
|
|
};
|
2009-03-26 18:48:58 -07:00
|
|
|
#endif
|
2006-11-13 15:23:44 -08:00
|
|
|
|
2016-03-22 21:33:08 -07:00
|
|
|
struct _RGBA_Image_Data_Map {
|
|
|
|
EINA_INLIST;
|
2016-09-01 05:04:37 -07:00
|
|
|
unsigned char *baseptr;
|
|
|
|
Eina_Rw_Slice slice;
|
|
|
|
int stride; // in bytes
|
2016-03-22 21:33:08 -07:00
|
|
|
int rx, ry, rw, rh; // actual map region
|
2016-03-23 02:14:37 -07:00
|
|
|
int plane;
|
2016-03-22 21:33:08 -07:00
|
|
|
Evas_Colorspace cspace;
|
|
|
|
Eina_Bool allocated; // ptr is malloc() for cow or cspace conv
|
|
|
|
Efl_Gfx_Buffer_Access_Mode mode;
|
|
|
|
};
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
struct _RGBA_Image
|
|
|
|
{
|
2008-04-11 17:32:30 -07:00
|
|
|
Image_Entry cache_entry;
|
2002-11-08 00:02:15 -08:00
|
|
|
RGBA_Image_Flags flags;
|
|
|
|
void *extended_info;
|
2007-07-16 00:25:35 -07:00
|
|
|
|
|
|
|
/* Colorspace stuff. */
|
2006-12-17 07:48:52 -08:00
|
|
|
struct {
|
2008-04-11 17:32:30 -07:00
|
|
|
void *data;
|
2009-06-17 03:01:52 -07:00
|
|
|
Eina_Bool no_free : 1;
|
|
|
|
Eina_Bool dirty : 1;
|
2006-12-17 07:48:52 -08:00
|
|
|
} cs;
|
2007-07-16 00:25:35 -07:00
|
|
|
|
2014-03-03 19:05:44 -08:00
|
|
|
/* RGBA stuff */
|
|
|
|
struct {
|
|
|
|
union {
|
|
|
|
DATA32 *data; /* Normal image */
|
|
|
|
DATA8 *data8; /* Alpha Mask stuff */
|
|
|
|
};
|
|
|
|
Eina_Bool no_free : 1;
|
|
|
|
} image;
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2009-03-26 00:14:08 -07:00
|
|
|
struct {
|
2013-10-10 01:44:24 -07:00
|
|
|
SLK(lock);
|
2009-03-26 00:14:08 -07:00
|
|
|
Eina_List *list;
|
2013-04-11 01:20:05 -07:00
|
|
|
Eina_Hash *hash;
|
2009-03-26 00:14:08 -07:00
|
|
|
unsigned long long orig_usage;
|
|
|
|
unsigned long long usage_count;
|
2009-03-26 05:47:44 -07:00
|
|
|
int populate_count;
|
2009-03-26 20:50:03 -07:00
|
|
|
unsigned long long newest_usage;
|
|
|
|
unsigned long long newest_usage_count;
|
2009-03-26 00:14:08 -07:00
|
|
|
} cache;
|
2011-04-22 04:47:14 -07:00
|
|
|
|
|
|
|
#ifdef HAVE_PIXMAN
|
|
|
|
struct {
|
|
|
|
pixman_image_t *im;
|
|
|
|
} pixman;
|
2011-08-11 18:52:29 -07:00
|
|
|
#endif
|
2015-02-03 03:35:41 -08:00
|
|
|
struct {
|
|
|
|
void *data; //Evas_Native_Surface ns;
|
|
|
|
struct {
|
2016-03-30 23:55:15 -07:00
|
|
|
void (*bind) (void *image, int x, int y, int w, int h);
|
|
|
|
void (*unbind) (void *image);
|
|
|
|
void (*free) (void *image);
|
2015-02-03 03:35:41 -08:00
|
|
|
} func;
|
|
|
|
} native;
|
2016-03-22 21:33:08 -07:00
|
|
|
|
|
|
|
/* data map/unmap */
|
|
|
|
RGBA_Image_Data_Map *maps;
|
2002-11-08 00:02:15 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _RGBA_Polygon_Point
|
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
EINA_INLIST;
|
2002-11-08 00:02:15 -08:00
|
|
|
int x, y;
|
|
|
|
};
|
|
|
|
|
2010-03-24 09:39:39 -07:00
|
|
|
struct _RGBA_Map_Point
|
|
|
|
{
|
|
|
|
FPc x, y; // x, y screenspace
|
2011-01-15 23:49:49 -08:00
|
|
|
float fx, fy, fz; // x, y, z in floats
|
|
|
|
// FPc x3, y3; // x, y 3d space
|
2010-03-24 09:39:39 -07:00
|
|
|
FPc z; // z in world space. optional
|
|
|
|
FPc u, v; // u, v in tex coords
|
|
|
|
DATA32 col; // color at this point
|
2010-09-21 23:52:28 -07:00
|
|
|
// for perspective correctness - only point 0 has relevant info
|
|
|
|
FPc px, py, z0, foc;
|
2010-03-24 09:39:39 -07:00
|
|
|
};
|
|
|
|
|
2012-06-14 02:58:16 -07:00
|
|
|
struct _RGBA_Map
|
|
|
|
{
|
|
|
|
void *engine_data;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
int w, h;
|
|
|
|
} image, uv;
|
|
|
|
|
|
|
|
int x, y;
|
|
|
|
int count;
|
|
|
|
|
|
|
|
RGBA_Map_Point pts[1];
|
|
|
|
};
|
|
|
|
|
2006-05-02 00:28:49 -07:00
|
|
|
struct _RGBA_Gfx_Compositor
|
|
|
|
{
|
2007-05-06 04:29:37 -07:00
|
|
|
const char *name;
|
2006-05-02 00:28:49 -07:00
|
|
|
|
|
|
|
void (*init)(void);
|
|
|
|
void (*shutdown)(void);
|
|
|
|
|
2014-11-12 18:27:50 -08:00
|
|
|
RGBA_Gfx_Func (*composite_pixel_span_get)(Eina_Bool src_alpha, Eina_Bool src_sparse_alpha, Eina_Bool dst_alpha, int pixels);
|
|
|
|
RGBA_Gfx_Func (*composite_color_span_get)(DATA32 col, Eina_Bool dst_alpha, int pixels);
|
|
|
|
RGBA_Gfx_Func (*composite_pixel_color_span_get)(Eina_Bool src_alpha, Eina_Bool src_sparse_alpha, DATA32 col, Eina_Bool dst_alpha, int pixels);
|
|
|
|
RGBA_Gfx_Func (*composite_mask_color_span_get)(DATA32 col, Eina_Bool dst_alpha, int pixels);
|
|
|
|
RGBA_Gfx_Func (*composite_pixel_mask_span_get)(Eina_Bool src_alpha, Eina_Bool src_sparse_alpha, Eina_Bool dst_alpha, int pixels);
|
|
|
|
|
|
|
|
RGBA_Gfx_Pt_Func (*composite_pixel_pt_get)(Eina_Bool src_alpha, Eina_Bool dst_alpha);
|
|
|
|
RGBA_Gfx_Pt_Func (*composite_color_pt_get)(DATA32 col, Eina_Bool dst_alpha);
|
|
|
|
RGBA_Gfx_Pt_Func (*composite_pixel_color_pt_get)(Eina_Bool src_alpha, DATA32 col, Eina_Bool dst_alpha);
|
|
|
|
RGBA_Gfx_Pt_Func (*composite_mask_color_pt_get)(DATA32 col, Eina_Bool dst_alpha);
|
|
|
|
RGBA_Gfx_Pt_Func (*composite_pixel_mask_pt_get)(Eina_Bool src_alpha, Eina_Bool dst_alpha);
|
2006-05-02 00:28:49 -07:00
|
|
|
};
|
|
|
|
|
2015-10-05 02:41:00 -07:00
|
|
|
#ifndef NEWTILER
|
|
|
|
typedef struct list_node list_node_t;
|
|
|
|
typedef struct list list_t;
|
|
|
|
typedef struct rect rect_t;
|
|
|
|
typedef struct rect_node rect_node_t;
|
|
|
|
|
|
|
|
struct list_node
|
|
|
|
{
|
|
|
|
struct list_node *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct list
|
|
|
|
{
|
|
|
|
struct list_node *head;
|
|
|
|
struct list_node *tail;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct rect
|
|
|
|
{
|
|
|
|
int left;
|
|
|
|
int top;
|
|
|
|
int right;
|
|
|
|
int bottom;
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
int area;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct rect_node
|
|
|
|
{
|
|
|
|
struct list_node _lst;
|
|
|
|
struct rect rect;
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
struct _Tilebuf
|
|
|
|
{
|
2013-04-11 05:23:07 -07:00
|
|
|
int outbuf_w, outbuf_h;
|
2015-10-05 02:41:00 -07:00
|
|
|
#ifdef NEWTILER
|
2015-09-23 06:22:27 -07:00
|
|
|
void *region;
|
2015-10-05 02:41:00 -07:00
|
|
|
#else
|
|
|
|
struct {
|
|
|
|
short w, h;
|
|
|
|
} tile_size;
|
|
|
|
int need_merge;
|
|
|
|
list_t rects;
|
|
|
|
struct {
|
|
|
|
int x, y, w, h;
|
|
|
|
} prev_add, prev_del;
|
|
|
|
Eina_Bool strict_tiles : 1;
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
#ifndef NEWTILER
|
|
|
|
struct _Tilebuf_Tile
|
|
|
|
{
|
|
|
|
Eina_Bool redraw : 1;
|
2002-11-08 00:02:15 -08:00
|
|
|
};
|
2015-10-05 02:41:00 -07:00
|
|
|
#endif
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
struct _Tilebuf_Rect
|
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
EINA_INLIST;
|
2002-11-08 00:02:15 -08:00
|
|
|
int x, y, w, h;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _Convert_Pal
|
|
|
|
{
|
|
|
|
int references;
|
|
|
|
int count;
|
|
|
|
Convert_Pal_Mode colors;
|
|
|
|
DATA8 *lookup;
|
|
|
|
void *data;
|
|
|
|
};
|
|
|
|
|
2007-07-16 00:25:35 -07:00
|
|
|
/****/
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/*****************************************************************************/
|
2005-12-03 01:27:53 -08:00
|
|
|
#include "evas_macros.h"
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2015-12-02 01:46:29 -08:00
|
|
|
#ifndef A_VAL
|
2002-11-08 00:02:15 -08:00
|
|
|
#ifndef WORDS_BIGENDIAN
|
|
|
|
/* x86 */
|
2011-04-20 19:30:34 -07:00
|
|
|
#define A_VAL(p) (((DATA8 *)(p))[3])
|
|
|
|
#define R_VAL(p) (((DATA8 *)(p))[2])
|
|
|
|
#define G_VAL(p) (((DATA8 *)(p))[1])
|
|
|
|
#define B_VAL(p) (((DATA8 *)(p))[0])
|
2002-11-08 00:02:15 -08:00
|
|
|
#define AR_VAL(p) ((DATA16 *)(p)[1])
|
|
|
|
#define GB_VAL(p) ((DATA16 *)(p)[0])
|
|
|
|
#else
|
|
|
|
/* ppc */
|
2011-04-20 19:30:34 -07:00
|
|
|
#define A_VAL(p) (((DATA8 *)(p))[0])
|
|
|
|
#define R_VAL(p) (((DATA8 *)(p))[1])
|
|
|
|
#define G_VAL(p) (((DATA8 *)(p))[2])
|
|
|
|
#define B_VAL(p) (((DATA8 *)(p))[3])
|
2002-11-08 00:02:15 -08:00
|
|
|
#define AR_VAL(p) ((DATA16 *)(p)[0])
|
|
|
|
#define GB_VAL(p) ((DATA16 *)(p)[1])
|
|
|
|
#endif
|
2015-12-02 01:46:29 -08:00
|
|
|
#endif
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2005-12-03 01:27:53 -08:00
|
|
|
#define RGB_JOIN(r,g,b) \
|
|
|
|
(((r) << 16) + ((g) << 8) + (b))
|
|
|
|
|
|
|
|
#define ARGB_JOIN(a,r,g,b) \
|
|
|
|
(((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
|
|
|
|
|
2006-05-02 00:28:49 -07:00
|
|
|
#include "evas_blend_ops.h"
|
|
|
|
|
2006-09-30 03:18:37 -07:00
|
|
|
#define _EVAS_RENDER_FILL -1
|
2006-05-02 00:28:49 -07:00
|
|
|
#define _EVAS_RENDER_BLEND 0
|
|
|
|
#define _EVAS_RENDER_BLEND_REL 1
|
|
|
|
#define _EVAS_RENDER_COPY 2
|
|
|
|
#define _EVAS_RENDER_COPY_REL 3
|
|
|
|
#define _EVAS_RENDER_ADD 4
|
|
|
|
#define _EVAS_RENDER_ADD_REL 5
|
|
|
|
#define _EVAS_RENDER_SUB 6
|
|
|
|
#define _EVAS_RENDER_SUB_REL 7
|
|
|
|
#define _EVAS_RENDER_TINT 8
|
|
|
|
#define _EVAS_RENDER_TINT_REL 9
|
|
|
|
#define _EVAS_RENDER_MASK 10
|
|
|
|
#define _EVAS_RENDER_MUL 11
|
2006-09-30 03:18:37 -07:00
|
|
|
#define _EVAS_RENDER_CLIP 12
|
2006-05-02 00:28:49 -07:00
|
|
|
|
|
|
|
#define _EVAS_TEXTURE_REFLECT 0
|
|
|
|
#define _EVAS_TEXTURE_REPEAT 1
|
|
|
|
#define _EVAS_TEXTURE_RESTRICT 2
|
|
|
|
#define _EVAS_TEXTURE_RESTRICT_REFLECT 3
|
|
|
|
#define _EVAS_TEXTURE_RESTRICT_REPEAT 4
|
|
|
|
#define _EVAS_TEXTURE_PAD 5
|
2005-12-03 01:27:53 -08:00
|
|
|
|
|
|
|
#define _EVAS_COLOR_SPACE_ARGB 0
|
|
|
|
#define _EVAS_COLOR_SPACE_AHSV 1
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
2011-06-12 19:57:01 -07:00
|
|
|
#define SCALE_SIZE_MAX ((1 << 15) - 1)
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/****/
|
2015-02-20 06:04:52 -08:00
|
|
|
EAPI void evas_common_init (void);
|
|
|
|
EAPI void evas_common_shutdown (void);
|
2005-12-03 01:27:53 -08:00
|
|
|
|
2006-09-06 00:33:40 -07:00
|
|
|
EAPI void evas_common_cpu_init (void);
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2002-11-13 21:38:10 -08:00
|
|
|
int evas_common_cpu_have_cpuid (void);
|
2003-12-09 20:10:55 -08:00
|
|
|
int evas_common_cpu_has_feature (unsigned int feature);
|
2006-09-06 00:33:40 -07:00
|
|
|
EAPI void evas_common_cpu_can_do (int *mmx, int *sse, int *sse2);
|
|
|
|
EAPI void evas_common_cpu_end_opt (void);
|
2007-07-16 00:38:48 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/****/
|
2012-11-04 03:51:42 -08:00
|
|
|
#include "../common/evas_blend.h"
|
2006-05-02 00:28:49 -07:00
|
|
|
|
2006-09-06 00:33:40 -07:00
|
|
|
EAPI Gfx_Func_Copy evas_common_draw_func_copy_get (int pixels, int reverse);
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
/****/
|
2012-11-04 03:51:42 -08:00
|
|
|
#include "../common/evas_convert_color.h"
|
|
|
|
#include "../common/evas_convert_colorspace.h"
|
|
|
|
#include "../common/evas_convert_main.h"
|
|
|
|
#include "../common/evas_convert_yuv.h"
|
|
|
|
#include "../common/evas_scale_main.h"
|
|
|
|
#include "../common/evas_scale_smooth.h"
|
|
|
|
#include "../common/evas_scale_span.h"
|
2006-05-02 00:28:49 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/****/
|
2012-11-04 03:51:42 -08:00
|
|
|
#include "../common/evas_image.h"
|
2006-05-02 00:28:49 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/****/
|
2012-11-04 03:51:42 -08:00
|
|
|
#include "../common/evas_line.h"
|
|
|
|
#include "../common/evas_polygon.h"
|
|
|
|
#include "../common/evas_rectangle.h"
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
/****/
|
2006-09-06 00:33:40 -07:00
|
|
|
EAPI void evas_common_blit_init (void);
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2007-07-16 00:29:34 -07:00
|
|
|
EAPI void evas_common_blit_rectangle (const RGBA_Image *src, RGBA_Image *dst, int src_x, int src_y, int w, int h, int dst_x, int dst_y);
|
2002-11-08 00:02:15 -08:00
|
|
|
|
|
|
|
/****/
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/****/
|
2006-09-06 00:33:40 -07:00
|
|
|
EAPI void evas_common_tilebuf_init (void);
|
|
|
|
|
|
|
|
EAPI Tilebuf *evas_common_tilebuf_new (int w, int h);
|
|
|
|
EAPI void evas_common_tilebuf_free (Tilebuf *tb);
|
|
|
|
EAPI void evas_common_tilebuf_set_tile_size (Tilebuf *tb, int tw, int th);
|
|
|
|
EAPI void evas_common_tilebuf_get_tile_size (Tilebuf *tb, int *tw, int *th);
|
2013-04-11 05:23:07 -07:00
|
|
|
EAPI void evas_common_tilebuf_tile_strict_set (Tilebuf *tb, Eina_Bool strict);
|
2006-09-06 00:33:40 -07:00
|
|
|
EAPI int evas_common_tilebuf_add_redraw (Tilebuf *tb, int x, int y, int w, int h);
|
|
|
|
EAPI int evas_common_tilebuf_del_redraw (Tilebuf *tb, int x, int y, int w, int h);
|
|
|
|
EAPI int evas_common_tilebuf_add_motion_vector (Tilebuf *tb, int x, int y, int w, int h, int dx, int dy, int alpha);
|
|
|
|
EAPI void evas_common_tilebuf_clear (Tilebuf *tb);
|
|
|
|
EAPI Tilebuf_Rect *evas_common_tilebuf_get_render_rects (Tilebuf *tb);
|
|
|
|
EAPI void evas_common_tilebuf_free_render_rects (Tilebuf_Rect *rects);
|
2005-02-04 18:30:13 -08:00
|
|
|
|
2005-07-22 03:28:11 -07:00
|
|
|
/*
|
2005-02-04 18:30:13 -08:00
|
|
|
Regionbuf *evas_common_regionbuf_new (int w, int h);
|
|
|
|
void evas_common_regionbuf_free (Regionbuf *rb);
|
|
|
|
void evas_common_regionbuf_clear (Regionbuf *rb);
|
|
|
|
void evas_common_regionbuf_span_add (Regionbuf *rb, int x1, int x2, int y);
|
|
|
|
void evas_common_regionbuf_span_del (Regionbuf *rb, int x1, int x2, int y);
|
|
|
|
Tilebuf_Rect *evas_common_regionbuf_rects_get (Regionbuf *rb);
|
2005-07-22 03:28:11 -07:00
|
|
|
*/
|
2007-07-16 00:38:48 -07:00
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/****/
|
2012-11-04 03:51:42 -08:00
|
|
|
#include "../common/evas_draw.h"
|
2007-07-16 00:38:48 -07:00
|
|
|
|
2012-11-04 03:51:42 -08:00
|
|
|
#include "../common/evas_map_image.h"
|
2009-10-17 03:25:51 -07:00
|
|
|
|
2006-11-13 15:23:44 -08:00
|
|
|
/****/
|
2012-11-04 03:51:42 -08:00
|
|
|
#include "../common/evas_pipe.h"
|
2009-06-24 21:20:34 -07:00
|
|
|
|
2017-04-27 19:24:48 -07:00
|
|
|
EAPI void evas_thread_queue_wait(void);
|
|
|
|
|
2013-06-03 22:07:18 -07:00
|
|
|
EAPI int evas_async_events_process_blocking(void);
|
|
|
|
void evas_render_rendering_wait(Evas_Public_Data *evas);
|
2013-10-17 12:13:24 -07:00
|
|
|
void evas_all_sync(void);
|
2012-12-18 08:26:44 -08:00
|
|
|
|
2016-11-21 21:33:48 -08:00
|
|
|
int evas_thread_init(void);
|
|
|
|
int evas_thread_shutdown(void);
|
2012-12-30 15:39:11 -08:00
|
|
|
EAPI void evas_thread_cmd_enqueue(Evas_Thread_Command_Cb cb, void *data);
|
|
|
|
EAPI void evas_thread_queue_flush(Evas_Thread_Command_Cb cb, void *data);
|
2013-09-02 16:01:37 -07:00
|
|
|
|
2012-12-19 08:15:58 -08:00
|
|
|
typedef enum _Evas_Render_Mode
|
|
|
|
{
|
|
|
|
EVAS_RENDER_MODE_UNDEF,
|
|
|
|
EVAS_RENDER_MODE_SYNC,
|
|
|
|
EVAS_RENDER_MODE_ASYNC_INIT,
|
|
|
|
EVAS_RENDER_MODE_ASYNC_END,
|
|
|
|
} Evas_Render_Mode;
|
|
|
|
|
2007-07-16 00:25:35 -07:00
|
|
|
/****/
|
|
|
|
|
2013-01-17 14:14:05 -08:00
|
|
|
void evas_common_rgba_image_scalecache_items_ref(Image_Entry *ie, Eina_Array *ret);
|
|
|
|
void evas_common_rgba_image_scalecache_item_unref(Image_Entry *ie);
|
2013-01-16 20:06:22 -08:00
|
|
|
|
2017-11-08 17:31:12 -08:00
|
|
|
// Generic Cache
|
|
|
|
typedef struct _Generic_Cache Generic_Cache;
|
|
|
|
typedef struct _Generic_Cache_Entry Generic_Cache_Entry;
|
|
|
|
|
|
|
|
struct _Generic_Cache_Entry
|
|
|
|
{
|
|
|
|
void *key; // pointer
|
|
|
|
void *data; // engine image
|
|
|
|
int ref;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef void (*Generic_Cache_Free)(void *user_data, void *data);
|
|
|
|
|
|
|
|
struct _Generic_Cache
|
|
|
|
{
|
|
|
|
Eina_Hash *hash;
|
|
|
|
Eina_List *lru_list;
|
|
|
|
void *user_data;
|
|
|
|
Generic_Cache_Free free_func;
|
|
|
|
};
|
|
|
|
|
|
|
|
EAPI Generic_Cache* generic_cache_new(void *user_data, Generic_Cache_Free func);
|
|
|
|
EAPI void generic_cache_destroy(Generic_Cache *cache);
|
|
|
|
EAPI void generic_cache_dump(Generic_Cache *cache);
|
|
|
|
EAPI void generic_cache_data_set(Generic_Cache *cache, void *key, void *data);
|
|
|
|
EAPI void *generic_cache_data_get(Generic_Cache *cache, void *key);
|
|
|
|
EAPI void generic_cache_data_drop(Generic_Cache *cache, void *key);
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2010-07-28 05:00:41 -07:00
|
|
|
|
2017-08-13 12:11:02 -07:00
|
|
|
#undef EAPI
|
|
|
|
#define EAPI
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
#endif
|