diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2018-04-06 12:13:45 -0500 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2018-04-20 13:00:28 -0500 |
commit | 8bd47cf83c88bb5f333cd4c4996a61d76b9b0d1d (patch) | |
tree | 2c7f07444a9196aee200367a2280dda1bc8c8447 /src/lib/ecore_wl2/ecore_wl2_window.c | |
parent | 4837f3244307f45a812342e114e2a98bc5436743 (diff) |
ecore_wl2: reduce wayland display flushes
Clean up various places where we do flushes that we don't need to
because some immediately following action is going to cause a flush.
Also fix places where we flush without actually doing anything.
Diffstat (limited to '')
-rw-r--r-- | src/lib/ecore_wl2/ecore_wl2_window.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index dee8b0a972..7010938c40 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c | |||
@@ -621,7 +621,6 @@ ecore_wl2_window_show(Ecore_Wl2_Window *window) | |||
621 | } | 621 | } |
622 | else | 622 | else |
623 | _configure_complete(window); | 623 | _configure_complete(window); |
624 | ecore_wl2_display_flush(window->display); | ||
625 | } | 624 | } |
626 | 625 | ||
627 | EAPI void | 626 | EAPI void |
@@ -1022,6 +1021,7 @@ ecore_wl2_window_title_set(Ecore_Wl2_Window *window, const char *title) | |||
1022 | 1021 | ||
1023 | eina_stringshare_replace(&window->title, title); | 1022 | eina_stringshare_replace(&window->title, title); |
1024 | if (!window->title) return; | 1023 | if (!window->title) return; |
1024 | if (!window->xdg_toplevel && !window->xdg_toplevel) return; | ||
1025 | 1025 | ||
1026 | if (window->xdg_toplevel) | 1026 | if (window->xdg_toplevel) |
1027 | xdg_toplevel_set_title(window->xdg_toplevel, window->title); | 1027 | xdg_toplevel_set_title(window->xdg_toplevel, window->title); |
@@ -1037,6 +1037,7 @@ ecore_wl2_window_class_set(Ecore_Wl2_Window *window, const char *clas) | |||
1037 | 1037 | ||
1038 | eina_stringshare_replace(&window->class, clas); | 1038 | eina_stringshare_replace(&window->class, clas); |
1039 | if (!window->class) return; | 1039 | if (!window->class) return; |
1040 | if (!window->xdg_toplevel && !window->xdg_toplevel) return; | ||
1040 | 1041 | ||
1041 | if (window->xdg_toplevel) | 1042 | if (window->xdg_toplevel) |
1042 | xdg_toplevel_set_app_id(window->xdg_toplevel, window->class); | 1043 | xdg_toplevel_set_app_id(window->xdg_toplevel, window->class); |
@@ -1361,8 +1362,9 @@ EAPI void | |||
1361 | ecore_wl2_window_aux_hint_add(Ecore_Wl2_Window *win, int id, const char *hint, const char *val) | 1362 | ecore_wl2_window_aux_hint_add(Ecore_Wl2_Window *win, int id, const char *hint, const char *val) |
1362 | { | 1363 | { |
1363 | if (!win) return; | 1364 | if (!win) return; |
1364 | if ((win->surface) && (win->display->wl.efl_aux_hints)) | 1365 | if ((!win->surface) || (!win->display->wl.efl_aux_hints)) return; |
1365 | efl_aux_hints_add_aux_hint(win->display->wl.efl_aux_hints, win->surface, id, hint, val); | 1366 | |
1367 | efl_aux_hints_add_aux_hint(win->display->wl.efl_aux_hints, win->surface, id, hint, val); | ||
1366 | ecore_wl2_display_flush(win->display); | 1368 | ecore_wl2_display_flush(win->display); |
1367 | } | 1369 | } |
1368 | 1370 | ||
@@ -1370,8 +1372,9 @@ EAPI void | |||
1370 | ecore_wl2_window_aux_hint_change(Ecore_Wl2_Window *win, int id, const char *val) | 1372 | ecore_wl2_window_aux_hint_change(Ecore_Wl2_Window *win, int id, const char *val) |
1371 | { | 1373 | { |
1372 | if (!win) return; | 1374 | if (!win) return; |
1373 | if ((win->surface) && (win->display->wl.efl_aux_hints)) | 1375 | if ((!win->surface) && (!win->display->wl.efl_aux_hints)) return; |
1374 | efl_aux_hints_change_aux_hint(win->display->wl.efl_aux_hints, win->surface, id, val); | 1376 | |
1377 | efl_aux_hints_change_aux_hint(win->display->wl.efl_aux_hints, win->surface, id, val); | ||
1375 | ecore_wl2_display_flush(win->display); | 1378 | ecore_wl2_display_flush(win->display); |
1376 | } | 1379 | } |
1377 | 1380 | ||
@@ -1379,8 +1382,9 @@ EAPI void | |||
1379 | ecore_wl2_window_aux_hint_del(Ecore_Wl2_Window *win, int id) | 1382 | ecore_wl2_window_aux_hint_del(Ecore_Wl2_Window *win, int id) |
1380 | { | 1383 | { |
1381 | if (!win) return; | 1384 | if (!win) return; |
1382 | if ((win->surface) && (win->display->wl.efl_aux_hints)) | 1385 | if ((!win->surface) || (!win->display->wl.efl_aux_hints)) return; |
1383 | efl_aux_hints_del_aux_hint(win->display->wl.efl_aux_hints, win->surface, id); | 1386 | |
1387 | efl_aux_hints_del_aux_hint(win->display->wl.efl_aux_hints, win->surface, id); | ||
1384 | ecore_wl2_display_flush(win->display); | 1388 | ecore_wl2_display_flush(win->display); |
1385 | } | 1389 | } |
1386 | 1390 | ||