e_util_transform: fix flickering when client attach null buffer 95/288195/1 accepted/tizen/7.0/unified/20230215.154338
authorChangyeon Lee <cyeon.lee@samsung.com>
Mon, 13 Feb 2023 05:37:36 +0000 (14:37 +0900)
committerchangyeon lee <cyeon.lee@samsung.com>
Mon, 13 Feb 2023 10:39:17 +0000 (10:39 +0000)
client attach null buffer when it want to unmap
size of ec is updated by size of buffer and core transform use
size of ec.
so ec is transformed by 0x0 size when window  is unmapped and
core transform is enabled.
it cause flickering frame when client attach valid buffer after
it is unmapped.

ex) window is 1920x1080 and core transform size is 3840x2160
1. client attach null buffer and it is umapped
2. transform is updated by 0x0 size because size of ec is 0x0
3. but ec is visible because hide effect
3. client is rendered with transform 0x0 size
4. client attach 1920x1080 size buffer and transform is updated
   by 3840x2160
5. client is rendered with transform 3840x2160 size

Change-Id: Icd74973ae3bd18fda47fcadc47d9fad37bc667a5

src/bin/e_util_transform.c

index 43f8cd25fdccddb30d3169baab4276f9d6e7b086..8e1f9ae8309ea78a10764beab6c3859ef0e023bc 100644 (file)
@@ -486,8 +486,19 @@ e_util_transform_rect_init(E_Util_Transform_Rect *rect, int x, int y, int w, int
 E_API void
 e_util_transform_rect_client_rect_get(E_Util_Transform_Rect *rect, E_Client *ec)
 {
+   int w, h;
+
    if (!rect || !ec) return;
-   e_util_transform_rect_init(rect, ec->x, ec->y, ec->w, ec->h);
+
+   if ((ec->w == 0) && (ec->h == 0) && (ec->frame))
+     {
+        evas_object_geometry_get(ec->frame, NULL, NULL, &w, &h);
+        e_util_transform_rect_init(rect, ec->x, ec->y, w, h);
+     }
+   else
+     {
+        e_util_transform_rect_init(rect, ec->x, ec->y, ec->w, ec->h);
+     }
 }
 
 E_API E_Util_Transform_Rect_Vertex