Added check damage count and pixmap validate of e_client object showing.
authorMun, Gwan-gyeong <kk.moon@samsung.com>
Thu, 26 Feb 2015 13:47:21 +0000 (22:47 +0900)
committerBoram Park <boram1288.park@samsung.com>
Wed, 18 Mar 2015 04:03:08 +0000 (13:03 +0900)
Change-Id: I99e0956043978b09064b2e8d2dcb3cd2c36cc075

src/bin/e_comp_object.c
src/bin/e_pixmap.c
src/bin/e_pixmap.h

index 0bd7f2ca4bc124a886477c288534fc357c97b13d..c64c14a6ca454a3486dcb0272c4adf08608e5103 100644 (file)
@@ -1416,6 +1416,10 @@ _e_comp_intercept_show_helper(E_Comp_Object *cw)
      {
         if (cw->ec->internal) //internal clients render when they feel like it
           e_comp_object_damage(cw->smart_obj, 0, 0, cw->w, cw->h);
+
+        if (!cw->update_count || !(e_pixmap_validate_check(cw->ec->pixmap)))
+          return;
+
         evas_object_show(cw->smart_obj);
      }
 }
@@ -1427,6 +1431,7 @@ _e_comp_intercept_show(void *data, Evas_Object *obj EINA_UNUSED)
    E_Client *ec = cw->ec;
 
    if (ec->ignored) return;
+
    if (cw->effect_obj)
      {
         //INF("SHOW2 %p", ec);
@@ -3032,6 +3037,10 @@ e_comp_object_damage(Evas_Object *obj, int x, int y, int w, int h)
      {
         RENDER_DEBUG("IGNORED %p: %d,%d %dx%d", cw->ec, x, y, w, h);
         e_comp_object_render_update_add(obj);
+
+        if ((cw->ec->visible) && (!evas_object_visible_get(cw->smart_obj)))
+          evas_object_show(cw->smart_obj);
+
         return;
      }
    /* clip rect to client surface */
@@ -3072,6 +3081,9 @@ e_comp_object_damage(Evas_Object *obj, int x, int y, int w, int h)
      }
    cw->updates_exist = 1;
    e_comp_object_render_update_add(obj);
+
+   if ((cw->ec->visible) && (!evas_object_visible_get(cw->smart_obj)))
+     evas_object_show(cw->smart_obj);
 }
 
 EAPI Eina_Bool
index dbefc9971a6a26595eb1433e82552df0ccf28832..7ea6728243f179f34ff76141e0c7d4f2ae37c06a 100644 (file)
@@ -832,6 +832,36 @@ e_pixmap_image_draw(E_Pixmap *cp, const Eina_Rectangle *r)
    return EINA_FALSE;
 }
 
+EAPI Eina_Bool
+e_pixmap_validate_check(const E_Pixmap *cp)
+{
+   Eina_Bool success = EINA_FALSE;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_FALSE);
+
+   switch (cp->type)
+      {
+       case E_PIXMAP_TYPE_X:
+#ifndef HAVE_WAYLAND_ONLY
+         {
+            int pw, ph;
+            if (!cp->pixmap) break;
+            ecore_x_pixmap_geometry_get(cp->pixmap, NULL, NULL, &pw, &ph);
+            success = (pw > 0) && (ph > 0);
+         }
+#endif
+         break;
+       case E_PIXMAP_TYPE_WL:
+#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
+         _e_pixmap_update_wl(cp);
+         success = (cp->w > 0) && (cp->h > 0);
+#endif
+         break;
+       default:
+         break;
+      }
+   return success;
+}
+
 EAPI void 
 e_pixmap_image_draw_done(E_Pixmap *cp)
 {
index 1bf387862efab5f965642b516ee926c5021636db..f13025192cc0b9a263f85d882a9d261150b6ef92 100644 (file)
@@ -44,6 +44,7 @@ EAPI Eina_Bool e_pixmap_image_is_argb(const E_Pixmap *cp);
 EAPI void *e_pixmap_image_data_get(E_Pixmap *cp);
 EAPI Eina_Bool e_pixmap_image_data_argb_convert(E_Pixmap *cp, void *pix, void *ipix, Eina_Rectangle *r, int stride);
 EAPI Eina_Bool e_pixmap_image_draw(E_Pixmap *cp, const Eina_Rectangle *r);
+EAPI Eina_Bool e_pixmap_validate_check(const E_Pixmap *cp);
 
 EAPI void e_pixmap_image_opaque_set(E_Pixmap *cp, int x, int y, int w, int h);
 EAPI void e_pixmap_image_opaque_get(E_Pixmap *cp, int *x, int *y, int *w, int *h);