colorspace work mostly. not complete.
SVN revision: 27630
This commit is contained in:
parent
e1f4f1c1cf
commit
b51bdcbc1e
|
@ -97,7 +97,7 @@ evas_gl_common_context_use(Evas_GL_Context *gc)
|
|||
void
|
||||
evas_gl_common_context_resize(Evas_GL_Context *gc, int w, int h)
|
||||
{
|
||||
if ((gc->w == w) && (gc->h == h)) return;
|
||||
//if ((gc->w == w) && (gc->h == h)) return;
|
||||
gc->change.size = 1;
|
||||
gc->w = w;
|
||||
gc->h = h;
|
||||
|
|
|
@ -140,6 +140,7 @@ evas_gl_common_image_new_from_copied_data(Evas_GL_Context *gc, int w, int h, int
|
|||
im->im->image->data = NULL;
|
||||
if (im->tex) evas_gl_common_texture_free(im->tex);
|
||||
im->tex = NULL;
|
||||
im->cs.no_free = 0;
|
||||
im->cs.data = calloc(1, im->im->image->h * sizeof(unsigned char *) * 2);
|
||||
if ((data) && (im->cs.data))
|
||||
memcpy(im->cs.data, data, im->im->image->h * sizeof(unsigned char *) * 2);
|
||||
|
@ -254,10 +255,20 @@ evas_gl_common_image_draw(Evas_GL_Context *gc, Evas_GL_Image *im, int sx, int sy
|
|||
if (!im->tex) return;
|
||||
ow = (dw * im->tex->tw) / sw;
|
||||
oh = (dh * im->tex->th) / sh;
|
||||
if (im->tex->rectangle)
|
||||
{
|
||||
tx1 = sx;
|
||||
ty1 = sy;
|
||||
tx2 = sx + sw;
|
||||
ty2 = sy + sh;
|
||||
}
|
||||
else
|
||||
{
|
||||
tx1 = (double)(sx ) / (double)(im->tex->w);
|
||||
ty1 = (double)(sy ) / (double)(im->tex->h);
|
||||
tx2 = (double)(sx + sw) / (double)(im->tex->w);
|
||||
ty2 = (double)(sy + sh) / (double)(im->tex->h);
|
||||
}
|
||||
evas_gl_common_context_texture_set(gc, im->tex, smooth, ow, oh);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -420,7 +420,8 @@ evas_gl_common_ycbcr601pl_texture_new(Evas_GL_Context *gc, unsigned char **rows,
|
|||
GLenum texfmt;
|
||||
GLhandleARB fshad;
|
||||
|
||||
if (!gc->ext.arb_texture_non_power_of_two) return NULL;
|
||||
// on an nv 6600gt this is fast - but on a 5500fx its DEAD SLOW!!!!!
|
||||
// if (!gc->ext.arb_texture_non_power_of_two) return NULL;
|
||||
|
||||
tex = calloc(1, sizeof(Evas_GL_Texture));
|
||||
if (!tex) return NULL;
|
||||
|
|
|
@ -150,6 +150,7 @@ eng_output_redraws_rect_add(void *data, int x, int y, int w, int h)
|
|||
Render_Engine *re;
|
||||
|
||||
re = (Render_Engine *)data;
|
||||
evas_gl_common_context_resize(re->win->gl_context, re->win->w, re->win->h);
|
||||
/* smple bounding box */
|
||||
if (!re->win->draw.redraw)
|
||||
{
|
||||
|
@ -747,9 +748,10 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
|
|||
eng_image_colorspace_get(data, image));
|
||||
if (!im_new)
|
||||
{
|
||||
return im;
|
||||
*image_data = NULL;
|
||||
return im;
|
||||
}
|
||||
evas_gl_common_image_free(im);
|
||||
im = im_new;
|
||||
}
|
||||
else
|
||||
|
@ -790,6 +792,7 @@ eng_image_data_put(void *data, void *image, DATA32 *image_data)
|
|||
im2 = eng_image_new_from_data(data, w, h, image_data,
|
||||
eng_image_alpha_get(data, image),
|
||||
eng_image_colorspace_get(data, image));
|
||||
if (!im2) return im;
|
||||
evas_gl_common_image_free(im);
|
||||
im = im2;
|
||||
}
|
||||
|
|
|
@ -462,6 +462,130 @@ eng_gradient_draw(void *data, void *context, void *surface, void *gradient, int
|
|||
_xre_gradient_draw(surface, context, gradient, x, y, w, h);
|
||||
}
|
||||
|
||||
static int
|
||||
eng_image_alpha_get(void *data, void *image)
|
||||
{
|
||||
if (!image) return 0;
|
||||
return _xre_image_alpha_get((XR_Image *)image);
|
||||
}
|
||||
|
||||
static int
|
||||
eng_image_colorspace_get(void *data, void *image)
|
||||
{
|
||||
if (!image) return EVAS_COLORSPACE_ARGB8888;
|
||||
return ((XR_Image *)image)->cs.space;
|
||||
}
|
||||
|
||||
static void *
|
||||
eng_image_alpha_set(void *data, void *image, int has_alpha)
|
||||
{
|
||||
XR_Image *im;
|
||||
|
||||
im = (XR_Image *)image;
|
||||
if (!im) return im;
|
||||
if (im->cs.space != EVAS_COLORSPACE_ARGB8888) return im;
|
||||
if (((im->alpha) && (has_alpha)) || ((!im->alpha) && (!has_alpha)))
|
||||
return im;
|
||||
if (im->references > 1)
|
||||
{
|
||||
XR_Image *old_im;
|
||||
|
||||
old_im = im;
|
||||
im = _xre_image_copy(old_im);
|
||||
if (im)
|
||||
{
|
||||
im->alpha = old_im->alpha;
|
||||
_xre_image_free(old_im);
|
||||
}
|
||||
else
|
||||
im = old_im;
|
||||
}
|
||||
else
|
||||
_xre_image_dirty(im);
|
||||
_xre_image_alpha_set(im, has_alpha);
|
||||
return im;
|
||||
}
|
||||
|
||||
static void *
|
||||
eng_image_border_set(void *data, void *image, int l, int r, int t, int b)
|
||||
{
|
||||
if (!image) return image;
|
||||
_xre_image_border_set((XR_Image *)image, l, r, t, b);
|
||||
return image;
|
||||
}
|
||||
|
||||
static void
|
||||
eng_image_border_get(void *data, void *image, int *l, int *r, int *t, int *b)
|
||||
{
|
||||
if (!image) return;
|
||||
_xre_image_border_get((XR_Image *)image, l, r, t, b);
|
||||
}
|
||||
|
||||
static const char *
|
||||
eng_image_comment_get(void *data, void *image, char *key)
|
||||
{
|
||||
if (!image) return NULL;
|
||||
return ((XR_Image *)image)->comment;
|
||||
}
|
||||
|
||||
static char *
|
||||
eng_image_format_get(void *data, void *image)
|
||||
{
|
||||
if (!image) return NULL;
|
||||
return ((XR_Image *)image)->format;
|
||||
}
|
||||
|
||||
static void
|
||||
eng_image_colorspace_set(void *data, void *image, int cspace)
|
||||
{
|
||||
XR_Image *im;
|
||||
|
||||
if (!image) return;
|
||||
im = (XR_Image *)image;
|
||||
if (im->cs.space == cspace) return;
|
||||
switch (cspace)
|
||||
{
|
||||
case EVAS_COLORSPACE_ARGB8888:
|
||||
if (im->cs.data)
|
||||
{
|
||||
if (!im->cs.no_free) free(im->cs.data);
|
||||
im->cs.data = NULL;
|
||||
im->cs.no_free = 0;
|
||||
}
|
||||
if (im->im) evas_common_image_unref(im->im);
|
||||
im->im = NULL;
|
||||
break;
|
||||
case EVAS_COLORSPACE_YCBCR422P601_PL:
|
||||
case EVAS_COLORSPACE_YCBCR422P709_PL:
|
||||
if (im->im) evas_common_image_unref(im->im);
|
||||
im->im = NULL;
|
||||
if (im->cs.data)
|
||||
{
|
||||
if (!im->cs.no_free) free(im->cs.data);
|
||||
}
|
||||
im->cs.data = calloc(1, im->h * sizeof(unsigned char *) * 2);
|
||||
im->cs.no_free = 0;
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
im->cs.space = cspace;
|
||||
_xre_image_dirty(im);
|
||||
_xre_image_region_dirty(im, 0, 0, im->w, im->h);
|
||||
}
|
||||
|
||||
static void
|
||||
eng_image_native_set(void *data, void *image, void *native)
|
||||
{
|
||||
}
|
||||
|
||||
static void *
|
||||
eng_image_native_get(void *data, void *image)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void *
|
||||
eng_image_load(void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo)
|
||||
{
|
||||
|
@ -514,29 +638,35 @@ eng_image_size_get(void *data, void *image, int *w, int *h)
|
|||
static void *
|
||||
eng_image_size_set(void *data, void *image, int w, int h)
|
||||
{
|
||||
if (!image) return image;
|
||||
XR_Image *im, *im_old;
|
||||
|
||||
if (!image) return NULL;
|
||||
im_old = image;
|
||||
if ((im_old) && (im_old->w == w) && (im_old->h == h))
|
||||
return image;
|
||||
if ((w <= 0) || (h <= 0))
|
||||
{
|
||||
_xre_image_free((XR_Image *)image);
|
||||
return NULL;
|
||||
}
|
||||
if (((XR_Image *)image)->references > 1)
|
||||
if (im_old)
|
||||
{
|
||||
XR_Image *old_image;
|
||||
|
||||
old_image = (XR_Image *)image;
|
||||
image = _xre_image_copy((XR_Image *)old_image);
|
||||
if (image)
|
||||
if (im_old->references > 1)
|
||||
{
|
||||
((XR_Image *)image)->alpha = old_image->alpha;
|
||||
_xre_image_free(old_image);
|
||||
}
|
||||
else
|
||||
image = old_image;
|
||||
im = _xre_image_copy(im_old);
|
||||
if (im)
|
||||
{
|
||||
_xre_image_free(im_old);
|
||||
return im;
|
||||
}
|
||||
return image;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_xre_image_dirty((XR_Image *)image);
|
||||
_xre_image_resize((XR_Image *)image, w, h);
|
||||
}
|
||||
return image;
|
||||
}
|
||||
|
||||
|
@ -552,115 +682,113 @@ eng_image_dirty_region(void *data, void *image, int x, int y, int w, int h)
|
|||
static void *
|
||||
eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
|
||||
{
|
||||
if (!image) return image;
|
||||
XR_Image *im;
|
||||
|
||||
if (!image)
|
||||
{
|
||||
*image_data = NULL;
|
||||
return NULL;
|
||||
}
|
||||
im = (XR_Image *)image;
|
||||
if (im->im)
|
||||
evas_common_load_image_data_from_file(im->im);
|
||||
switch (im->cs.space)
|
||||
{
|
||||
case EVAS_COLORSPACE_ARGB8888:
|
||||
if (to_write)
|
||||
{
|
||||
if (((XR_Image *)image)->references > 1)
|
||||
if (im->references > 1)
|
||||
{
|
||||
XR_Image *old_image;
|
||||
XR_Image *im_old;
|
||||
|
||||
old_image = (XR_Image *)image;
|
||||
image = _xre_image_copy((XR_Image *)old_image);
|
||||
if (image)
|
||||
{
|
||||
((XR_Image *)image)->alpha = old_image->alpha;
|
||||
_xre_image_free(old_image);
|
||||
im_old = im;
|
||||
im = _xre_image_copy(im_old);
|
||||
if (im)
|
||||
_xre_image_free(im_old);
|
||||
else
|
||||
im = im_old;
|
||||
}
|
||||
else
|
||||
image = old_image;
|
||||
_xre_image_dirty(im);
|
||||
}
|
||||
else
|
||||
_xre_image_dirty((XR_Image *)image);
|
||||
break;
|
||||
case EVAS_COLORSPACE_YCBCR422P601_PL:
|
||||
case EVAS_COLORSPACE_YCBCR422P709_PL:
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
if (image_data) *image_data = _xre_image_data_get((XR_Image *)image);
|
||||
return image;
|
||||
if (image_data) *image_data = _xre_image_data_get(im);
|
||||
return im;
|
||||
}
|
||||
|
||||
static void *
|
||||
eng_image_data_put(void *data, void *image, DATA32 *image_data)
|
||||
{
|
||||
if (!image) return image;
|
||||
if (_xre_image_data_get((XR_Image *)image) != image_data)
|
||||
{
|
||||
XR_Image *old_image;
|
||||
XR_Image *im;
|
||||
|
||||
old_image = (XR_Image *)image;
|
||||
if (!image) return image;
|
||||
im = (XR_Image *)image;
|
||||
|
||||
switch (im->cs.space)
|
||||
{
|
||||
case EVAS_COLORSPACE_ARGB8888:
|
||||
if (_xre_image_data_get(im) != image_data)
|
||||
{
|
||||
XR_Image *im_old;
|
||||
|
||||
im_old = im;
|
||||
image = _xre_image_data_find(image_data);
|
||||
if (image != old_image)
|
||||
if (image != im_old)
|
||||
{
|
||||
if (!image)
|
||||
{
|
||||
image = _xre_image_new_from_data(old_image->xinf, old_image->w, old_image->h, image_data, old_image->alpha, EVAS_COLORSPACE_ARGB8888);
|
||||
image = _xre_image_new_from_data(im_old->xinf, im_old->w, im_old->h, image_data, im_old->alpha, EVAS_COLORSPACE_ARGB8888);
|
||||
if (image)
|
||||
{
|
||||
((XR_Image *)image)->alpha = old_image->alpha;
|
||||
_xre_image_free(old_image);
|
||||
((XR_Image *)image)->alpha = im_old->alpha;
|
||||
_xre_image_free(im_old);
|
||||
}
|
||||
else
|
||||
image = old_image;
|
||||
image = im_old;
|
||||
}
|
||||
else
|
||||
{
|
||||
_xre_image_free(old_image);
|
||||
_xre_image_free(im_old);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_xre_image_free(image);
|
||||
image = im_old;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EVAS_COLORSPACE_YCBCR422P601_PL:
|
||||
case EVAS_COLORSPACE_YCBCR422P709_PL:
|
||||
if (_xre_image_data_get(im) != image_data)
|
||||
{
|
||||
if (im->data)
|
||||
{
|
||||
if (im->free_data) free(im->data);
|
||||
im->data = NULL;
|
||||
}
|
||||
if (im->cs.data)
|
||||
{
|
||||
if (!im->cs.no_free) free(im->cs.data);
|
||||
}
|
||||
im->cs.data = image_data;
|
||||
_xre_image_dirty(im);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
return image;
|
||||
}
|
||||
|
||||
static void *
|
||||
eng_image_alpha_set(void *data, void *image, int has_alpha)
|
||||
{
|
||||
if (!image) return image;
|
||||
if (((((XR_Image *)image)->alpha) && (has_alpha)) ||
|
||||
((!((XR_Image *)image)->alpha) && (!has_alpha)))
|
||||
return image;
|
||||
if (((XR_Image *)image)->references > 1)
|
||||
{
|
||||
XR_Image *old_image;
|
||||
|
||||
old_image = (XR_Image *)image;
|
||||
image = _xre_image_copy((XR_Image *)old_image);
|
||||
if (image)
|
||||
{
|
||||
((XR_Image *)image)->alpha = old_image->alpha;
|
||||
_xre_image_free(old_image);
|
||||
}
|
||||
else
|
||||
image = old_image;
|
||||
}
|
||||
else
|
||||
_xre_image_dirty((XR_Image *)image);
|
||||
_xre_image_alpha_set((XR_Image *)image, has_alpha);
|
||||
return image;
|
||||
}
|
||||
|
||||
static int
|
||||
eng_image_alpha_get(void *data, void *image)
|
||||
{
|
||||
if (!image) return 0;
|
||||
return _xre_image_alpha_get((XR_Image *)image);
|
||||
}
|
||||
|
||||
static void *
|
||||
eng_image_border_set(void *data, void *image, int l, int r, int t, int b)
|
||||
{
|
||||
if (!image) return image;
|
||||
_xre_image_border_set((XR_Image *)image, l, r, t, b);
|
||||
return image;
|
||||
}
|
||||
|
||||
static void
|
||||
eng_image_border_get(void *data, void *image, int *l, int *r, int *t, int *b)
|
||||
{
|
||||
if (!image) return;
|
||||
_xre_image_border_get((XR_Image *)image, l, r, t, b);
|
||||
}
|
||||
|
||||
static void
|
||||
eng_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)
|
||||
{
|
||||
|
@ -675,42 +803,6 @@ eng_image_draw(void *data, void *context, void *surface, void *image, int src_x,
|
|||
smooth);
|
||||
}
|
||||
|
||||
static const char *
|
||||
eng_image_comment_get(void *data, void *image, char *key)
|
||||
{
|
||||
if (!image) return NULL;
|
||||
return ((XR_Image *)image)->comment;
|
||||
}
|
||||
|
||||
static char *
|
||||
eng_image_format_get(void *data, void *image)
|
||||
{
|
||||
if (!image) return NULL;
|
||||
return ((XR_Image *)image)->format;
|
||||
}
|
||||
|
||||
static void
|
||||
eng_image_colorspace_set(void *data, void *image, int cspace)
|
||||
{
|
||||
}
|
||||
|
||||
static int
|
||||
eng_image_colorspace_get(void *data, void *image)
|
||||
{
|
||||
return EVAS_COLORSPACE_ARGB8888;
|
||||
}
|
||||
|
||||
static void
|
||||
eng_image_native_set(void *data, void *image, void *native)
|
||||
{
|
||||
}
|
||||
|
||||
static void *
|
||||
eng_image_native_get(void *data, void *image)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
eng_image_cache_flush(void *data)
|
||||
{
|
||||
|
|
|
@ -100,6 +100,11 @@ struct _XR_Image
|
|||
const char *comment;
|
||||
Tilebuf *updates;
|
||||
RGBA_Image_Loadopts load_opts;
|
||||
struct {
|
||||
int space;
|
||||
void *data;
|
||||
unsigned char no_free : 1;
|
||||
} cs;
|
||||
unsigned char alpha : 1;
|
||||
unsigned char dirty : 1;
|
||||
unsigned char free_data : 1;
|
||||
|
|
|
@ -102,6 +102,7 @@ _xre_image_load(Ximage_Info *xinf, const char *file, const char *key, Evas_Image
|
|||
}
|
||||
im->xinf = xinf;
|
||||
im->xinf->references++;
|
||||
im->cs.space = EVAS_COLORSPACE_ARGB8888;
|
||||
im->fkey = strdup(buf);
|
||||
im->file = evas_stringshare_add(file);
|
||||
if (key) im->key = evas_stringshare_add(key);
|
||||
|
@ -125,11 +126,25 @@ _xre_image_new_from_data(Ximage_Info *xinf, int w, int h, void *data, int alpha,
|
|||
if (!im) return NULL;
|
||||
im->xinf = xinf;
|
||||
im->xinf->references++;
|
||||
im->cs.space = cspace;
|
||||
im->w = w;
|
||||
im->h = h;
|
||||
im->references = 1;
|
||||
switch (im->cs.space)
|
||||
{
|
||||
case EVAS_COLORSPACE_ARGB8888:
|
||||
im->data = data;
|
||||
im->alpha = alpha;
|
||||
break;
|
||||
case EVAS_COLORSPACE_YCBCR422P601_PL:
|
||||
case EVAS_COLORSPACE_YCBCR422P709_PL:
|
||||
im->cs.data = data;
|
||||
im->cs.no_free = 1;
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
im->dirty = 1;
|
||||
__xre_image_dirty_hash_add(im);
|
||||
return im;
|
||||
|
@ -142,6 +157,10 @@ _xre_image_new_from_copied_data(Ximage_Info *xinf, int w, int h, void *data, int
|
|||
|
||||
im = calloc(1, sizeof(XR_Image));
|
||||
if (!im) return NULL;
|
||||
im->cs.space = cspace;
|
||||
switch (im->cs.space)
|
||||
{
|
||||
case EVAS_COLORSPACE_ARGB8888:
|
||||
im->data = malloc(w * h * 4);
|
||||
if (!im->data)
|
||||
{
|
||||
|
@ -156,13 +175,25 @@ _xre_image_new_from_copied_data(Ximage_Info *xinf, int w, int h, void *data, int
|
|||
if (func) func(data, im->data, w * h);
|
||||
evas_common_cpu_end_opt();
|
||||
}
|
||||
im->alpha = alpha;
|
||||
im->free_data = 1;
|
||||
break;
|
||||
case EVAS_COLORSPACE_YCBCR422P601_PL:
|
||||
case EVAS_COLORSPACE_YCBCR422P709_PL:
|
||||
im->cs.no_free = 0;
|
||||
im->cs.data = calloc(1, h * sizeof(unsigned char *) * 2);
|
||||
if ((data) && (im->cs.data))
|
||||
memcpy(im->cs.data, data, h * sizeof(unsigned char *) * 2);
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
im->w = w;
|
||||
im->h = h;
|
||||
im->references = 1;
|
||||
im->xinf = xinf;
|
||||
im->xinf->references++;
|
||||
im->free_data = 1;
|
||||
im->alpha = alpha;
|
||||
im->dirty = 1;
|
||||
__xre_image_dirty_hash_add(im);
|
||||
return im;
|
||||
|
@ -184,6 +215,7 @@ _xre_image_new(Ximage_Info *xinf, int w, int h)
|
|||
im->w = w;
|
||||
im->h = h;
|
||||
im->references = 1;
|
||||
im->cs.space = EVAS_COLORSPACE_ARGB8888;
|
||||
im->xinf = xinf;
|
||||
im->xinf->references++;
|
||||
im->free_data = 1;
|
||||
|
@ -196,6 +228,10 @@ _xre_image_new(Ximage_Info *xinf, int w, int h)
|
|||
static void
|
||||
__xre_image_real_free(XR_Image *im)
|
||||
{
|
||||
if (im->cs.data)
|
||||
{
|
||||
if (!im->cs.no_free) free(im->cs.data);
|
||||
}
|
||||
if (im->file) evas_stringshare_del(im->file);
|
||||
if (im->key) evas_stringshare_del(im->key);
|
||||
if (im->fkey) free(im->fkey);
|
||||
|
@ -257,6 +293,7 @@ _xre_image_copy(XR_Image *im)
|
|||
XR_Image *im2;
|
||||
void *data = NULL;
|
||||
|
||||
/* FIXME: colorspace support */
|
||||
if (im->data) data = im->data;
|
||||
else
|
||||
{
|
||||
|
@ -281,6 +318,7 @@ _xre_image_copy(XR_Image *im)
|
|||
void
|
||||
_xre_image_resize(XR_Image *im, int w, int h)
|
||||
{
|
||||
/* FIXME: colorspace support */
|
||||
/* FIXME: ... */
|
||||
if ((w == im->w) && (h == im->h)) return;
|
||||
if (im->surface)
|
||||
|
@ -389,6 +427,7 @@ _xre_image_data_get(XR_Image *im)
|
|||
{
|
||||
void *data = NULL;
|
||||
|
||||
/* FIXME: colorspace support */
|
||||
if (im->data) data = im->data;
|
||||
else
|
||||
{
|
||||
|
@ -420,6 +459,7 @@ _xre_image_data_put(XR_Image *im, void *data)
|
|||
{
|
||||
void *imdata = NULL;
|
||||
|
||||
/* FIXME: colorspace support */
|
||||
if (!data) return;
|
||||
if (im->data)
|
||||
{
|
||||
|
@ -462,6 +502,7 @@ _xre_image_data_put(XR_Image *im, void *data)
|
|||
void
|
||||
_xre_image_alpha_set(XR_Image *im, int alpha)
|
||||
{
|
||||
/* FIXME: colorspace support */
|
||||
if (im->alpha == alpha) return;
|
||||
im->alpha = alpha;
|
||||
if (im->surface)
|
||||
|
@ -488,6 +529,10 @@ _xre_image_alpha_set(XR_Image *im, int alpha)
|
|||
int
|
||||
_xre_image_alpha_get(XR_Image *im)
|
||||
{
|
||||
if (im->im)
|
||||
{
|
||||
if (im->im->cs.space != EVAS_COLORSPACE_ARGB8888) return 0;
|
||||
}
|
||||
return im->alpha;
|
||||
}
|
||||
|
||||
|
@ -519,6 +564,7 @@ _xre_image_surface_gen(XR_Image *im)
|
|||
{
|
||||
void *data = NULL;
|
||||
|
||||
/* FIXME: colorspace support */
|
||||
if ((im->surface) && (!im->updates)) return;
|
||||
if (im->data) data = im->data;
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue