e_hwc_windows: support presentation_time in case of use pp 18/242218/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Fri, 21 Aug 2020 10:34:54 +0000 (19:34 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Tue, 25 Aug 2020 05:27:25 +0000 (14:27 +0900)
take presentation_time of hwc_window or target_buffer in
commit pp_buffer

Change-Id: Ib9e0f29d3a6364a9e7fcb7fb81af61cdd387b1b1

src/bin/e_hwc_windows.c

index 6f65ad8b126780799a3c707712302f753214c962..e855d756f36221eccd583d2afcea67f581c93c4a 100644 (file)
@@ -2977,7 +2977,9 @@ _e_hwc_windows_pp_commit(E_Hwc *hwc)
 {
    E_Output *output = NULL;
    E_Hwc_Window_Queue_Buffer *queue_buffer = NULL;
+   E_Hwc_Windows_Buffer_Comp_Info *pp_buffer_comp_info, *buffer_comp_info;
    tdm_error terror = TDM_ERROR_NONE;
+   E_Client *ec;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(hwc, EINA_FALSE);
 
@@ -3020,6 +3022,25 @@ _e_hwc_windows_pp_commit(E_Hwc *hwc)
    terror = tdm_pp_commit(hwc->tpp);
    EINA_SAFETY_ON_FALSE_GOTO(terror == TDM_ERROR_NONE, commit_fail);
 
+   pp_buffer_comp_info = _e_hwc_windows_buffer_comp_info_get(queue_buffer->tsurface);
+   if (pp_buffer_comp_info)
+     {
+        if (hwc->pp_hwc_window)
+          {
+             ec = hwc->pp_hwc_window->ec;
+             if ((ec) && (ec->comp_data))
+               e_presentation_time_container_feedback_merge(&pp_buffer_comp_info->presentation_container,
+                                                            &ec->comp_data->presentation_container);
+          }
+        else
+          {
+             buffer_comp_info = _e_hwc_windows_buffer_comp_info_get(hwc->pp_buffer.tsurface);
+             if (buffer_comp_info)
+               e_presentation_time_container_feedback_merge(&pp_buffer_comp_info->presentation_container,
+                                                            &buffer_comp_info->presentation_container);
+          }
+     }
+
    hwc->pp_commit = EINA_TRUE;
 
    return EINA_TRUE;