From 9db92d5f443a00ff79d64b32a87225485e4bdde8 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 17 Mar 2014 15:10:33 -0400 Subject: [PATCH] +test for gengrid speed this is a test for demonstrating the severity of T1068. scrolling and resizing the test cause very long ui blockages --- src/bin/test.c | 2 ++ src/bin/test_gengrid.c | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/src/bin/test.c b/src/bin/test.c index e3917ea..2d333f2 100644 --- a/src/bin/test.c +++ b/src/bin/test.c @@ -131,6 +131,7 @@ void test_gengrid2(void *data, Evas_Object *obj, void *event_info); void test_gengrid3(void *data, Evas_Object *obj, void *event_info); void test_gengrid_item_styles(void *data, Evas_Object *obj, void *event_info); void test_gengrid4(void *data, Evas_Object *obj, void *event_info); +void test_gengrid_speed(void *data, Evas_Object *obj, void *event_info); void test_win_state(void *data, Evas_Object *obj, void *event_info); void test_win_state2(void *data, Evas_Object *obj, void *event_info); void test_progressbar(void *data, Evas_Object *obj, void *event_info); @@ -661,6 +662,7 @@ add_tests: ADD_TEST(NULL, "Lists - Gengrid", "GenGrid Group", test_gengrid3); ADD_TEST(NULL, "Lists - Gengrid", "GenGrid Show/Bring_in", test_gengrid4); ADD_TEST(NULL, "Lists - Gengrid", "GenGrid Item Styles", test_gengrid_item_styles); + ADD_TEST(NULL, "Lists - Gengrid", "Gengrid Update Speed", test_gengrid_speed); //------------------------------// ADD_TEST(NULL, "General", "Scaling", test_scaling); diff --git a/src/bin/test_gengrid.c b/src/bin/test_gengrid.c index 3fa9f86..36658c9 100644 --- a/src/bin/test_gengrid.c +++ b/src/bin/test_gengrid.c @@ -1272,3 +1272,39 @@ test_gengrid4(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_ evas_object_show(win); } + +void +test_gengrid_speed(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) +{ + Evas_Object *win, *fr, *bx; + api_data *api = calloc(1, sizeof(api_data)); + + win = elm_win_util_standard_add("gengrid", "Gengrid"); + elm_win_autodel_set(win, EINA_TRUE); + evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api); + + api->box = bx = elm_box_add(win); + evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); + elm_win_resize_object_add(win, bx); + evas_object_show(bx); + + fr = elm_frame_add(win); + evas_object_size_hint_weight_set(fr, EVAS_HINT_EXPAND, 0); + evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, 0.5); + elm_frame_autocollapse_set(fr, EINA_TRUE); + elm_object_text_set(fr, "Collapse me!"); + elm_box_pack_end(bx, fr); + evas_object_show(fr); + + api->grid = create_gengrid(win, 5000); + evas_object_size_hint_min_set(api->grid, 600, 600); + elm_gengrid_item_size_set(api->grid, + elm_config_scale_get() * 30, + elm_config_scale_get() * 36); + elm_object_content_set(fr, api->grid); + evas_object_show(api->grid); + + evas_object_resize(win, 600, 600); + evas_object_show(win); +} -- 2.7.4