Added check damage count and pixmap validate of e_client object showing. 63/35963/2 accepted/tizen/common/20150227.082647 accepted/tizen/mobile/20150227.121838 accepted/tizen/tv/20150227.084642 accepted/tizen/wearable/20150302.083846 submit/tizen/20150227.050216
authorMun, Gwan-gyeong <kk.moon@samsung.com>
Thu, 26 Feb 2015 13:47:21 +0000 (22:47 +0900)
committerMun, Gwan-gyeong <kk.moon@samsung.com>
Thu, 26 Feb 2015 14:38:18 +0000 (23:38 +0900)
Change-Id: I99e0956043978b09064b2e8d2dcb3cd2c36cc075

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

index 7c0772c82d706fae5a3c8d723415bf6b64c27227..0ac8660930444720c43a1aafe5799bbb60d47069 100644 (file)
@@ -1379,6 +1379,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);
      }
 }
@@ -1390,6 +1394,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);
@@ -3027,6 +3032,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 */
@@ -3067,6 +3076,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 ed8552ec1b5cc57cf740ef9c1bf90b24bfe97442..1664c213115e8f7454f2ab72819c26044bd5cc87 100644 (file)
@@ -823,3 +823,33 @@ 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;
+}
index 55298584b1d962cdb07af030b77c0a407fdd204f..ce73aa5af27f7b5f52b7b6d9a9517b51c94c66f9 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);
 
 static inline Eina_Bool
 e_pixmap_is_x(const E_Pixmap *cp)