e_hwc_windows: refactor _e_hwc_windows_evaluate(). 89/190389/6
authorSooChan Lim <sc1.lim@samsung.com>
Mon, 1 Oct 2018 10:07:09 +0000 (19:07 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 1 Oct 2018 11:25:19 +0000 (11:25 +0000)
Change-Id: Iccc36c58746e0d581afc2544a80ac77802adc4cd

src/bin/e_hwc_windows.c

index d77fd36d910ac584ad06c5beea3359277dea85c4..3928c4879a35f89bf552dc333eb120fe09462d81 100644 (file)
@@ -1547,16 +1547,14 @@ static Eina_Bool
 _e_hwc_windows_evaluate(E_Hwc *hwc)
 {
    E_Hwc_Mode hwc_mode = E_HWC_MODE_NONE;
-   Eina_Bool ret;
 
    _e_hwc_windows_states_evaluate(hwc);
 
    /* evaulate the compositions with the states*/
-   ret = _e_hwc_windows_composition_evaluate(hwc);
-   if (ret)
-     EHWSTRACE(" Succeed the compsition_evaulation.", NULL);
-   else
-     EHWSTRACE(" Need the comopsition re-evaulation.", NULL);
+   if (!_e_hwc_windows_composition_evaluate(hwc))
+     goto fail_evaluate;
+
+   EHWSTRACE(" Succeed the compsition_evaulation.", NULL);
 
    /* decide the E_HWC_MODE */
    hwc_mode = _e_hwc_windows_hwc_mode_get(hwc);
@@ -1585,7 +1583,11 @@ _e_hwc_windows_evaluate(E_Hwc *hwc)
    else
      _e_hwc_windows_target_state_set(hwc->target_hwc_window, E_HWC_WINDOW_STATE_NONE);
 
-    return ret;
+    return EINA_TRUE;
+
+fail_evaluate:
+   EHWSTRACE(" Need the comopsition re-evaulation.", NULL);
+   return EINA_FALSE;
 }
 
 static Eina_Bool