summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-08-25 10:51:10 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-08-25 10:51:10 -0700
commit1d57cb2627a8b10092def3f55e4833e4f8cf8bd5 (patch)
treeafa2b2f490ea5416bab4443c5cd12f9b607c30ae /src/modules
parent14f1a0bde7169dad284838a3e439aba62a98ec49 (diff)
evas: move all image object related function to use the engine instead of the output.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h26
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c125
2 files changed, 67 insertions, 84 deletions
diff --git a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
index f222469..a78e588 100644
--- a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
+++ b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
@@ -21,6 +21,12 @@ typedef void (*Window_GL_Context_Use)(Context_3D *ctx);
21struct _Render_Engine_GL_Generic 21struct _Render_Engine_GL_Generic
22{ 22{
23 Render_Engine_Software_Generic software; 23 Render_Engine_Software_Generic software;
24
25 struct {
26 Evas_Object_Image_Pixels_Get_Cb get_pixels;
27 void *get_pixels_data;
28 Evas_Object *obj;
29 } func;
24}; 30};
25 31
26struct _Render_Output_GL_Generic 32struct _Render_Output_GL_Generic
@@ -33,12 +39,6 @@ struct _Render_Output_GL_Generic
33 Window_GL_Context_New window_gl_context_new; 39 Window_GL_Context_New window_gl_context_new;
34 Window_GL_Context_Use window_gl_context_use; 40 Window_GL_Context_Use window_gl_context_use;
35 41
36 struct {
37 Evas_Object_Image_Pixels_Get_Cb get_pixels;
38 void *get_pixels_data;
39 Evas_Object *obj;
40 } func;
41
42 Context_3D *context_3d; 42 Context_3D *context_3d;
43 E3D_Renderer *renderer_3d; 43 E3D_Renderer *renderer_3d;
44 const EVGL_Interface *evgl_funcs; 44 const EVGL_Interface *evgl_funcs;
@@ -92,9 +92,6 @@ evas_render_engine_gl_generic_init(Render_Engine_Software_Generic *engine,
92 re->window_gl_context_new = window_gl_context_new; 92 re->window_gl_context_new = window_gl_context_new;
93 re->window_gl_context_use = window_gl_context_use; 93 re->window_gl_context_use = window_gl_context_use;
94 94
95 re->func.get_pixels = NULL;
96 re->func.get_pixels_data = NULL;
97 re->func.obj = NULL;
98 re->context_3d = NULL; 95 re->context_3d = NULL;
99 re->renderer_3d = NULL; 96 re->renderer_3d = NULL;
100 re->evgl_funcs = evgl_funcs; 97 re->evgl_funcs = evgl_funcs;
@@ -106,15 +103,4 @@ evas_render_engine_gl_generic_init(Render_Engine_Software_Generic *engine,
106 return EINA_TRUE; 103 return EINA_TRUE;
107} 104}
108 105
109static inline void
110evas_render_engine_software_gl_get_pixels_set(Render_Output_GL_Generic *re,
111 Evas_Object_Image_Pixels_Get_Cb get_pixels,
112 void *get_pixels_data,
113 Evas_Object *obj)
114{
115 re->func.get_pixels = get_pixels;
116 re->func.get_pixels_data = get_pixels_data;
117 re->func.obj = obj;
118}
119
120#endif 106#endif
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c
index 2fec3e5..bccfc79 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -82,6 +82,20 @@ gl_generic_context_find(Render_Engine_GL_Generic *engine)
82 return r; 82 return r;
83} 83}
84 84
85static void
86gl_generic_window_find(Render_Engine_GL_Generic *engine)
87{
88 Render_Output_GL_Generic *output;
89 Eina_List *l;
90
91 EINA_LIST_FOREACH(engine->software.outputs, l, output)
92 {
93 if (!output->software.ob) continue;
94 gl_generic_window_use(output);
95 break;
96 }
97}
98
85static int eng_gl_image_direct_get(void *data, void *image); 99static int eng_gl_image_direct_get(void *data, void *image);
86static int eng_gl_surface_destroy(void *data, void *surface); 100static int eng_gl_surface_destroy(void *data, void *surface);
87static Eina_Bool eng_gl_surface_lock(void *data, void *surface); 101static Eina_Bool eng_gl_surface_lock(void *data, void *surface);
@@ -212,20 +226,18 @@ eng_polygon_draw(void *engine EINA_UNUSED, void *data, void *context, void *surf
212static int 226static int
213eng_image_alpha_get(void *engine EINA_UNUSED, void *image) 227eng_image_alpha_get(void *engine EINA_UNUSED, void *image)
214{ 228{
215 Evas_GL_Image *im; 229 Evas_GL_Image *im = image;
216 230
217 if (!image) return 1; 231 if (!im) return 1;
218 im = image;
219 return im->alpha; 232 return im->alpha;
220} 233}
221 234
222static Evas_Colorspace 235static Evas_Colorspace
223eng_image_colorspace_get(void *engine EINA_UNUSED, void *image) 236eng_image_colorspace_get(void *engine EINA_UNUSED, void *image)
224{ 237{
225 Evas_GL_Image *im; 238 Evas_GL_Image *im = image;
226 239
227 if (!image) return EVAS_COLORSPACE_ARGB8888; 240 if (!im) return EVAS_COLORSPACE_ARGB8888;
228 im = image;
229 return im->cs.space; 241 return im->cs.space;
230} 242}
231 243
@@ -242,7 +254,7 @@ eng_image_alpha_set(void *engine, void *image, int has_alpha)
242 im->alpha = has_alpha; 254 im->alpha = has_alpha;
243 return image; 255 return image;
244 } 256 }
245 gl_generic_window_use(engine); 257 gl_generic_window_find(engine);
246 if ((im->tex) && (im->tex->pt->dyn.img)) 258 if ((im->tex) && (im->tex->pt->dyn.img))
247 { 259 {
248 im->alpha = has_alpha; 260 im->alpha = has_alpha;
@@ -321,7 +333,7 @@ eng_image_colorspace_set(void *engine, void *image, Evas_Colorspace cspace)
321 if (im->native.data) return; 333 if (im->native.data) return;
322 /* FIXME: can move to gl_common */ 334 /* FIXME: can move to gl_common */
323 if (im->cs.space == cspace) return; 335 if (im->cs.space == cspace) return;
324 gl_generic_window_use(engine); 336 gl_generic_window_find(engine);
325 evas_gl_common_image_alloc_ensure(im); 337 evas_gl_common_image_alloc_ensure(im);
326 switch (cspace) 338 switch (cspace)
327 { 339 {
@@ -436,7 +448,7 @@ eng_image_native_set(void *engine, void *image, void *native)
436 unsigned int tex = 0; 448 unsigned int tex = 0;
437 unsigned int fbo = 0; 449 unsigned int fbo = 0;
438 450
439 gl_context = gl_generic_context_get(engine); 451 gl_context = gl_generic_context_find(engine);
440 452
441 if (!im) 453 if (!im)
442 { 454 {
@@ -469,7 +481,7 @@ eng_image_native_set(void *engine, void *image, void *native)
469 } 481 }
470 if ((!ns) && (!im->native.data)) return im; 482 if ((!ns) && (!im->native.data)) return im;
471 483
472 gl_generic_window_use(engine); 484 gl_generic_window_find(engine);
473 485
474 if (im->native.data) 486 if (im->native.data)
475 { 487 {
@@ -553,7 +565,7 @@ eng_image_load(void *engine, const char *file, const char *key, int *error, Evas
553 Evas_Engine_GL_Context *gl_context; 565 Evas_Engine_GL_Context *gl_context;
554 566
555 *error = EVAS_LOAD_ERROR_NONE; 567 *error = EVAS_LOAD_ERROR_NONE;
556 gl_context = gl_generic_context_get(engine); 568 gl_context = gl_generic_context_find(engine);
557 return evas_gl_common_image_load(gl_context, file, key, lo, error); 569 return evas_gl_common_image_load(gl_context, file, key, lo, error);
558} 570}
559 571
@@ -563,7 +575,7 @@ eng_image_mmap(void *engine, Eina_File *f, const char *key, int *error, Evas_Ima
563 Evas_Engine_GL_Context *gl_context; 575 Evas_Engine_GL_Context *gl_context;
564 576
565 *error = EVAS_LOAD_ERROR_NONE; 577 *error = EVAS_LOAD_ERROR_NONE;
566 gl_context = gl_generic_context_get(engine); 578 gl_context = gl_generic_context_find(engine);
567 return evas_gl_common_image_mmap(gl_context, f, key, lo, error); 579 return evas_gl_common_image_mmap(gl_context, f, key, lo, error);
568} 580}
569 581
@@ -572,7 +584,7 @@ eng_image_new_from_data(void *engine, int w, int h, DATA32 *image_data, int alph
572{ 584{
573 Evas_Engine_GL_Context *gl_context; 585 Evas_Engine_GL_Context *gl_context;
574 586
575 gl_context = gl_generic_context_get(engine); 587 gl_context = gl_generic_context_find(engine);
576 return evas_gl_common_image_new_from_data(gl_context, w, h, image_data, alpha, cspace); 588 return evas_gl_common_image_new_from_data(gl_context, w, h, image_data, alpha, cspace);
577} 589}
578 590
@@ -581,7 +593,7 @@ eng_image_new_from_copied_data(void *engine, int w, int h, DATA32 *image_data, i
581{ 593{
582 Evas_Engine_GL_Context *gl_context; 594 Evas_Engine_GL_Context *gl_context;
583 595
584 gl_context = gl_generic_context_get(engine); 596 gl_context = gl_generic_context_find(engine);
585 return evas_gl_common_image_new_from_copied_data(gl_context, w, h, image_data, alpha, cspace); 597 return evas_gl_common_image_new_from_copied_data(gl_context, w, h, image_data, alpha, cspace);
586} 598}
587 599
@@ -589,7 +601,7 @@ void
589eng_image_free(void *engine, void *image) 601eng_image_free(void *engine, void *image)
590{ 602{
591 if (!image) return; 603 if (!image) return;
592 gl_generic_window_use(engine); 604 gl_generic_window_find(engine);
593 evas_gl_common_image_free(image); 605 evas_gl_common_image_free(image);
594} 606}
595 607
@@ -643,7 +655,7 @@ eng_image_size_set(void *engine, void *image, int w, int h)
643 evas_gl_common_image_native_enable(im); 655 evas_gl_common_image_native_enable(im);
644 return image; 656 return image;
645 } 657 }
646 gl_context = gl_generic_context_get(engine); 658 gl_context = gl_generic_context_find(engine);
647 if ((im->tex) && (im->tex->pt->dyn.img)) 659 if ((im->tex) && (im->tex->pt->dyn.img))
648 { 660 {
649 evas_gl_common_texture_free(im->tex, EINA_TRUE); 661 evas_gl_common_texture_free(im->tex, EINA_TRUE);
@@ -686,13 +698,13 @@ eng_image_dirty_region(void *engine, void *image, int x, int y, int w, int h)
686 698
687 if (!image) return NULL; 699 if (!image) return NULL;
688 if (im->native.data) return image; 700 if (im->native.data) return image;
689 gl_generic_window_use(engine); 701 gl_generic_window_find(engine);
690 evas_gl_common_image_dirty(image, x, y, w, h); 702 evas_gl_common_image_dirty(image, x, y, w, h);
691 return image; 703 return image;
692} 704}
693 705
694static Evas_GL_Image * 706static Evas_GL_Image *
695_rotate_image_data(Render_Output_GL_Generic *re, Evas_GL_Image *im1) 707_rotate_image_data(Render_Engine_GL_Generic *re, Evas_GL_Image *im1)
696{ 708{
697 int alpha; 709 int alpha;
698 Evas_GL_Image *im2; 710 Evas_GL_Image *im2;
@@ -700,7 +712,7 @@ _rotate_image_data(Render_Output_GL_Generic *re, Evas_GL_Image *im1)
700 RGBA_Draw_Context *dc; 712 RGBA_Draw_Context *dc;
701 int w, h; 713 int w, h;
702 714
703 gl_context = gl_generic_context_get(re); 715 gl_context = gl_generic_context_find(re);
704 716
705 w = im1->w; 717 w = im1->w;
706 h = im1->h; 718 h = im1->h;
@@ -774,7 +786,7 @@ eng_image_data_get(void *engine, void *image, int to_write, DATA32 **image_data,
774 goto rotate_image; 786 goto rotate_image;
775 787
776#ifdef GL_GLES 788#ifdef GL_GLES
777 gl_generic_window_use(engine); 789 gl_generic_window_find(engine);
778 790
779 if ((im->tex) && (im->tex->pt) && (im->tex->pt->dyn.img) && 791 if ((im->tex) && (im->tex->pt) && (im->tex->pt->dyn.img) &&
780 (im->cs.space == EVAS_COLORSPACE_ARGB8888)) 792 (im->cs.space == EVAS_COLORSPACE_ARGB8888))
@@ -825,7 +837,7 @@ eng_image_data_get(void *engine, void *image, int to_write, DATA32 **image_data,
825 return im; 837 return im;
826 } 838 }
827 839
828 gl_generic_window_use(engine); 840 gl_generic_window_find(engine);
829#endif 841#endif
830 842
831 /* use glReadPixels for FBOs (assume fbo > 0) */ 843 /* use glReadPixels for FBOs (assume fbo > 0) */
@@ -983,7 +995,7 @@ eng_image_data_put(void *engine, void *image, DATA32 *image_data)
983 if (!image) return NULL; 995 if (!image) return NULL;
984 im = image; 996 im = image;
985 if (im->native.data) return image; 997 if (im->native.data) return image;
986 gl_generic_window_use(engine); 998 gl_generic_window_find(engine);
987 evas_gl_common_image_alloc_ensure(im); 999 evas_gl_common_image_alloc_ensure(im);
988 if ((im->tex) && (im->tex->pt) 1000 if ((im->tex) && (im->tex->pt)
989 && (im->tex->pt->dyn.data) 1001 && (im->tex->pt->dyn.data)
@@ -1071,7 +1083,7 @@ eng_image_orient_set(void *engine, void *image, Evas_Image_Orient orient)
1071 im = image; 1083 im = image;
1072 if (im->orient == orient) return image; 1084 if (im->orient == orient) return image;
1073 1085
1074 gl_generic_window_use(engine); 1086 gl_generic_window_find(engine);
1075 1087
1076 evas_gl_common_image_update(im->gc, im); 1088 evas_gl_common_image_update(im->gc, im);
1077 1089
@@ -1101,10 +1113,9 @@ eng_image_orient_set(void *engine, void *image, Evas_Image_Orient orient)
1101static Evas_Image_Orient 1113static Evas_Image_Orient
1102eng_image_orient_get(void *engine EINA_UNUSED, void *image) 1114eng_image_orient_get(void *engine EINA_UNUSED, void *image)
1103{ 1115{
1104 Evas_GL_Image *im; 1116 Evas_GL_Image *im = image;
1105 1117
1106 if (!image) return EVAS_IMAGE_ORIENT_NONE; 1118 if (!im) return EVAS_IMAGE_ORIENT_NONE;
1107 im = image;
1108 return im->orient; 1119 return im->orient;
1109} 1120}
1110 1121
@@ -1112,7 +1123,6 @@ static void
1112eng_image_data_preload_request(void *engine EINA_UNUSED, void *image, const Eo *target) 1123eng_image_data_preload_request(void *engine EINA_UNUSED, void *image, const Eo *target)
1113{ 1124{
1114 Evas_GL_Image *gim = image; 1125 Evas_GL_Image *gim = image;
1115// Render_Output_GL_Generic *re = data;
1116 RGBA_Image *im; 1126 RGBA_Image *im;
1117 1127
1118 if (!gim) return; 1128 if (!gim) return;
@@ -1127,19 +1137,6 @@ eng_image_data_preload_request(void *engine EINA_UNUSED, void *image, const Eo *
1127 else 1137 else
1128#endif 1138#endif
1129 evas_cache_image_preload_data(&im->cache_entry, target, NULL, NULL, NULL); 1139 evas_cache_image_preload_data(&im->cache_entry, target, NULL, NULL, NULL);
1130/*
1131 if (!gim->tex)
1132 {
1133 Evas_Engine_GL_Context *gl_context;
1134
1135 gl_context = gl_generic_context_get(engine);
1136 gim->tex = evas_gl_common_texture_new(gl_context, gim->im, EINA_FALSE);
1137 EINA_SAFETY_ON_NULL_RETURN(gim->tex);
1138 gim->tex->im = gim;
1139 im->cache_entry.flags.updated_data = 1;
1140 }
1141 evas_gl_preload_target_register(gim->tex, (Eo*) target);
1142 */
1143} 1140}
1144 1141
1145static void 1142static void
@@ -1164,8 +1161,9 @@ eng_image_data_preload_cancel(void *engine EINA_UNUSED, void *image, const Eo *t
1164} 1161}
1165 1162
1166static Eina_Bool 1163static Eina_Bool
1167eng_image_draw(void *engine EINA_UNUSED, 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, Eina_Bool do_async EINA_UNUSED) 1164eng_image_draw(void *eng, 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, Eina_Bool do_async EINA_UNUSED)
1168{ 1165{
1166 Render_Engine_GL_Generic *engine = eng;
1169 Evas_Engine_GL_Context *gl_context; 1167 Evas_Engine_GL_Context *gl_context;
1170 Render_Output_GL_Generic *re = data; 1168 Render_Output_GL_Generic *re = data;
1171 Evas_GL_Image *im = image; 1169 Evas_GL_Image *im = image;
@@ -1175,9 +1173,9 @@ eng_image_draw(void *engine EINA_UNUSED, void *data, void *context, void *surfac
1175 1173
1176 n = im->native.data; 1174 n = im->native.data;
1177 1175
1178 gl_context = gl_generic_context_get(data); 1176 gl_context = gl_generic_context_get(re);
1179 1177
1180 if (eng_gl_image_direct_get(data, image)) 1178 if (eng_gl_image_direct_get(re, image))
1181 { 1179 {
1182 void *direct_surface = NULL; 1180 void *direct_surface = NULL;
1183 1181
@@ -1212,7 +1210,7 @@ eng_image_draw(void *engine EINA_UNUSED, void *data, void *context, void *surfac
1212 1210
1213 // Call pixel get function 1211 // Call pixel get function
1214 evgl_get_pixels_pre(); 1212 evgl_get_pixels_pre();
1215 re->func.get_pixels(re->func.get_pixels_data, re->func.obj); 1213 engine->func.get_pixels(engine->func.get_pixels_data, engine->func.obj);
1216 evgl_get_pixels_post(); 1214 evgl_get_pixels_post();
1217 1215
1218 // Call end tile if it's being used 1216 // Call end tile if it's being used
@@ -1313,7 +1311,7 @@ eng_image_map_surface_new(void *engine, int w, int h, int alpha)
1313{ 1311{
1314 Evas_Engine_GL_Context *gl_context; 1312 Evas_Engine_GL_Context *gl_context;
1315 1313
1316 gl_context = gl_generic_context_get(engine); 1314 gl_context = gl_generic_context_find(engine);
1317 return evas_gl_common_image_surface_new(gl_context, w, h, alpha, EINA_FALSE); 1315 return evas_gl_common_image_surface_new(gl_context, w, h, alpha, EINA_FALSE);
1318} 1316}
1319 1317
@@ -1328,7 +1326,7 @@ eng_image_scaled_update(void *engine EINA_UNUSED, void *scaled, void *image,
1328static void 1326static void
1329eng_image_content_hint_set(void *engine, void *image, int hint) 1327eng_image_content_hint_set(void *engine, void *image, int hint)
1330{ 1328{
1331 gl_generic_window_use(engine); 1329 gl_generic_window_find(engine);
1332 evas_gl_common_image_content_hint_set(image, hint); 1330 evas_gl_common_image_content_hint_set(image, hint);
1333} 1331}
1334 1332
@@ -1703,13 +1701,13 @@ eng_gl_surface_direct_renderable_get(void *engine, Evas_Native_Surface *ns, Eina
1703} 1701}
1704 1702
1705static void 1703static void
1706eng_gl_get_pixels_set(void *engine, void *get_pixels, void *get_pixels_data, void *obj) 1704eng_gl_get_pixels_set(void *eng, void *get_pixels, void *get_pixels_data, void *obj)
1707{ 1705{
1708 Render_Output_GL_Generic *re = engine; 1706 Render_Engine_GL_Generic *engine = eng;
1709 1707
1710 re->func.get_pixels = get_pixels; 1708 engine->func.get_pixels = get_pixels;
1711 re->func.get_pixels_data = get_pixels_data; 1709 engine->func.get_pixels_data = get_pixels_data;
1712 re->func.obj = (Evas_Object*)obj; 1710 engine->func.obj = (Evas_Object*)obj;
1713} 1711}
1714 1712
1715static void 1713static void
@@ -1929,13 +1927,13 @@ eng_gl_image_direct_get(void *engine EINA_UNUSED, void *image)
1929} 1927}
1930 1928
1931static void 1929static void
1932eng_gl_image_direct_set(void *engine, void *image, Eina_Bool direct) 1930eng_gl_image_direct_set(void *eng, void *image, Eina_Bool direct)
1933{ 1931{
1934 Render_Output_GL_Generic *re = engine; 1932 Render_Engine_GL_Generic *engine = eng;
1935 Evas_GL_Image *im = image; 1933 Evas_GL_Image *im = image;
1936 1934
1937 if (!im) return; 1935 if (!im) return;
1938 if (im->native.data && direct && re && re->func.get_pixels) 1936 if (im->native.data && direct && engine->func.get_pixels)
1939 im->direct = EINA_TRUE; 1937 im->direct = EINA_TRUE;
1940 else 1938 else
1941 im->direct = EINA_FALSE; 1939 im->direct = EINA_FALSE;
@@ -2044,6 +2042,7 @@ eng_image_can_region_get(void *engine EINA_UNUSED, void *image)
2044{ 2042{
2045 Evas_GL_Image *gim = image; 2043 Evas_GL_Image *gim = image;
2046 Image_Entry *im; 2044 Image_Entry *im;
2045
2047 if (!gim) return EINA_FALSE; 2046 if (!gim) return EINA_FALSE;
2048 im = (Image_Entry *)gim->im; 2047 im = (Image_Entry *)gim->im;
2049 if (!im) return EINA_FALSE; 2048 if (!im) return EINA_FALSE;
@@ -2056,7 +2055,7 @@ eng_image_max_size_get(void *engine, int *maxw, int *maxh)
2056{ 2055{
2057 Evas_Engine_GL_Context *gl_context; 2056 Evas_Engine_GL_Context *gl_context;
2058 2057
2059 gl_context = gl_generic_context_get(engine); 2058 gl_context = gl_generic_context_find(engine);
2060 if (maxw) *maxw = gl_context->shared->info.max_texture_size; 2059 if (maxw) *maxw = gl_context->shared->info.max_texture_size;
2061 if (maxh) *maxh = gl_context->shared->info.max_texture_size; 2060 if (maxh) *maxh = gl_context->shared->info.max_texture_size;
2062} 2061}
@@ -2689,7 +2688,7 @@ eng_image_data_map(void *engine, void **image, Eina_Rw_Slice *slice,
2689 Evas_Colorspace cspace, Efl_Gfx_Buffer_Access_Mode mode, 2688 Evas_Colorspace cspace, Efl_Gfx_Buffer_Access_Mode mode,
2690 int plane) 2689 int plane)
2691{ 2690{
2692 Render_Output_GL_Generic *re = engine; 2691 Render_Engine_GL_Generic *re = engine;
2693 Evas_GL_Image_Data_Map *map = NULL; 2692 Evas_GL_Image_Data_Map *map = NULL;
2694 Evas_GL_Image *glim, *glim2 = NULL; 2693 Evas_GL_Image *glim, *glim2 = NULL;
2695 Eina_Bool ok = EINA_FALSE; 2694 Eina_Bool ok = EINA_FALSE;
@@ -3021,7 +3020,7 @@ eng_image_surface_noscale_new(void *engine, int w, int h, int alpha)
3021{ 3020{
3022 Evas_Engine_GL_Context *gl_context; 3021 Evas_Engine_GL_Context *gl_context;
3023 3022
3024 gl_context = gl_generic_context_get(engine); 3023 gl_context = gl_generic_context_find(engine);
3025 return evas_gl_common_image_surface_noscale_new(gl_context, w, h, alpha); 3024 return evas_gl_common_image_surface_noscale_new(gl_context, w, h, alpha);
3026} 3025}
3027 3026
@@ -3038,13 +3037,11 @@ eng_image_surface_noscale_region_get(void *engine EINA_UNUSED, void *image, int
3038 *h = im->h; 3037 *h = im->h;
3039 return; 3038 return;
3040 } 3039 }
3041 else 3040
3042 { 3041 *x = 0;
3043 *x = 0; 3042 *y = 0;
3044 *y = 0; 3043 *w = 0;
3045 *w = 0; 3044 *h = 0;
3046 *h = 0;
3047 }
3048} 3045}
3049 3046
3050//------------------------------------------------// 3047//------------------------------------------------//