forked from enlightenment/efl
forgot to ever do this.. mayaswell reload changed image objects off disk...
SVN revision: 5707
This commit is contained in:
parent
631aba69ea
commit
85ecd1a6fc
|
@ -630,7 +630,11 @@ __evas_gl_make_image_textures(Evas_GL_Window *w, Evas_GL_Image *image)
|
|||
image->textures = evas_list_prepend(image->textures, tm);
|
||||
|
||||
if ((!image->im) && (image->file))
|
||||
image->im = imlib_load_image(image->file);
|
||||
{
|
||||
image->im = imlib_load_image(image->file);
|
||||
imlib_context_set_image(image->im);
|
||||
imlib_image_set_changes_on_disk();
|
||||
}
|
||||
|
||||
tx = (image->w - 2) / (w->context->max_texture_size - 2);
|
||||
ex = (image->w - 1) - (tx * (w->context->max_texture_size - 2));
|
||||
|
@ -763,6 +767,8 @@ __evas_gl_image_alloc(char *file)
|
|||
|
||||
im = imlib_load_image(file);
|
||||
if (!im) return NULL;
|
||||
imlib_context_set_image(im);
|
||||
imlib_image_set_changes_on_disk();
|
||||
image = malloc(sizeof(Evas_GL_Image));
|
||||
image->file = malloc(strlen(file) + 1);
|
||||
strcpy(image->file, file);
|
||||
|
|
|
@ -308,7 +308,6 @@ evas_set_image_border(Evas e, Evas_Object o, int l, int r, int t, int b)
|
|||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
IF_OBJ(o, OBJECT_IMAGE) return;
|
||||
oo = o;
|
||||
|
@ -331,7 +330,6 @@ evas_get_image_border(Evas e, Evas_Object o, int *l, int *r, int *t, int *b)
|
|||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
IF_OBJ(o, OBJECT_IMAGE) return;
|
||||
oo = o;
|
||||
|
|
|
@ -36,7 +36,15 @@ __evas_image_image_cache_flush(Display *disp)
|
|||
Evas_Image_Image *
|
||||
__evas_image_image_new_from_file(Display *disp, char *file)
|
||||
{
|
||||
return (Evas_Image_Image *)imlib_load_image(file);
|
||||
Imlib_Image im;
|
||||
|
||||
im = imlib_load_image(file);
|
||||
if (im)
|
||||
{
|
||||
imlib_context_set_image(im);
|
||||
imlib_image_set_changes_on_disk();
|
||||
}
|
||||
return (Evas_Image_Image *)im;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -44,6 +44,8 @@ __evas_imlib_image_new_from_file(Display *disp, char *file)
|
|||
|
||||
image = imlib_load_image(file);
|
||||
if (!image) return NULL;
|
||||
imlib_context_set_image(image);
|
||||
imlib_image_set_changes_on_disk();
|
||||
im = malloc(sizeof(Evas_Imlib_Image));
|
||||
im->file = malloc(strlen(file) + 1);
|
||||
strcpy(im->file, file);
|
||||
|
|
|
@ -519,7 +519,6 @@ evas_stack_below(Evas e, Evas_Object o, Evas_Object below)
|
|||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
layer = _evas_get_object_layer(e, o);
|
||||
if (layer)
|
||||
|
|
|
@ -242,7 +242,6 @@ evas_get_text_height(Evas e, Evas_Object o)
|
|||
|
||||
if (!e) return 0;
|
||||
o = TO_OBJECT(e, o);
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return 0;
|
||||
IF_OBJ(o, OBJECT_TEXT) return 0;
|
||||
oo = o;
|
||||
|
@ -592,7 +591,6 @@ evas_text_get_max_ascent_descent(Evas e, Evas_Object o,
|
|||
|
||||
if (!e) return;
|
||||
o = TO_OBJECT(e, o);
|
||||
o = TO_OBJECT(e, o);
|
||||
if (!o) return;
|
||||
IF_OBJ(o, OBJECT_TEXT) return;
|
||||
oo = o;
|
||||
|
|
|
@ -145,6 +145,7 @@ __evas_x11_image_new_from_file(Display *disp, char *file)
|
|||
strcpy(im->file, file);
|
||||
im->references = 1;
|
||||
imlib_context_set_image(im->image);
|
||||
imlib_image_set_changes_on_disk();
|
||||
im->w = imlib_image_get_width();
|
||||
im->h = imlib_image_get_height();
|
||||
im->has_alpha = imlib_image_has_alpha();
|
||||
|
|
Loading…
Reference in New Issue