e_output: do offscreen commit when dpms of output is off 70/141770/1 accepted/tizen/3.0/common/20170803.140411 accepted/tizen/3.0/ivi/20170803.011000 accepted/tizen/3.0/mobile/20170803.010936 accepted/tizen/3.0/wearable/20170803.010951 submit/tizen_3.0/20170801.084522
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 1 Aug 2017 07:57:05 +0000 (16:57 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Tue, 1 Aug 2017 10:20:57 +0000 (19:20 +0900)
Change-Id: Ife5a3216e19fea612af8b9fe851d68e941d8c5fc

src/bin/e_output.c

index 6734ebb4bd69aaeff9c9ba431958fbbdf615502b..b112cacd1e3035c74478304f943d97409e9b1237 100644 (file)
@@ -1040,12 +1040,8 @@ e_output_commit(E_Output *output)
 
    /* fetch the fb_target at first */
    fb_commit = e_plane_fetch(fb_target);
-   if (fb_commit)
-     {
-        // TODO: to be fixed. check fps of fb_target currently.
-        _e_output_update_fps();
-        if (output->dpms == E_OUTPUT_DPMS_OFF) e_plane_unfetch(fb_target);
-     }
+   // TODO: to be fixed. check fps of fb_target currently.
+   if (fb_commit) _e_output_update_fps();
 
    if (output->zoom_set)
      {
@@ -1076,8 +1072,16 @@ e_output_commit(E_Output *output)
              if (e_plane_is_unset_try(plane))
                e_plane_unset_try_set(plane, EINA_FALSE);
 
-             if (!e_plane_commit(plane))
-               ERR("fail to e_plane_commit");
+             if (output->dpms == E_OUTPUT_DPMS_OFF)
+               {
+                  if (!e_plane_offscreen_commit(plane))
+                    ERR("fail to e_plane_offscreen_commit");
+               }
+             else
+               {
+                  if (!e_plane_commit(plane))
+                    ERR("fail to e_plane_commit");
+               }
           }
 
         /* zoom commit only primary */
@@ -1086,8 +1090,16 @@ e_output_commit(E_Output *output)
         _e_output_zoom_rotating_check(output);
 
         /* zoom commit */
-        if (!e_plane_pp_commit(fb_target))
-          ERR("fail to e_plane_pp_commit");
+        if (output->dpms == E_OUTPUT_DPMS_OFF)
+          {
+             if (!e_plane_offscreen_commit(fb_target))
+               ERR("fail to e_plane_offscreen_commit");
+          }
+        else
+          {
+             if (!e_plane_pp_commit(fb_target))
+               ERR("fail to e_plane_pp_commit");
+          }
      }
    else
      {
@@ -1114,21 +1126,24 @@ e_output_commit(E_Output *output)
              /* fetch the surface to the plane */
              if (!e_plane_fetch(plane)) continue;
 
-             if (output->dpms == E_OUTPUT_DPMS_OFF)
-               e_plane_unfetch(plane);
-
              if (e_plane_is_unset_try(plane))
                e_plane_unset_try_set(plane, EINA_FALSE);
           }
 
-        if (output->dpms == E_OUTPUT_DPMS_OFF) return EINA_TRUE;
-
         EINA_LIST_FOREACH(output->planes, l, plane)
           {
              if (e_plane_is_unset_try(plane)) continue;
 
-             if (!e_plane_commit(plane))
-               ERR("fail to e_plane_commit");
+             if (output->dpms == E_OUTPUT_DPMS_OFF)
+               {
+                  if (!e_plane_offscreen_commit(plane))
+                    ERR("fail to e_plane_offscreen_commit");
+               }
+             else
+               {
+                  if (!e_plane_commit(plane))
+                    ERR("fail to e_plane_commit");
+               }
           }
      }