ecore-wayland: Reduce overhead for maximize/fullscreen set functions
authorChris Michael <cp.michael@samsung.com>
Wed, 18 Nov 2015 17:56:12 +0000 (12:56 -0500)
committerChris Michael <cp.michael@samsung.com>
Wed, 18 Nov 2015 17:56:12 +0000 (12:56 -0500)
This patch just gets the state flags directly from the window rather
than calling "get" functions to return the same parameter.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/ecore_wayland/ecore_wl_window.c

index 95ff881..982dfd5 100644 (file)
@@ -455,10 +455,9 @@ ecore_wl_window_maximized_set(Ecore_Wl_Window *win, Eina_Bool maximized)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    EINA_SAFETY_ON_NULL_RETURN(win);
-   prev = ecore_wl_window_maximized_get(win);
 
+   prev = win->maximized;
    maximized = !!maximized;
-
    if (prev == maximized) return;
 
    if (maximized)
@@ -499,11 +498,10 @@ ecore_wl_window_fullscreen_set(Ecore_Wl_Window *win, Eina_Bool fullscreen)
 
    EINA_SAFETY_ON_NULL_RETURN(win);
 
-   prev = ecore_wl_window_fullscreen_get(win);
-
+   prev = win->fullscreen;
    fullscreen = !!fullscreen;
-
    if (prev == fullscreen) return;
+
    if (fullscreen)
      {
         win->type = ECORE_WL_WINDOW_TYPE_FULLSCREEN;