e_plane: reset unset counter of planes when fb_target is set hwc 70/143970/7
authorChangyeon Lee <cyeon.lee@samsung.com>
Mon, 14 Aug 2017 06:12:51 +0000 (15:12 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Tue, 15 Aug 2017 09:08:38 +0000 (09:08 +0000)
Change-Id: I745824780850f6997da8a53fa0e5f99b15126bdc

src/bin/e_plane.c

index 8a802ea41e15f0d910bd7d222881c1cb2b68e5ce..30e5c242d1f121de288e44e0b0a8be5e2d47f587 100644 (file)
@@ -570,6 +570,29 @@ _e_plane_renderer_client_cb_del(void *data EINA_UNUSED, E_Client *ec)
    ec->renderer_client = NULL;
 }
 
+static void
+_e_plane_fb_target_all_unset_counter_reset(E_Plane *fb_target)
+{
+   E_Plane *plane = NULL;
+   E_Output *output = NULL;
+   Eina_List *l;
+
+   output = fb_target->output;
+   EINA_SAFETY_ON_NULL_RETURN(output);
+
+   EINA_LIST_FOREACH(output->planes, l, plane)
+     {
+        /* reset the unset_counter */
+        if (plane->unset_counter > 0)
+          {
+             plane->unset_counter = 0;
+
+             if (plane_trace_debug)
+               ELOGF("E_PLANE", " Plane(%p) Unset Counter Reset", NULL, NULL, plane);
+          }
+     }
+}
+
 static void
 _e_plane_unset_reset(E_Plane *plane)
 {
@@ -1894,7 +1917,10 @@ e_plane_ec_set(E_Plane *plane, E_Client *ec)
                _e_plane_surface_send_dequeuable_surfaces(plane);
           }
 
-        if (!plane->is_fb) _e_plane_unset_reset(plane);
+        if (plane->is_fb)
+          _e_plane_fb_target_all_unset_counter_reset(plane);
+        else
+          _e_plane_unset_reset(plane);
 
         e_comp_object_hwc_update_set(ec->frame, EINA_TRUE);