e_comp_wl_tizen_hwc: Fix wrong sending the commit feedback event 82/325082/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Mon, 19 May 2025 03:10:57 +0000 (12:10 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 2 Jun 2025 11:32:21 +0000 (11:32 +0000)
Do not send the commit feedback event when buffer of video window
is null even if it is visible.

this case ouccur when the video window is stand alone mode and
parent window is unmap state.

Change-Id: Icb7eb4a817783d1dad30ddf2bad8d60503efcf34

src/bin/server/e_comp_wl_tizen_hwc.c

index 29248bc1c298a7d8b0df180c882e05d6d0f4c60c..52dfb7d306b607288b4fe0c990a15e93bfce9b6a 100644 (file)
@@ -8,6 +8,7 @@
 #include "e_hwc_window_queue_intern.h"
 #include "e_compositor_intern.h"
 #include "e_output_intern.h"
+#include "e_client_video_intern.h"
 
 #include <libds-tizen/hwc.h>
 
@@ -290,6 +291,20 @@ e_comp_wl_tizen_hwc_init(void)
    return EINA_TRUE;
 }
 
+static Eina_Bool
+_e_comp_wl_tizen_hwc_client_update_pending_get(E_Client *ec)
+{
+   E_Hwc_Window *hwc_window = ec->hwc_window;
+
+   if (!hwc_window) return EINA_FALSE;
+   if (hwc_window->present_sync) return EINA_TRUE;
+   if (!e_hwc_window_is_video(hwc_window)) return EINA_FALSE;
+   if (!e_view_client_visible_get(e_client_view_get(ec))) return EINA_FALSE;
+   if (!e_client_video_tbm_surface_get(ec)) return EINA_TRUE;
+
+   return EINA_FALSE;
+}
+
 EINTERN void
 e_comp_wl_tizen_hwc_shutdown(void)
 {
@@ -306,9 +321,8 @@ e_comp_wl_tizen_hwc_committed(void)
    EINA_LIST_FOREACH_SAFE(tizen_hwc_mgr->ds_tizen_hwc_commit_feedback_list, l, ll, wrapper)
      {
         if (wrapper->pending) continue;
-        if ((wrapper->ec->hwc_window) &&
-           (wrapper->ec->hwc_window->present_sync)) continue;
         if (wrapper->dequeued) continue;
+        if (_e_comp_wl_tizen_hwc_client_update_pending_get(wrapper->ec)) continue;
 
         ELOGF("TIZEN-HWC", "[Send] Commit Feedback Committed.(%p)", wrapper->ec, wrapper);
         ds_tizen_hwc_commit_feedback_send_committed(wrapper->ds_tizen_hwccf);
@@ -326,9 +340,8 @@ e_comp_wl_tizen_hwc_discarded(void)
    EINA_LIST_FOREACH_SAFE(tizen_hwc_mgr->ds_tizen_hwc_commit_feedback_list, l, ll, wrapper)
      {
         if (wrapper->pending) continue;
-        if ((wrapper->ec->hwc_window) &&
-           (wrapper->ec->hwc_window->present_sync)) continue;
         if (wrapper->dequeued) continue;
+        if (_e_comp_wl_tizen_hwc_client_update_pending_get(wrapper->ec)) continue;
 
         ELOGF("TIZEN-HWC", "[Send] Commit Feedback Discarded.(%p)", wrapper->ec, wrapper);
         ds_tizen_hwc_commit_feedback_send_discarded(wrapper->ds_tizen_hwccf);