e_output: do not use tdm capture if hwc window enable 92/202792/3
authorJunkyeong Kim <jk0430.kim@samsung.com>
Thu, 4 Apr 2019 08:21:48 +0000 (17:21 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 10 Apr 2019 10:00:02 +0000 (10:00 +0000)
because tdm do not support capture when tdm hwc enable yet.
have to revert this code after tdm support hwc mode capture.

Change-Id: Ie9722088380cfe0e07b8208b120948338cf81c7d
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/bin/e_output.c

index e09cb66..d438682 100644 (file)
@@ -3482,22 +3482,34 @@ e_output_capture(E_Output *output, tbm_surface_h tsurface, Eina_Bool auto_rotate
        return EINA_TRUE;
      }
 
-   tcapture = _e_output_tdm_capture_create(output, TDM_CAPTURE_CAPABILITY_ONESHOT);
-   if (tcapture)
+   //TODO : temp code. if tdm support hwc mode tdm capture, have to change to use tdm capture.
+   if (e_hwc_policy_get(output->hwc) == E_HWC_POLICY_WINDOWS)
      {
-        ret = _e_output_tdm_capture_info_set(output, tcapture, tsurface, TDM_CAPTURE_TYPE_ONESHOT, auto_rotate);
+        ret = _e_output_capture(output, tsurface, auto_rotate);
         EINA_SAFETY_ON_FALSE_GOTO(ret == EINA_TRUE, fail);
 
-        ret = _e_output_tdm_capture(output, tcapture, tsurface, func, data);
-        EINA_SAFETY_ON_FALSE_GOTO(ret == EINA_TRUE, fail);
+        DBG("capture done(%p)", tsurface);
+        func(output, tsurface, data);
      }
    else
      {
-        ret = _e_output_capture(output, tsurface, auto_rotate);
-        EINA_SAFETY_ON_FALSE_GOTO(ret == EINA_TRUE, fail);
+        tcapture = _e_output_tdm_capture_create(output, TDM_CAPTURE_CAPABILITY_ONESHOT);
+        if (tcapture)
+          {
+             ret = _e_output_tdm_capture_info_set(output, tcapture, tsurface, TDM_CAPTURE_TYPE_ONESHOT, auto_rotate);
+             EINA_SAFETY_ON_FALSE_GOTO(ret == EINA_TRUE, fail);
 
-        DBG("capture done(%p)", tsurface);
-        func(output, tsurface, data);
+             ret = _e_output_tdm_capture(output, tcapture, tsurface, func, data);
+             EINA_SAFETY_ON_FALSE_GOTO(ret == EINA_TRUE, fail);
+          }
+        else
+          {
+             ret = _e_output_capture(output, tsurface, auto_rotate);
+             EINA_SAFETY_ON_FALSE_GOTO(ret == EINA_TRUE, fail);
+
+             DBG("capture done(%p)", tsurface);
+             func(output, tsurface, data);
+          }
      }
 
    return EINA_TRUE;