if (!im->im->image.data)
evas_cache_image_load_data(&im->im->cache_entry);
+ evas_gl_common_image_alloc_ensure(im);
im_new = evas_gl_common_image_new_from_copied_data
(im->gc, im->im->cache_entry.w, im->im->cache_entry.h,
im->im->image.data,
/* FIXME: can move to gl_common */
if (im->cs.space == cspace) return;
eng_window_use(re->win);
+ evas_gl_common_image_alloc_ensure(im);
evas_cache_image_colorspace(&im->im->cache_entry, cspace);
switch (cspace)
{
w &= ~0x1;
break;
}
-
+
+ evas_gl_common_image_alloc_ensure(im_old);
if ((im_old->im) &&
((int)im_old->im->cache_entry.w == w) &&
((int)im_old->im->cache_entry.h == h))
}
eng_window_use(re->win);
error = evas_cache_image_load_data(&im->im->cache_entry);
+ evas_gl_common_image_alloc_ensure(im);
switch (im->cs.space)
{
case EVAS_COLORSPACE_ARGB8888:
im = image;
if (im->native.data) return image;
eng_window_use(re->win);
+ evas_gl_common_image_alloc_ensure(im);
if ((im->tex) && (im->tex->pt) && (im->tex->pt->dyn.data))
{
if (im->tex->pt->dyn.data == image_data)
Evas_GL_Texture *evas_gl_common_texture_nv12tiled_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h);
void evas_gl_common_texture_nv12tiled_update(Evas_GL_Texture *tex, DATA8 **row, unsigned int w, unsigned int h);
+void evas_gl_common_image_alloc_ensure(Evas_GL_Image *im);
void evas_gl_common_image_all_unload(Evas_Engine_GL_Context *gc);
void evas_gl_common_image_ref(Evas_GL_Image *im);
#include "evas_gl_private.h"
void
+evas_gl_common_image_alloc_ensure(Evas_GL_Image *im)
+{
+ if (!im->im) return;
+ im->im = (RGBA_Image *)evas_cache_image_size_set(&im->im->cache_entry,
+ im->w, im->h);
+}
+
+void
evas_gl_common_image_all_unload(Evas_Engine_GL_Context *gc)
{
Eina_List *l;
if (im->alpha == alpha) return im;
im->alpha = alpha;
if (!im->im) return im;
+ evas_gl_common_image_alloc_ensure(im);
evas_cache_image_load_data(&im->im->cache_entry);
im->im->cache_entry.flags.alpha = alpha ? 1 : 0;
im->tex = NULL;
}
im->tex_only = 0;
-
im->im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get());
im->im->cache_entry.flags.alpha = im->alpha;
im->cs.space = EVAS_COLORSPACE_ARGB8888;
evas_cache_image_colorspace(&im->im->cache_entry, im->cs.space);
+/*
im->im = (RGBA_Image *)evas_cache_image_size_set(&im->im->cache_entry, im->w, im->h);
if (!im->tex)
im->tex = evas_gl_common_texture_new(im->gc, im->im);
+ */
}
void
}
if (im->im)
{
+ evas_gl_common_image_alloc_ensure(im);
im->im = (RGBA_Image *)evas_cache_image_dirty(&im->im->cache_entry, x, y, w, h);
}
im->dirty = 1;
Image_Entry *ie;
if (!im->im) return;
ie = (Image_Entry *)(im->im);
+ evas_gl_common_image_alloc_ensure(im);
/*
if ((im->cs.space == EVAS_COLORSPACE_YCBCR422P601_PL) ||
(im->cs.space == EVAS_COLORSPACE_YCBCR422P709_PL))
RECTS_CLIP_TO_RECT(nx, ny, nw, nh,
cx, cy, cw, ch);
if ((nw < 1) || (nh < 1)) return;
+ if (!im->tex) return;
if ((nx == dx) && (ny == dy) && (nw == dw) && (nh == dh))
{
if (yuv)
if (!im->im->image.data)
evas_cache_image_load_data(&im->im->cache_entry);
+ evas_gl_common_image_alloc_ensure(im);
im_new = evas_gl_common_image_new_from_copied_data(im->gc, im->im->cache_entry.w, im->im->cache_entry.h, im->im->image.data,
eng_image_alpha_get(data, image),
eng_image_colorspace_get(data, image));
if (im->native.data) return;
/* FIXME: can move to gl_common */
if (im->cs.space == cspace) return;
+ evas_gl_common_image_alloc_ensure(im);
evas_cache_image_colorspace(&im->im->cache_entry, cspace);
switch (cspace)
{
break;
}
+ evas_gl_common_image_alloc_ensure(im_old);
if ((im_old->im) &&
((int)im_old->im->cache_entry.w == w) &&
((int)im_old->im->cache_entry.h == h))
return im;
}
error = evas_cache_image_load_data(&im->im->cache_entry);
+ evas_gl_common_image_alloc_ensure(im);
switch (im->cs.space)
{
case EVAS_COLORSPACE_ARGB8888:
if (!image) return NULL;
im = image;
if (im->native.data) return image;
+ evas_gl_common_image_alloc_ensure(im);
switch (im->cs.space)
{
case EVAS_COLORSPACE_ARGB8888:
if (!im->im->image.data)
evas_cache_image_load_data(&im->im->cache_entry);
+ evas_gl_common_image_alloc_ensure(im);
im_new = evas_gl_common_image_new_from_copied_data
(im->gc, im->im->cache_entry.w, im->im->cache_entry.h,
im->im->image.data,
/* FIXME: can move to gl_common */
if (im->cs.space == cspace) return;
eng_window_use(re->win);
+ evas_gl_common_image_alloc_ensure(im);
evas_cache_image_colorspace(&im->im->cache_entry, cspace);
switch (cspace)
{
break;
}
+ evas_gl_common_image_alloc_ensure(im_old);
if ((im_old->im) &&
((int)im_old->im->cache_entry.w == w) &&
((int)im_old->im->cache_entry.h == h))
}
error = evas_cache_image_load_data(&im->im->cache_entry);
+ evas_gl_common_image_alloc_ensure(im);
switch (im->cs.space)
{
case EVAS_COLORSPACE_ARGB8888:
im = image;
if (im->native.data) return image;
eng_window_use(re->win);
+ evas_gl_common_image_alloc_ensure(im);
if ((im->tex) && (im->tex->pt)
&& (im->tex->pt->dyn.data)
&& (im->cs.space == EVAS_COLORSPACE_ARGB8888))
return EINA_FALSE;
}
+ evas_gl_common_image_alloc_ensure(im);
src_w = im->im->cache_entry.w;
src_h = im->im->cache_entry.h;
if ((src_w == 0) || (src_h == 0))
break;
}
+ evas_gl_common_image_alloc_ensure(im);
if ((im_old->im) &&
((int)im_old->im->cache_entry.w == w) &&
((int)im_old->im->cache_entry.h == h))
}
error = evas_cache_image_load_data(&im->im->cache_entry);
+ evas_gl_common_image_alloc_ensure(im);
switch (im->cs.space)
{
case EVAS_COLORSPACE_ARGB8888:
if (!(im = image)) return NULL;
if (im->native.data) return image;
eng_window_use(re->win);
+ evas_gl_common_image_alloc_ensure(im);
if ((im->tex) && (im->tex->pt)
&& (im->tex->pt->dyn.data)
&& (im->cs.space == EVAS_COLORSPACE_ARGB8888))
if (!im->im->image.data)
evas_cache_image_load_data(&im->im->cache_entry);
+ evas_gl_common_image_alloc_ensure(im);
im_new = evas_gl_common_image_new_from_copied_data
(im->gc, im->im->cache_entry.w, im->im->cache_entry.h,
im->im->image.data,
/* FIXME: can move to gl_common */
if (im->cs.space == cspace) return;
eng_window_use(re->win);
+ evas_gl_common_image_alloc_ensure(im);
evas_cache_image_colorspace(&im->im->cache_entry, cspace);
switch (cspace)
{
return EINA_FALSE;
}
+ evas_gl_common_image_alloc_ensure(im);
src_w = im->im->cache_entry.w;
src_h = im->im->cache_entry.h;
if ((src_w == 0) || (src_h == 0))