summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-03-18 14:03:17 -0400
committerCedric BAIL <cedric.bail@free.fr>2019-03-20 12:36:55 -0700
commit61e880e57c5cfec897959e64ed5731d5425d2699 (patch)
tree65e2c50de8d07f7795a9e6aa23ddb9b3bfc017b9
parent4792bb8239e710b80b615d94d24a414581a66024 (diff)
elm_test: set accel for all glview tests
these otherwise require the user to set ELM_ACCEL or manually change the config which is cumbersome Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8392
-rw-r--r--src/bin/elementary/test_glview_manygears.c8
-rw-r--r--src/bin/elementary/test_glview_simple.c9
2 files changed, 17 insertions, 0 deletions
diff --git a/src/bin/elementary/test_glview_manygears.c b/src/bin/elementary/test_glview_manygears.c
index 8ddac2adf2..31084b78ec 100644
--- a/src/bin/elementary/test_glview_manygears.c
+++ b/src/bin/elementary/test_glview_manygears.c
@@ -842,10 +842,18 @@ test_glview_manygears(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
842 if (!(gld = calloc(1, sizeof(GLData)))) return; 842 if (!(gld = calloc(1, sizeof(GLData)))) return;
843 gldata_init(gld); 843 gldata_init(gld);
844 844
845 // add a Z-depth buffer to the window and try to use GL
846 Eina_Stringshare *accel;
847 accel = eina_stringshare_add(elm_config_accel_preference_get());
848 elm_config_accel_preference_set("gl:depth");
849
845 // new window - do the usual and give it a name, title and delete handler 850 // new window - do the usual and give it a name, title and delete handler
846 win = elm_win_util_standard_add("glview_manygears", "GLView Many Gears"); 851 win = elm_win_util_standard_add("glview_manygears", "GLView Many Gears");
847 elm_win_autodel_set(win, EINA_TRUE); 852 elm_win_autodel_set(win, EINA_TRUE);
848 853
854 // restore previous accel preference
855 elm_config_accel_preference_set(accel);
856 eina_stringshare_del(accel);
849 857
850 // add an image bg 858 // add an image bg
851 bg = elm_bg_add(win); 859 bg = elm_bg_add(win);
diff --git a/src/bin/elementary/test_glview_simple.c b/src/bin/elementary/test_glview_simple.c
index d621a98d1d..9e34afe17f 100644
--- a/src/bin/elementary/test_glview_simple.c
+++ b/src/bin/elementary/test_glview_simple.c
@@ -233,10 +233,19 @@ test_glview_simple(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
233 233
234 if (!(gld = calloc(1, sizeof(GL_Data)))) return; 234 if (!(gld = calloc(1, sizeof(GL_Data)))) return;
235 235
236 // add a Z-depth buffer to the window and try to use GL
237 Eina_Stringshare *accel;
238 accel = eina_stringshare_add(elm_config_accel_preference_get());
239 elm_config_accel_preference_set("gl:depth");
240
236 win = elm_win_util_standard_add("glview-simple", "GLView Simple"); 241 win = elm_win_util_standard_add("glview-simple", "GLView Simple");
237 elm_win_autodel_set(win, EINA_TRUE); 242 elm_win_autodel_set(win, EINA_TRUE);
238 evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _win_free_cb, gld); 243 evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _win_free_cb, gld);
239 244
245 // restore previous accel preference
246 elm_config_accel_preference_set(accel);
247 eina_stringshare_del(accel);
248
240 bx = elm_box_add(win); 249 bx = elm_box_add(win);
241 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 250 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
242 elm_win_resize_object_add(win, bx); 251 elm_win_resize_object_add(win, bx);