summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-02-14 08:33:26 -0500
committerMike Blumenkrantz <zmike@samsung.com>2020-02-14 08:33:26 -0500
commitbe3915cc909443554dff834f1bbd25933d4f7584 (patch)
tree1624a56a3d64ca2ebc8b163657158da40afcc32d
parent7aec0565cb33cc664b3a1be4df01c721e92d6dfd (diff)
Revert "evas: remove unused fonction evas_gl_common_image_load."
Summary: This reverts commit fc7e244e99bbcaa8303e0e11a533d0d96b7525bd. Depends on D11336 Reviewers: raster Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11337
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_common.h1
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_image.c31
2 files changed, 32 insertions, 0 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h
index 0cc7f30..e902cd6 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -736,6 +736,7 @@ void evas_gl_common_texture_rgb_a_pair_update(Evas_GL_Texture *tex,
736Evas_Colorspace evas_gl_common_gl_format_to_colorspace(GLuint f); 736Evas_Colorspace evas_gl_common_gl_format_to_colorspace(GLuint f);
737 737
738void evas_gl_common_image_alloc_ensure(Evas_GL_Image *im); 738void evas_gl_common_image_alloc_ensure(Evas_GL_Image *im);
739Evas_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);
739Evas_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); 740Evas_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);
740Evas_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); 741Evas_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);
741Evas_GL_Image *evas_gl_common_image_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_Colorspace cspace); 742Evas_GL_Image *evas_gl_common_image_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_Colorspace cspace);
diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c b/src/modules/evas/engines/gl_common/evas_gl_image.c
index ffe29e3..37de0ba 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_image.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_image.c
@@ -282,6 +282,37 @@ found_cspace:
282} 282}
283 283
284Evas_GL_Image * 284Evas_GL_Image *
285evas_gl_common_image_load(Evas_Engine_GL_Context *gc, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error)
286{
287 RGBA_Image *im_im;
288
289#ifdef EVAS_CSERVE2
290 if (evas_cserve2_use_get())
291 {
292 im_im = (RGBA_Image *) evas_cache2_image_open
293 (evas_common_image_cache2_get(), file, key, lo, error);
294 if (im_im)
295 {
296 *error = evas_cache2_image_open_wait(&im_im->cache_entry);
297 if ((*error != EVAS_LOAD_ERROR_NONE)
298 && im_im->cache_entry.animated.animated)
299 {
300 evas_cache2_image_close(&im_im->cache_entry);
301 im_im = NULL;
302 }
303 else
304 return evas_gl_common_image_new_from_rgbaimage(gc, im_im, lo, error);
305 }
306 }
307#endif
308
309 im_im = evas_common_load_image_from_file(file, key, lo, error);
310 if (!im_im) return NULL;
311
312 return evas_gl_common_image_new_from_rgbaimage(gc, im_im, lo, error);
313}
314
315Evas_GL_Image *
285evas_gl_common_image_mmap(Evas_Engine_GL_Context *gc, Eina_File *f, const char *key, Evas_Image_Load_Opts *lo, int *error) 316evas_gl_common_image_mmap(Evas_Engine_GL_Context *gc, Eina_File *f, const char *key, Evas_Image_Load_Opts *lo, int *error)
286{ 317{
287 RGBA_Image *im_im; 318 RGBA_Image *im_im;