a1
authorSooChan Lim <sc1.lim@samsung.com>
Fri, 26 Jan 2018 10:01:55 +0000 (19:01 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Fri, 26 Jan 2018 10:01:55 +0000 (19:01 +0900)
Change-Id: I2dccaa5752132e928d3c18768ce2c160176d6020

src/bin/e_comp_wl_video.c
src/bin/e_hwc_window.c
src/bin/e_hwc_window.h
src/bin/e_output_hwc_windows.c

index 4319b2ef5d580b6e4f49501cd8f4e06d1eee02a1..2af9bad589cacf50dd0678310164896fd5ae76da 100644 (file)
@@ -550,7 +550,7 @@ _e_video_layer_set_buffer(E_Video_Layer * layer, tbm_surface_h buff)
    EINA_SAFETY_ON_NULL_RETURN_VAL(buff, TDM_ERROR_BAD_REQUEST);
 
    if (_is_video_hwc_windows(layer->video))
-     layer->cur_tsurface = buff; // set the buffer to the tdm at the e_hwc_window_update();
+     layer->cur_tsurface = buff; // set the buffer to the tdm at the e_hwc_window_buffer_update();
    else
      ret = tdm_layer_set_buffer(layer->tdm_layer, buff);
 
@@ -571,7 +571,7 @@ _e_video_layer_unset_buffer(E_Video_Layer *layer)
         EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window, TDM_ERROR_OPERATION_FAILED);
 
         e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_NONE);
-        layer->cur_tsurface = NULL; // set the buffer to the tdm at the e_hwc_window_update();
+        layer->cur_tsurface = NULL; // set the buffer to the tdm at the e_hwc_window_buffer_update();
 
         ret = TDM_ERROR_NONE;
      }
index 4233589d9f25397e39edbdcc2d6758e3ea75fa7a..c812c95a1fb264979304a540854e43ac8a0f6082 100644 (file)
@@ -1207,19 +1207,17 @@ e_hwc_window_zpos_get(E_Hwc_Window *hwc_window)
 }
 
 EINTERN Eina_Bool
-e_hwc_window_update(E_Hwc_Window *hwc_window)
+e_hwc_window_compsition_update(E_Hwc_Window *hwc_window)
 {
-   tbm_surface_h tsurface = NULL;
    tdm_hwc_window *thwc_window;
    tdm_hwc_window_composition composition_type;
    tdm_error error;
-   Eina_Bool result;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window, EINA_FALSE);
 
    if (e_hwc_window_is_target(hwc_window))
    {
-      ERR("HWC-WINS: target window cannot update at e_hwc_window_update.");
+      ERR("HWC-WINS: target window cannot update at e_hwc_window_compsition_update.");
       return EINA_FALSE;
    }
 
@@ -1235,6 +1233,20 @@ e_hwc_window_update(E_Hwc_Window *hwc_window)
    error = tdm_hwc_window_set_composition_type(hwc_window->thwc_window, composition_type);
    EINA_SAFETY_ON_TRUE_RETURN_VAL(error != TDM_ERROR_NONE, EINA_FALSE);
 
+   return EINA_TRUE;
+}
+
+EINTERN Eina_Bool
+e_hwc_window_buffer_update(E_Hwc_Window *hwc_window)
+{
+   tbm_surface_h tsurface = NULL;
+   tdm_hwc_window *thwc_window;
+   tdm_error error;
+   Eina_Bool result;
+
+   thwc_window = hwc_window->thwc_window;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(thwc_window, EINA_FALSE);
+
    tsurface = hwc_window->tsurface;
    if (tsurface)
      {
@@ -1244,7 +1256,7 @@ e_hwc_window_update(E_Hwc_Window *hwc_window)
      }
 
    /* set buffer */
-   error = tdm_hwc_window_set_buffer(hwc_window->thwc_window, hwc_window->tsurface);
+   error = tdm_hwc_window_set_buffer(thwc_window, hwc_window->tsurface);
    EINA_SAFETY_ON_TRUE_RETURN_VAL(error != TDM_ERROR_NONE, EINA_FALSE);
 
    return EINA_TRUE;
index 50f0135dbd21f1568d0989ab5ebe383a9606792f..734db655dc0bb412504256440afe849e3db17b38 100644 (file)
@@ -113,7 +113,8 @@ EINTERN void               e_hwc_window_free(E_Hwc_Window *hwc_window);
 
 EINTERN Eina_Bool          e_hwc_window_zpos_set(E_Hwc_Window *hwc_window, int zpos);
 EINTERN int                e_hwc_window_zpos_get(E_Hwc_Window *hwc_window);
-EINTERN Eina_Bool          e_hwc_window_update(E_Hwc_Window *hwc_window);
+EINTERN Eina_Bool          e_hwc_window_compsition_update(E_Hwc_Window *hwc_window);
+EINTERN Eina_Bool          e_hwc_window_buffer_update(E_Hwc_Window *hwc_window);
 EINTERN Eina_Bool          e_hwc_window_is_target(E_Hwc_Window *hwc_window);
 EINTERN Eina_Bool          e_hwc_window_is_video(E_Hwc_Window *hwc_window);
 EINTERN Eina_Bool          e_hwc_window_is_cursor(E_Hwc_Window *hwc_window);
index 920e562b7d1bc36d8f7de077933a5a2f28ba7f24..ffcbe4cd9555f1d1f0f82b6804c107278b868156 100644 (file)
@@ -870,7 +870,32 @@ _e_output_hwc_windows_window_find_by_twin(E_Output_Hwc *output_hwc, tdm_hwc_wind
 }
 
 static Eina_Bool
-_e_output_hwc_windows_update(E_Output_Hwc *output_hwc)
+_e_output_hwc_windows_compsitions_update(E_Output_Hwc *output_hwc)
+{
+   const Eina_List *l;
+   E_Hwc_Window *hwc_window;
+
+   EINA_LIST_FOREACH(e_output_hwc_windows_get(output_hwc), l, hwc_window)
+     {
+        if (e_hwc_window_is_target(hwc_window)) continue;
+
+        if (!e_hwc_window_compsition_update(hwc_window))
+          {
+             ERR("HWC-WINS: cannot update E_Hwc_Window(%p)", hwc_window);
+             return EINA_FALSE;
+          }
+    }
+
+#if DBG_EVALUATE
+   ELOGF("HWC-WINS", " Request HWC Validation to TDM HWC:", NULL, NULL);
+   _e_output_hwc_windows_status_print(output_hwc, EINA_FALSE);
+#endif
+
+   return EINA_TRUE;
+}
+
+static Eina_Bool
+_e_output_hwc_windows_buffers_update(E_Output_Hwc *output_hwc)
 {
    const Eina_List *l;
    E_Hwc_Window *hwc_window;
@@ -886,18 +911,13 @@ _e_output_hwc_windows_update(E_Output_Hwc *output_hwc)
              continue;
           }
 
-        if (!e_hwc_window_update(hwc_window))
+        if (!e_hwc_window_buffer_update(hwc_window))
           {
              ERR("HWC-WINS: cannot update E_Hwc_Window(%p)", hwc_window);
              return EINA_FALSE;
           }
      }
 
-#if DBG_EVALUATE
-   ELOGF("HWC-WINS", " Request HWC Validation to TDM HWC:", NULL, NULL);
-   _e_output_hwc_windows_status_print(output_hwc, EINA_FALSE);
-#endif
-
    return EINA_TRUE;
 }
 
@@ -1299,9 +1319,6 @@ e_output_hwc_windows_deinit(void)
 static Eina_Bool
 _e_output_hwc_windows_uncomplete_transition_check(E_Output_Hwc *output_hwc)
 {
-#if 1
-   return EINA_TRUE;
-#else
    const Eina_List *l;
    E_Hwc_Window *hwc_window;
    E_Hwc_Window_Target *target_hwc_window = output_hwc->target_hwc_window;
@@ -1357,7 +1374,7 @@ _e_output_hwc_windows_uncomplete_transition_check(E_Output_Hwc *output_hwc)
                      hwc_window->uncompleted_transition = E_HWC_WINDOW_TRANSITION_NONE_TO_NONE;
                    else
                      {
-                        e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_NONE);
+                        e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_DEVICE);
                         ret = EINA_FALSE;
 #if DBG_EVALUATE
                         ELOGF("HWC-WINS", " E_HWC_WINDOW_TRANSITION_CLIENT_TO_DEVICE is set.(Transition_Check)", NULL, NULL);
@@ -1373,7 +1390,6 @@ _e_output_hwc_windows_uncomplete_transition_check(E_Output_Hwc *output_hwc)
      }
 
    return ret;
-#endif
 }
 
 static void
@@ -1420,14 +1436,13 @@ _e_output_hwc_windows_transition_update(E_Output_Hwc *output_hwc)
                         hwc_window->uncompleted_transition = E_HWC_WINDOW_TRANSITION_DEVICE_TO_NONE;
 #if DBG_EVALUATE
                         ELOGF("HWC-WINS", " E_HWC_WINDOW_TRANSITION_DEVICE_TO_NONE is set.(Transition_Update)", NULL, NULL);
-                     }
 #endif
+                     }
 #endif
                 }
               if (e_hwc_window_state_get(hwc_window) == E_HWC_WINDOW_STATE_CLIENT)
                 {
                    hwc_window->transition = E_HWC_WINDOW_TRANSITION_DEVICE_TO_CLIENT;
-#if 0
                    /* need to complete_transition if target_window is enabled */
                    if (e_hwc_window_target_enabled(output_hwc->target_hwc_window))
                      {
@@ -1436,7 +1451,6 @@ _e_output_hwc_windows_transition_update(E_Output_Hwc *output_hwc)
                         ELOGF("HWC-WINS", " E_HWC_WINDOW_STATE_CLIENT is set.(Transition_Update)", NULL, NULL);
 #endif
                      }
-#endif
                 }
               if (e_hwc_window_state_get(hwc_window) == E_HWC_WINDOW_STATE_DEVICE)
                 hwc_window->transition = E_HWC_WINDOW_TRANSITION_DEVICE_TO_DEVICE;
@@ -1465,9 +1479,9 @@ _e_output_hwc_windows_commit_evaulate(E_Output_Hwc *output_hwc)
    can_validate = _e_output_hwc_windows_uncomplete_transition_check(output_hwc);
    if (can_validate)
      {
-        if (!_e_output_hwc_windows_update(output_hwc))
+        if (!_e_output_hwc_windows_compsitions_update(output_hwc))
           {
-             ERR("HWC-WINS: _e_output_hwc_windows_update failed.");
+             ERR("HWC-WINS: _e_output_hwc_windows_compsitions_update failed.");
              ret = EINA_FALSE;
              goto done;
           }
@@ -1492,6 +1506,10 @@ _e_output_hwc_windows_commit_evaulate(E_Output_Hwc *output_hwc)
      }
 
 done:
+
+   /* update the buffers and the infos */
+   _e_output_hwc_windows_buffers_update(output_hwc);
+
    return ret;
 }
 
@@ -1524,6 +1542,12 @@ e_output_hwc_windows_evaluate(E_Output_Hwc *output_hwc)
 
    ELOGF("HWC-WINS", "====================== Output HWC Apply (evaluate) ======================", NULL, NULL);
 
+   if (e_comp_canvas_norender_get() > 0)
+     {
+        ELOGF("HWC-WINS", " Block Display... NoRender get.", NULL, NULL);
+        return EINA_TRUE;
+     }
+
    /* evaulate the current states */
    _e_output_hwc_windows_states_evaluate(output_hwc);