e_plane: pend unset ec if plane has set_counter 31/164131/3
authorChangyeon Lee <cyeon.lee@samsung.com>
Thu, 14 Dec 2017 04:30:49 +0000 (13:30 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Sat, 16 Dec 2017 00:22:12 +0000 (00:22 +0000)
if ec of plane is visible and plane has set_counter,
pend unset ec untill set_coutner is zero for preventing flickering

Change-Id: I694a4f40a7b36a67a1dc9a2ed0e58ce3988ff985

src/bin/e_plane.c
src/bin/e_plane.h

index 452f1f5..2293889 100644 (file)
@@ -2091,6 +2091,13 @@ e_plane_offscreen_commit(E_Plane *plane)
    if (plane->ec)
      e_pixmap_image_clear(plane->ec->pixmap, 1);
 
+   if (!plane->is_fb && plane->unset_ec_pending)
+     {
+        plane->unset_ec_pending = EINA_FALSE;
+        e_plane_ec_set(plane, NULL);
+        INF("Plane:%p zpos:%d Done unset_ec_pending", plane, plane->zpos);
+     }
+
    return EINA_TRUE;
 }
 
@@ -2141,6 +2148,13 @@ e_plane_commit(E_Plane *plane)
 
    _e_plane_update_fps(plane);
 
+   if (!plane->is_fb && plane->unset_ec_pending)
+     {
+        plane->unset_ec_pending = EINA_FALSE;
+        e_plane_ec_set(plane, NULL);
+        INF("Plane:%p zpos:%d Done unset_ec_pending", plane, plane->zpos);
+     }
+
    return EINA_TRUE;
 }
 
@@ -2350,8 +2364,11 @@ e_plane_reserved_set(E_Plane *plane, Eina_Bool set)
                }
              else
                {
-                  _e_plane_renderer_unset(plane);
-                  e_plane_role_set(plane, E_PLANE_ROLE_NONE);
+                  if (!plane->ec)
+                    {
+                       _e_plane_renderer_unset(plane);
+                       e_plane_role_set(plane, E_PLANE_ROLE_NONE);
+                    }
                }
           }
      }
@@ -2657,6 +2674,26 @@ e_plane_ec_set(E_Plane *plane, E_Client *ec)
          *    we set the unset_candidate flags to the plane and measure to unset
          *    the plane at the e_output_commit.
          */
+        if (!plane->is_fb && plane->ec && plane->set_counter &&
+            evas_object_visible_get(plane->ec->frame))
+          {
+             if (!plane->unset_ec_pending)
+               {
+                  INF("Plane:%p zpos:%d Set unset_ec_pending ", plane, plane->zpos);
+                  plane->unset_ec_pending = EINA_TRUE;
+               }
+
+             if (ec)
+               return EINA_FALSE;
+             else
+               return EINA_TRUE;
+          }
+
+        if (plane->unset_ec_pending)
+          {
+             INF("Plane:%p zpos:%d Reset unset_ec_pending", plane, plane->zpos);
+             plane->unset_ec_pending = EINA_FALSE;
+          }
 
         if (plane->ec_redirected && plane->ec) e_client_redirected_set(plane->ec, EINA_TRUE);
 
index e2414e2..42dc7d7 100644 (file)
@@ -130,6 +130,8 @@ struct _E_Plane
    int                  set_counter;
    Eina_Bool            fb_sync_wait;
    Eina_Bool            fb_sync_done;
+
+   Eina_Bool            unset_ec_pending;
 };
 
 struct _E_Plane_Commit_Data {