summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2020-11-20 11:22:54 +0900
committerHermet Park <chuneon.park@samsung.com>2020-11-20 11:22:55 +0900
commit5f8e4dabeae5a04ceadba458a4a87111ef0c2d19 (patch)
treea4c2559dbded800d704be7fd06ebaccddad649ca /src/modules
parentf56004db6ead55df47ac7355651ed911c88114c0 (diff)
evas gl: make 9 patch work
Summary: The 9 patch is using image_stretch_region_get, but GL did not override it. So the 9 patch did not work for GL engine at all. Test Plan: Evas_Object*img = evas_object_image_filled_add(evas); evas_object_image_file_set(img, "test.9.png", 0); evas_object_show(img); Reviewers: Hermet, jsuya, herb, cedric Reviewed By: Hermet Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12192
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c
index b413436efd..46f927e28e 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -2199,6 +2199,29 @@ eng_image_can_region_get(void *engine EINA_UNUSED, void *image)
2199 return ((Evas_Image_Load_Func*) im->info.loader)->do_region; 2199 return ((Evas_Image_Load_Func*) im->info.loader)->do_region;
2200} 2200}
2201 2201
2202static Eina_Bool
2203eng_image_stretch_region_get(void *engine EINA_UNUSED, void *image,
2204 uint8_t **horizontal, uint8_t **vertical)
2205{
2206 Evas_GL_Image *gim = image;
2207 RGBA_Image *im;
2208
2209 if (!gim || !gim->im) return EINA_FALSE;
2210
2211 im = (RGBA_Image *)gim->im;
2212
2213 if (!im->cache_entry.need_data) return EINA_FALSE;
2214
2215 if (!im->image.data) evas_cache_image_load_data(&im->cache_entry);
2216
2217 if (!im->cache_entry.stretch.horizontal.region ||
2218 !im->cache_entry.stretch.vertical.region)
2219 return EINA_FALSE;
2220
2221 *horizontal = im->cache_entry.stretch.horizontal.region;
2222 *vertical = im->cache_entry.stretch.vertical.region;
2223 return EINA_TRUE;
2224}
2202 2225
2203static void 2226static void
2204eng_image_max_size_get(void *engine, int *maxw, int *maxh) 2227eng_image_max_size_get(void *engine, int *maxw, int *maxh)
@@ -3122,6 +3145,7 @@ module_open(Evas_Module *em)
3122 ORD(image_colorspace_get); 3145 ORD(image_colorspace_get);
3123 ORD(image_file_colorspace_get); 3146 ORD(image_file_colorspace_get);
3124 ORD(image_can_region_get); 3147 ORD(image_can_region_get);
3148 ORD(image_stretch_region_get);
3125 ORD(image_native_init); 3149 ORD(image_native_init);
3126 ORD(image_native_shutdown); 3150 ORD(image_native_shutdown);
3127 ORD(image_native_set); 3151 ORD(image_native_set);