zoom: change tpp destroy position 46/137046/1
authorJunkyeong Kim <jk0430.kim@samsung.com>
Tue, 4 Jul 2017 08:11:59 +0000 (17:11 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Tue, 4 Jul 2017 08:12:03 +0000 (17:12 +0900)
Change-Id: I433777813c4f71253acdcba4ec2232133df05a6a
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/bin/e_plane.c

index 8f7ee65e21cbd44198981a369ee9eb17286edac9..a6b16905a12470ec145c44eef0bdba934cde7835 100644 (file)
@@ -792,7 +792,7 @@ e_plane_fetch(E_Plane *plane)
    if (plane->wait_commit)
       return EINA_FALSE;
 
-   if (plane->pp_layer_commit && !plane->pp_set && plane->is_fb)
+   if (plane->pp_layer_commit && !plane->pp_set)
      return EINA_FALSE;
 
    if (plane->is_fb && !plane->ec)
@@ -968,15 +968,6 @@ e_plane_commit(E_Plane *plane)
 
    plane->wait_commit = EINA_TRUE;
 
-   if (plane->tpp)
-     {
-        if (!plane->pp_set && !plane->pp_commit && plane->is_fb)
-          {
-             tdm_pp_destroy(plane->tpp);
-             plane->tpp = NULL;
-          }
-     }
-
    return EINA_TRUE;
 }
 
@@ -1757,7 +1748,15 @@ _e_plane_pp_commit_handler(tdm_pp *pp, tbm_surface_h tsurface_src, tbm_surface_h
      ELOGF("E_PLANE", "PP Commit Handler Plane(%p)", NULL, NULL, plane);
 
    /* if pp_set is false, skip the commit */
-   if (!plane->pp_set) goto done;
+   if (!plane->pp_set)
+     {
+        if (plane->tpp)
+          {
+             tdm_pp_destroy(plane->tpp);
+             plane->tpp = NULL;
+          }
+        goto done;
+     }
 
    if (!_e_plane_pp_layer_commit(plane, tsurface_dst))
      ERR("fail to _e_plane_pp_layer_commit");