From 20a140aba56fbfa671bfda824b6689bc5ddc9c62 Mon Sep 17 00:00:00 2001 From: Junkyeong Kim Date: Thu, 4 Apr 2019 17:21:48 +0900 Subject: [PATCH] e_output: do not use tdm capture if hwc window enable 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 --- src/bin/e_output.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/bin/e_output.c b/src/bin/e_output.c index e09cb6639f..d4386825fa 100644 --- a/src/bin/e_output.c +++ b/src/bin/e_output.c @@ -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; -- 2.34.1