e_plane: set unset_counter to 1 when fb_target is unset to hwc 59/183959/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Thu, 12 Jul 2018 09:46:15 +0000 (18:46 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 18 Jul 2018 00:23:41 +0000 (00:23 +0000)
unset_counter is set to 0 when fb_target used by hwc because
compositor is disabled and then plane doesn't need to sync with fb_target.
but unset_candidate plane should sync with fb_target when fb_target is unset to hwc.
so if plane is unset_candidate and unset_counter is 0, set unset_counter to 1
for sync with compositor

Change-Id: I62bae00c12fd3d0e68c9986b2a8b0d8f3ebec952

src/bin/e_plane.c

index 2d19028..d25d641 100644 (file)
@@ -749,6 +749,30 @@ _e_plane_fb_target_all_set_unset_counter_reset(E_Plane *fb_target)
 }
 
 static void
+_e_plane_fb_target_all_unset_candidate_sync_fb(E_Plane *fb_target)
+{
+   E_Plane *plane = NULL;
+   E_Output *output = NULL;
+   Eina_Bool set_sync_count = EINA_FALSE;
+   Eina_List *l;
+
+   output = fb_target->output;
+   EINA_SAFETY_ON_NULL_RETURN(output);
+
+   EINA_LIST_FOREACH(output->planes, l, plane)
+     {
+        if ((plane->unset_candidate) && (plane->unset_counter == 0))
+          {
+             plane->unset_counter = 1;
+             set_sync_count = EINA_TRUE;
+          }
+     }
+
+   if (set_sync_count)
+     e_plane_renderer_surface_queue_sync_count_set(fb_target->renderer, 1);
+}
+
+static void
 _e_plane_unset_reset(E_Plane *plane)
 {
    Eina_Bool print_log = EINA_FALSE;
@@ -2737,6 +2761,9 @@ e_plane_ec_set(E_Plane *plane, E_Client *ec)
                   ERR("failed to use ecore_evas plane:%p", plane);
                   return EINA_FALSE;
                }
+
+             if (plane->ec)
+               _e_plane_fb_target_all_unset_candidate_sync_fb(plane);
           }
         else
           {