e_policy_visibility: don't force update if comp_object is not redirected 31/251031/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Thu, 7 Jan 2021 05:15:43 +0000 (14:15 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Thu, 7 Jan 2021 06:01:43 +0000 (15:01 +0900)
if comp_object is not redirected, the compositor doesn't want to update it.
for example, if client is composited by hwc, comp_object is not redirected.

Change-Id: Ic3affe0b6a81d0ac7a03bb8f15d567c456d9d816

src/bin/e_comp_object.c
src/bin/e_comp_object.h
src/bin/e_policy_visibility.c

index 46e394b0ba1f18240fd04adc0e3352d49d447536..d79bcd3d55a847047b6b188c7ff74d8faab73402 100644 (file)
@@ -6229,3 +6229,12 @@ e_comp_object_image_filter_get(Evas_Object *obj)
 
    return cw->image_filter;
 }
+
+EINTERN Eina_Bool
+e_comp_object_redirected_get(Evas_Object *obj)
+{
+   API_ENTRY EINA_FALSE;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(cw->ec, EINA_FALSE);
+
+   return cw->redirected;
+}
index 3434715d9d6753d720f2657fa552875c1e08c9b4..800f0c39db7eaa223a7c72234f66b08c357a6a4d 100644 (file)
@@ -198,6 +198,8 @@ E_API Eina_Bool e_comp_object_native_usable_get(Evas_Object *obj);
 
 E_API Eina_Bool e_comp_object_image_filter_set(Evas_Object *obj, E_Comp_Image_Filter filter);
 EINTERN E_Comp_Image_Filter e_comp_object_image_filter_get(Evas_Object *obj);
+
+EINTERN Eina_Bool e_comp_object_redirected_get(Evas_Object *obj);
 #endif
 #endif
 
index 75409ef123aa250ec92e0246219468ccedbe56a0..500b0dbf9781d6003b78a91cf7136380a38f26d8 100644 (file)
@@ -919,9 +919,13 @@ _e_vis_client_cb_buffer_attach(void *data, int type EINA_UNUSED, void *event)
 
    /* force update
     * NOTE: this update can invoke some functions related to visibility grab */
-   e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
-   e_comp_object_dirty(ec->frame);
-   e_comp_object_render(ec->frame);
+   /* if comp_object is not redirected, the compositor doesn't want to update it */
+   if (e_comp_object_redirected_get(ec->frame))
+     {
+        e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
+        e_comp_object_dirty(ec->frame);
+        e_comp_object_render(ec->frame);
+     }
 
    if (vc->grab == grab)
      vc->grab = NULL;