summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2020-01-08 09:21:43 -0500
committerChristopher Michael <cp.michael@samsung.com>2020-01-08 09:21:43 -0500
commit5140c43960c9fc29dce279e73035bc7d2fd9146f (patch)
treefda488cd3bce4c78d397b5c500a37c52ac9f94f1
parent73195a34de15efa91dd7863a63ac99762b6bd7da (diff)
tests/ecore_wl2: Fix formatting
NB: No functional changes
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_test_window.c68
1 files changed, 40 insertions, 28 deletions
diff --git a/src/tests/ecore_wl2/ecore_wl2_test_window.c b/src/tests/ecore_wl2/ecore_wl2_test_window.c
index 66b76a3eb9..c69f8eb342 100644
--- a/src/tests/ecore_wl2/ecore_wl2_test_window.c
+++ b/src/tests/ecore_wl2/ecore_wl2_test_window.c
@@ -19,24 +19,25 @@
19#define WIDTH 480 19#define WIDTH 480
20#define HEIGHT 360 20#define HEIGHT 360
21 21
22typedef struct _Test_Data { 22typedef struct _Test_Data
23 Ecore_Wl2_Display *display; 23{
24 Ecore_Wl2_Window *win; 24 Ecore_Wl2_Display *display;
25 Ecore_Wl2_Frame_Cb_Handle *frame_callback_handler; 25 Ecore_Wl2_Window *win;
26 Ecore_Event_Handler *handler; 26 Ecore_Wl2_Frame_Cb_Handle *frame_callback_handler;
27 Ecore_Event_Handler *handler;
27 28
28 struct wl_surface *surface; 29 struct wl_surface *surface;
29 struct wl_egl_window *egl_window; 30 struct wl_egl_window *egl_window;
30 31
31 int width; 32 int width;
32 int height; 33 int height;
33 int frame_callback_count; 34 int frame_callback_count;
34 35
35#ifdef GL_GLES 36#ifdef GL_GLES
36 EGLDisplay egl_display; 37 EGLDisplay egl_display;
37 EGLConfig egl_conf; 38 EGLConfig egl_conf;
38 EGLSurface egl_surface; 39 EGLSurface egl_surface;
39 EGLContext egl_context; 40 EGLContext egl_context;
40#endif 41#endif
41} Test_Data; 42} Test_Data;
42 43
@@ -72,16 +73,19 @@ _init_egl(Test_Data *td)
72 EGL_NONE 73 EGL_NONE
73 }; 74 };
74 75
75 td->egl_display = eglGetDisplay((EGLNativeDisplayType)ecore_wl2_display_get(td->display)); 76 td->egl_display =
77 eglGetDisplay((EGLNativeDisplayType)ecore_wl2_display_get(td->display));
76 eglInitialize(td->egl_display, NULL, NULL); 78 eglInitialize(td->egl_display, NULL, NULL);
77 eglChooseConfig(td->egl_display, attributes, &td->egl_conf, 1, &num_config); 79 eglChooseConfig(td->egl_display, attributes, &td->egl_conf, 1, &num_config);
78 td->egl_context = eglCreateContext(td->egl_display, td->egl_conf, EGL_NO_CONTEXT, NULL); 80 td->egl_context =
81 eglCreateContext(td->egl_display, td->egl_conf, EGL_NO_CONTEXT, NULL);
79 82
80 td->egl_window = wl_egl_window_create(td->surface, td->width, td->height); 83 td->egl_window = wl_egl_window_create(td->surface, td->width, td->height);
81 td->egl_surface = eglCreateWindowSurface(td->egl_display, 84 td->egl_surface =
82 td->egl_conf, td->egl_window, NULL); 85 eglCreateWindowSurface(td->egl_display, td->egl_conf, td->egl_window, NULL);
83 86
84 eglMakeCurrent(td->egl_display, td->egl_surface, td->egl_surface, td->egl_context); 87 eglMakeCurrent(td->egl_display, td->egl_surface, td->egl_surface,
88 td->egl_context);
85} 89}
86 90
87static void 91static void
@@ -423,7 +427,9 @@ _test_activated_configure_complete(void *data, int type EINA_UNUSED, void *event
423{ 427{
424 Test_Data *td = data; 428 Test_Data *td = data;
425 429
426 td->frame_callback_handler = ecore_wl2_window_frame_callback_add(td->win, _test_activated_frame_cb, td); 430 td->frame_callback_handler =
431 ecore_wl2_window_frame_callback_add(td->win,
432 _test_activated_frame_cb, td);
427 ecore_wl2_window_commit(td->win, EINA_TRUE); 433 ecore_wl2_window_commit(td->win, EINA_TRUE);
428 434
429 return ECORE_CALLBACK_PASS_ON; 435 return ECORE_CALLBACK_PASS_ON;
@@ -463,8 +469,9 @@ EFL_START_TEST(wl2_window_activated)
463 ecore_wl2_window_show(td->win); 469 ecore_wl2_window_show(td->win);
464 470
465 _init_egl(td); 471 _init_egl(td);
466 td->handler = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE, 472 td->handler =
467 _test_activated_configure_complete, td); 473 ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE,
474 _test_activated_configure_complete, td);
468 ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_ACTIVATE, 475 ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_ACTIVATE,
469 _test_activated_window_activate, NULL); 476 _test_activated_window_activate, NULL);
470 477
@@ -603,7 +610,8 @@ _test_commit_configure_complete(void *data, int type EINA_UNUSED, void *event EI
603{ 610{
604 Test_Data *td = data; 611 Test_Data *td = data;
605 612
606 td->frame_callback_handler = ecore_wl2_window_frame_callback_add(td->win, _test_commit_frame_cb, td); 613 td->frame_callback_handler =
614 ecore_wl2_window_frame_callback_add(td->win, _test_commit_frame_cb, td);
607 ecore_wl2_window_commit(td->win, EINA_TRUE); 615 ecore_wl2_window_commit(td->win, EINA_TRUE);
608 616
609 return ECORE_CALLBACK_PASS_ON; 617 return ECORE_CALLBACK_PASS_ON;
@@ -633,8 +641,9 @@ EFL_START_TEST(wl2_window_commit)
633 641
634 ecore_wl2_window_show(td->win); 642 ecore_wl2_window_show(td->win);
635 643
636 td->handler = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE, 644 td->handler =
637 _test_commit_configure_complete, td); 645 ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE,
646 _test_commit_configure_complete, td);
638 647
639 ecore_main_loop_begin(); 648 ecore_main_loop_begin();
640 649
@@ -664,7 +673,9 @@ _test_frame_callback_configure_complete(void *data, int type EINA_UNUSED, void *
664{ 673{
665 Test_Data *td = data; 674 Test_Data *td = data;
666 675
667 td->frame_callback_handler = ecore_wl2_window_frame_callback_add(td->win, _test_frame_callback_frame_cb, td); 676 td->frame_callback_handler =
677 ecore_wl2_window_frame_callback_add(td->win,
678 _test_frame_callback_frame_cb, td);
668 ecore_wl2_window_commit(td->win, EINA_TRUE); 679 ecore_wl2_window_commit(td->win, EINA_TRUE);
669 680
670 return ECORE_CALLBACK_PASS_ON; 681 return ECORE_CALLBACK_PASS_ON;
@@ -694,8 +705,9 @@ EFL_START_TEST(wl2_window_frame_callback)
694 705
695 ecore_wl2_window_show(td->win); 706 ecore_wl2_window_show(td->win);
696 707
697 td->handler = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE, 708 td->handler =
698 _test_frame_callback_configure_complete, td); 709 ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE,
710 _test_frame_callback_configure_complete, td);
699 711
700 ecore_main_loop_begin(); 712 ecore_main_loop_begin();
701 713