e_comp_object: do not check r, g, b color when checking visible of object 65/292665/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Wed, 10 May 2023 03:05:10 +0000 (12:05 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Thu, 11 May 2023 05:00:01 +0000 (14:00 +0900)
if alpha is greater than 0 and r, g, b color are zero, object is visible.

Change-Id: Id164e094f0be6d468c25f2cc773f4bd0a0740c79

src/bin/e_comp_object.c

index 6cb7222..595fde5 100644 (file)
@@ -6536,24 +6536,24 @@ EINTERN Eina_Bool
 e_comp_object_color_visible_get(Evas_Object *obj)
 {
    API_ENTRY EINA_FALSE;
-   int r, g, b, a;
+   int a;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(cw->ec, EINA_FALSE);
 
-   e_comp_object_color_get(obj, &r, &g, &b, &a);
-   if ((a == 0) || ((r == 0) && (g == 0) && (b == 0)))
+   e_comp_object_color_get(obj, NULL, NULL, NULL, &a);
+   if (a <= 0)
      return EINA_FALSE;
 
-   evas_object_color_get(cw->effect_obj, &r, &g, &b, &a);
-   if ((a == 0) || ((r == 0) && (g == 0) && (b == 0)))
+   evas_object_color_get(cw->effect_obj, NULL, NULL, NULL, &a);
+   if (a <= 0)
      return EINA_FALSE;
 
-   evas_object_color_get(cw->shobj, &r, &g, &b, &a);
-   if ((a == 0) || ((r == 0) && (g == 0) && (b == 0)))
+   evas_object_color_get(cw->shobj, NULL, NULL, NULL, &a);
+   if (a <= 0)
      return EINA_FALSE;
 
-   evas_object_color_get(cw->obj, &r, &g, &b, &a);
-   if ((a == 0) || ((r == 0) && (g == 0) && (b == 0)))
+   evas_object_color_get(cw->obj, NULL, NULL, NULL, &a);
+   if (a <= 0)
      return EINA_FALSE;
 
    return EINA_TRUE;