e_hwc_widnows: take presentation callback and feedback in offscreen commit 12/266712/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Wed, 17 Nov 2021 09:45:24 +0000 (18:45 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Wed, 17 Nov 2021 11:13:17 +0000 (20:13 +0900)
fix that presentation callback is not called and feedback is not sent
in case of offscreen commit

Change-Id: I60817a47ab4610b739759a5743710b872c65fa9f

src/bin/e_hwc_windows.c

index de7c40e5e695c64b48899b3861b4a1bca5bcbb17..5f36abcb6c5e890981ae343b7bd78bc24da67731 100644 (file)
@@ -502,12 +502,14 @@ _e_hwc_windows_offscreen_commit(E_Hwc *hwc)
    hwc_window_target = (E_Hwc_Window *)hwc->target_hwc_window;
    if (hwc_window_target)
      {
-        e_hwc_window_presentation_time_feedback_discard(hwc_window_target);
-        e_hwc_window_presentation_callback_call(hwc_window_target);
-
         commit_data = e_hwc_window_commit_data_acquire(hwc_window_target);
         if (commit_data)
           {
+             _e_hwc_windows_presentation_feedback_take(hwc_window_target);
+             _e_hwc_windows_presentation_callback_take(hwc_window_target);
+             e_hwc_window_presentation_time_feedback_discard(hwc_window_target);
+             e_hwc_window_presentation_callback_call(hwc_window_target);
+
              /* it is possible that other hwc_window is freed in
               * _e_hwc_windows_rendered_windows_free.
               * we must don't call commit_data_release of target_window in list.
@@ -532,6 +534,8 @@ _e_hwc_windows_offscreen_commit(E_Hwc *hwc)
         if (hwc_window->ec)
           e_pixmap_image_clear(hwc_window->ec->pixmap, 1);
 
+        _e_hwc_windows_presentation_feedback_take(hwc_window);
+        _e_hwc_windows_presentation_callback_take(hwc_window);
         e_hwc_window_presentation_time_feedback_discard(hwc_window);
         e_hwc_window_presentation_callback_call(hwc_window);