int (*size_set)(Image_Entry *dst, const Image_Entry *src, unsigned int w, unsigned int h);
/* The destination surface does not have any surface. */
- int (*copied_data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
+ int (*copied_data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace);
/* The destination surface does not have any surface. */
- int (*data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
- int (*color_space)(Image_Entry *dst, int cspace);
+ int (*data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace);
+ int (*color_space)(Image_Entry *dst, Evas_Colorspace cspace);
/* This function need to update im->w and im->h. */
int (*load)(Image_Entry *im); /**< return is EVAS_LOAD_ERROR_* or EVAS_LOAD_ERROR_NONE! */
EAPI void evas_cache_image_unload_all(Evas_Cache_Image *cache);
EAPI void evas_cache_image_surface_alloc(Image_Entry *im, unsigned int w, unsigned int h);
EAPI DATA32* evas_cache_image_pixels(Image_Entry *im);
-EAPI Image_Entry* evas_cache_image_copied_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
-EAPI Image_Entry* evas_cache_image_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
+EAPI Image_Entry* evas_cache_image_copied_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace);
+EAPI Image_Entry* evas_cache_image_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace);
EAPI void evas_cache_image_colorspace(Image_Entry *im, Evas_Colorspace cspace);
EAPI Image_Entry* evas_cache_image_empty(Evas_Cache_Image *cache);
EAPI Image_Entry* evas_cache_image_size_set(Image_Entry *im, unsigned int w, unsigned int h);
EAPI void evas_cache_engine_image_drop(Engine_Image_Entry *eim);
EAPI Engine_Image_Entry* evas_cache_engine_image_alone(Engine_Image_Entry *eim, void *data);
EAPI Engine_Image_Entry* evas_cache_engine_image_dirty(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
-EAPI Engine_Image_Entry* evas_cache_engine_image_copied_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data);
-EAPI Engine_Image_Entry* evas_cache_engine_image_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data);
-EAPI void evas_cache_engine_image_colorspace(Engine_Image_Entry *eim, int cspace, void *engine_data);
+EAPI Engine_Image_Entry* evas_cache_engine_image_copied_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace, void *engine_data);
+EAPI Engine_Image_Entry* evas_cache_engine_image_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace, void *engine_data);
+EAPI void evas_cache_engine_image_colorspace(Engine_Image_Entry *eim, Evas_Colorspace cspace, void *engine_data);
EAPI Engine_Image_Entry* evas_cache_engine_image_size_set(Engine_Image_Entry *eim, unsigned int w, unsigned int h);
EAPI void evas_cache_engine_image_load_data(Engine_Image_Entry *eim);
}
EAPI Engine_Image_Entry *
-evas_cache_engine_image_copied_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data)
+evas_cache_engine_image_copied_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace, void *engine_data)
{
Image_Entry *im;
}
EAPI Engine_Image_Entry *
-evas_cache_engine_image_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data)
+evas_cache_engine_image_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace, void *engine_data)
{
Image_Entry *im;
}
EAPI void
-evas_cache_engine_image_colorspace(Engine_Image_Entry *eim, int cspace, void *engine_data)
+evas_cache_engine_image_colorspace(Engine_Image_Entry *eim, Evas_Colorspace cspace, void *engine_data)
{
Evas_Cache_Engine_Image *cache = eim->cache;
EAPI Image_Entry *
evas_cache_image_copied_data(Evas_Cache_Image *cache,
unsigned int w, unsigned int h,
- DATA32 *image_data, int alpha, int cspace)
+ DATA32 *image_data, int alpha,
+ Evas_Colorspace cspace)
{
Image_Entry *im;
}
EAPI Image_Entry *
-evas_cache_image_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace)
+evas_cache_image_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h,
+ DATA32 *image_data, int alpha, Evas_Colorspace cspace)
{
Image_Entry *im;
}
EAPI Image_Entry *
-evas_cache2_image_copied_data(Evas_Cache2 *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace)
+evas_cache2_image_copied_data(Evas_Cache2 *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace)
{
Image_Entry *im;
}
EAPI Image_Entry *
-evas_cache2_image_data(Evas_Cache2 *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace)
+evas_cache2_image_data(Evas_Cache2 *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace)
{
Image_Entry *im;
int (*size_set)(Image_Entry *dst, const Image_Entry *src, unsigned int w, unsigned int h);
/* The destination surface does not have any surface. */
- int (*copied_data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
+ int (*copied_data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace);
/* The destination surface does not have any surface. */
- int (*data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
- int (*color_space)(Image_Entry *dst, int cspace);
+ int (*data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace);
+ int (*color_space)(Image_Entry *dst, Evas_Colorspace cspace);
/* This function need to update im->w and im->h. */
// int (*load)(Image_Entry *im); /**< return is EVAS_LOAD_ERROR_* or EVAS_LOAD_ERROR_NONE! */
EAPI DATA32 * evas_cache2_image_pixels(Image_Entry *im);
EAPI Image_Entry * evas_cache2_image_writable(Image_Entry *im);
-EAPI Image_Entry * evas_cache2_image_data(Evas_Cache2 *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
-EAPI Image_Entry * evas_cache2_image_copied_data(Evas_Cache2 *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
+EAPI Image_Entry * evas_cache2_image_data(Evas_Cache2 *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace);
+EAPI Image_Entry * evas_cache2_image_copied_data(Evas_Cache2 *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace);
EAPI Image_Entry * evas_cache2_image_size_set(Image_Entry *im, unsigned int w, unsigned h);
EAPI Image_Entry * evas_cache2_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
EAPI Image_Entry * evas_cache2_image_empty(Evas_Cache2 *cache);
#include "evas_image.h"
int
-evas_common_rgba_image_from_data(Image_Entry* ie_dst, int w, int h, DATA32 *image_data, int alpha, int cspace)
+evas_common_rgba_image_from_data(Image_Entry* ie_dst, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace)
{
RGBA_Image *dst = (RGBA_Image *) ie_dst;
dst->cache_entry.h = h;
dst->cs.data = image_data;
dst->cs.no_free = 1;
- break;
+ break;
default:
abort();
break;
}
int
-evas_common_rgba_image_from_copied_data(Image_Entry* ie_dst, int w, int h, DATA32 *image_data, int alpha, int cspace)
+evas_common_rgba_image_from_copied_data(Image_Entry* ie_dst, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace)
{
RGBA_Image *dst = (RGBA_Image *) ie_dst;
#define _EVAS_IMAGE_PRIVATE_H
int evas_common_rgba_image_size_set (Image_Entry* dst, const Image_Entry* im, unsigned int w, unsigned int h);
-int evas_common_rgba_image_from_copied_data (Image_Entry* dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
-int evas_common_rgba_image_from_data (Image_Entry* dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
-int evas_common_rgba_image_colorspace_set (Image_Entry* dst, int cspace);
+int evas_common_rgba_image_from_copied_data (Image_Entry* dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace);
+int evas_common_rgba_image_from_data (Image_Entry* dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace);
+int evas_common_rgba_image_colorspace_set (Image_Entry* dst, Evas_Colorspace cspace);
void evas_common_scalecache_init(void);
void evas_common_scalecache_shutdown(void);
void *(*image_load) (void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo);
void *(*image_mmap) (void *data, Eina_File *f, const char *key, int *error, Evas_Image_Load_Opts *lo);
- void *(*image_new_from_data) (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
- void *(*image_new_from_copied_data) (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
+ void *(*image_new_from_data) (void *data, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace);
+ void *(*image_new_from_copied_data) (void *data, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace);
void (*image_free) (void *data, void *image);
void (*image_size_get) (void *data, void *image, int *w, int *h);
void *(*image_size_set) (void *data, void *image, int w, int h);
Eina_Bool (*image_draw) (void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth, Eina_Bool do_async);
char *(*image_comment_get) (void *data, void *image, char *key);
char *(*image_format_get) (void *data, void *image);
- void (*image_colorspace_set) (void *data, void *image, int cspace);
- int (*image_colorspace_get) (void *data, void *image);
+ void (*image_colorspace_set) (void *data, void *image, Evas_Colorspace cspace);
+ Evas_Colorspace (*image_colorspace_get) (void *data, void *image);
Eina_Bool (*image_can_region_get) (void *data, void *image);
void *(*image_native_set) (void *data, void *image, void *native);
void *(*image_native_get) (void *data, void *image);
return im->alpha;
}
-static int
+static Evas_Colorspace
eng_image_colorspace_get(void *data EINA_UNUSED, void *image)
{
// Render_Engine *re;
}
static void
-eng_image_colorspace_set(void *data, void *image, int cspace)
+eng_image_colorspace_set(void *data, void *image, Evas_Colorspace cspace)
{
Render_Engine *re;
Evas_GL_Image *im;
}
static void *
-eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
+eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace)
{
Render_Engine *re;
}
static void *
-eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
+eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace)
{
Render_Engine *re;
// if im->im == NULL, it's a render-surface so these here are used
int w, h;
struct {
- int space;
+ Evas_Colorspace space;
void *data;
unsigned char no_free : 1;
} cs;
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_mmap(Evas_Engine_GL_Context *gc, Eina_File *f, 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_new_from_data(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, Evas_Colorspace 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, Evas_Colorspace cspace);
+Evas_GL_Image *evas_gl_common_image_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_Colorspace 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);
{
Evas_GL_Image *im;
Eina_List *l;
- int cspace = EVAS_COLORSPACE_ARGB8888;
+ Evas_Colorspace cspace = EVAS_COLORSPACE_ARGB8888;
/* i'd LOVe to do this, but we can't because we load to load header
* to get image size to know if its too big or not! so this disallows
}
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_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, Evas_Colorspace 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_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, Evas_Colorspace 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_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_Colorspace cspace)
{
Evas_GL_Image *im;
return im ? im->alpha : 1;
}
-static int
+static Evas_Colorspace
eng_image_colorspace_get(void *data EINA_UNUSED, void *image)
{
Evas_GL_Image *im = image;
}
static void
-eng_image_colorspace_set(void *data EINA_UNUSED, void *image, int cspace)
+eng_image_colorspace_set(void *data EINA_UNUSED, void *image, Evas_Colorspace cspace)
{
Evas_GL_Image *im;
}
static void *
-eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
+eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace)
{
Render_Engine *re = data;
}
static void *
-eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
+eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace)
{
Render_Engine *re = data;
return im->alpha;
}
-static int
+static Evas_Colorspace
eng_image_colorspace_get(void *data EINA_UNUSED, void *image)
{
// Render_Engine *re;
}
static void
-eng_image_colorspace_set(void *data, void *image, int cspace)
+eng_image_colorspace_set(void *data, void *image, Evas_Colorspace cspace)
{
Render_Engine *re;
Evas_GL_Image *im;
}
static void *
-eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
+eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace)
{
Render_Engine *re;
}
static void *
-eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
+eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace)
{
Render_Engine *re;
case EVAS_COLORSPACE_YCBCR420TM12601_PL:
w &= ~0x1;
break;
+ default: break;
}
evas_gl_common_image_alloc_ensure(im_old);
return 0;
}
-static int
+static Evas_Colorspace
eng_image_colorspace_get(void *data EINA_UNUSED, void *image)
{
Image_Entry *im;
}
static void
-eng_image_colorspace_set(void *data EINA_UNUSED, void *image, int cspace)
+eng_image_colorspace_set(void *data EINA_UNUSED, void *image, Evas_Colorspace cspace)
{
Image_Entry *im;
}
static void *
-eng_image_new_from_data(void *data EINA_UNUSED, int w, int h, DATA32 *image_data, int alpha, int cspace)
+eng_image_new_from_data(void *data EINA_UNUSED, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace)
{
#ifdef EVAS_CSERVE2
if (evas_cserve2_use_get())
}
static void *
-eng_image_new_from_copied_data(void *data EINA_UNUSED, int w, int h, DATA32 *image_data, int alpha, int cspace)
+eng_image_new_from_copied_data(void *data EINA_UNUSED, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace)
{
#ifdef EVAS_CSERVE2
if (evas_cserve2_use_get())
static void _native_unbind_cb(void *data EINA_UNUSED, void *image);
static void _native_free_cb(void *data, void *image);
-static int eng_image_colorspace_get(void *data EINA_UNUSED, void *image);
+static Evas_Colorspace eng_image_colorspace_get(void *data EINA_UNUSED, void *image);
static int eng_image_alpha_get(void *data EINA_UNUSED, void *image);
static Eina_Bool eng_gl_preload_make_current(void *data, void *doit);
}
static void *
-eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
+eng_image_new_from_data(void *data, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace)
{
Render_Engine *re;
}
static void *
-eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, int cspace)
+eng_image_new_from_copied_data(void *data, int w, int h, DATA32 *image_data, int alpha, Evas_Colorspace cspace)
{
Render_Engine *re;
}
static void
-eng_image_colorspace_set(void *data, void *image, int cspace)
+eng_image_colorspace_set(void *data, void *image, Evas_Colorspace cspace)
{
Render_Engine *re;
Evas_GL_Image *im;
im->cs.space = cspace;
}
-static int
+static Evas_Colorspace
eng_image_colorspace_get(void *data EINA_UNUSED, void *image)
{
Evas_GL_Image *im;