summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-01-25 12:02:35 -0500
committerChris Michael <cp.michael@samsung.com>2017-01-25 12:02:35 -0500
commita306cba6c3d581e36fddb4858e27643e07fb0754 (patch)
tree03270c6312ffee11ebfa6511f67e3e33a43988c7
parent51684536f0c609355db6ea09e6669321ee5b51dd (diff)
ecore-wl2: Don't set opaque or input regions if already set
If the window opaque/input regions already match what is being requested (to be set), then no need for the compositor to create regions and set them. @optimize @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index 8acb7d555b..6d50ca34c4 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -870,6 +870,10 @@ ecore_wl2_window_opaque_region_set(Ecore_Wl2_Window *window, int x, int y, int w
870 870
871 EINA_SAFETY_ON_NULL_RETURN(window); 871 EINA_SAFETY_ON_NULL_RETURN(window);
872 872
873 if ((window->opaque.x == x) && (window->opaque.y == y) &&
874 (window->opaque.w == w) && (window->opaque.h == h))
875 return;
876
873 window->opaque.x = x; 877 window->opaque.x = x;
874 window->opaque.y = y; 878 window->opaque.y = y;
875 window->opaque.w = w; 879 window->opaque.w = w;
@@ -913,6 +917,10 @@ ecore_wl2_window_input_region_set(Ecore_Wl2_Window *window, int x, int y, int w,
913 917
914 EINA_SAFETY_ON_NULL_RETURN(window); 918 EINA_SAFETY_ON_NULL_RETURN(window);
915 919
920 if ((window->input_rect.x == x) && (window->input_rect.y == y) &&
921 (window->input_rect.w == w) && (window->input_rect.h == h))
922 return;
923
916 window->input_rect.x = x; 924 window->input_rect.x = x;
917 window->input_rect.y = y; 925 window->input_rect.y = y;
918 window->input_rect.w = w; 926 window->input_rect.w = w;