From e7da7c7a47dfaf733beb44df8a2ed10cef40ee4d Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Mon, 27 May 2024 16:41:10 +0900 Subject: [PATCH] e_hwc_window: add E_HWC_WINDOW_HOOK_VIDEO_SET Change-Id: Ieecbd7e4e6a515794f60bc0add4c5b330d8f8aeb --- src/bin/displaymgr/e_hwc_window.c | 3 +++ src/bin/displaymgr/e_hwc_window_intern.h | 11 +++++++++++ src/bin/displaymgr/e_hwc_window_queue.c | 10 ---------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/bin/displaymgr/e_hwc_window.c b/src/bin/displaymgr/e_hwc_window.c index 0b16597..77e3f8c 100644 --- a/src/bin/displaymgr/e_hwc_window.c +++ b/src/bin/displaymgr/e_hwc_window.c @@ -87,6 +87,7 @@ typedef struct _Hwc_Window_Prop static Eina_Inlist *_e_hwc_window_hooks[] = { [E_HWC_WINDOW_HOOK_ACCEPTED_STATE_SET] = NULL, + [E_HWC_WINDOW_HOOK_VIDEO_SET] = NULL, }; static void @@ -1593,6 +1594,8 @@ e_hwc_window_video_set(E_Hwc_Window *hwc_window, Eina_Bool set) hwc_window->is_video = set; + _e_hwc_window_hook_call(E_HWC_WINDOW_HOOK_VIDEO_SET, hwc_window); + return EINA_TRUE; } diff --git a/src/bin/displaymgr/e_hwc_window_intern.h b/src/bin/displaymgr/e_hwc_window_intern.h index 759f6c2..d37e286 100644 --- a/src/bin/displaymgr/e_hwc_window_intern.h +++ b/src/bin/displaymgr/e_hwc_window_intern.h @@ -10,6 +10,16 @@ #define EHW_C(b,m) (b ? ((b) >> (m)) & 0xFF : ' ') #define EHW_FOURCC_STR(id) EHW_C(id,0), EHW_C(id,8), EHW_C(id,16), EHW_C(id,24) +#define E_HWC_WINDOW_HOOK_APPEND(list, type, callback, data) \ + do \ + { \ + E_Hwc_Window_Hook *_ch; \ + _ch = e_hwc_window_hook_add(type, callback, data); \ + assert(_ch); \ + list = eina_list_append(list, _ch); \ + } \ + while (0) + typedef struct _E_Hwc_Window_Commit_Data E_Hwc_Window_Commit_Data; typedef struct _E_Hwc_Window_Hook E_Hwc_Window_Hook; @@ -53,6 +63,7 @@ typedef enum _E_Hwc_Window_Restriction typedef enum _E_Hwc_Window_Hook_Point { E_HWC_WINDOW_HOOK_ACCEPTED_STATE_SET, + E_HWC_WINDOW_HOOK_VIDEO_SET, E_HWC_WINDOW_HOOK_LAST } E_Hwc_Window_Hook_Point; diff --git a/src/bin/displaymgr/e_hwc_window_queue.c b/src/bin/displaymgr/e_hwc_window_queue.c index 8985186..89ae4be 100644 --- a/src/bin/displaymgr/e_hwc_window_queue.c +++ b/src/bin/displaymgr/e_hwc_window_queue.c @@ -20,16 +20,6 @@ #define CLEAR(x) memset(&(x), 0, sizeof (x)) #endif -#define E_HWC_WINDOW_HOOK_APPEND(list, type, callback, data) \ - do \ - { \ - E_Hwc_Window_Hook *_ch; \ - _ch = e_hwc_window_hook_add(type, callback, data); \ - assert(_ch); \ - list = eina_list_append(list, _ch); \ - } \ - while (0) - #define E_HWC_HOOK_APPEND(list, type, callback, data) \ do \ { \ -- 2.7.4