From 508fc5c7050eaaa0b8a1c2c88808f63dabf35027 Mon Sep 17 00:00:00 2001 From: Seunghun Lee Date: Wed, 18 Nov 2020 15:28:05 +0900 Subject: [PATCH] e_comp_wl_capture: correct image size according to orientation of image. When try to capture the image of buffer to which the output transform has been applied, should consider to swapping size. Change-Id: Ib0d8946e5f66c65743facda60de73301ee78862b --- src/bin/e_comp_wl_capture.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/bin/e_comp_wl_capture.c b/src/bin/e_comp_wl_capture.c index 8ddfc5f134..2d5c67e063 100644 --- a/src/bin/e_comp_wl_capture.c +++ b/src/bin/e_comp_wl_capture.c @@ -521,8 +521,20 @@ _e_capture_client_capture_with_video(Thread_Data *td) Eina_Bool ret = EINA_TRUE; main_surface = td->tbm_surface; - w = tbm_surface_get_width(main_surface); - h = tbm_surface_get_height(main_surface); + if ((td->transform == WL_OUTPUT_TRANSFORM_90) || + (td->transform == WL_OUTPUT_TRANSFORM_270) || + (td->transform == WL_OUTPUT_TRANSFORM_FLIPPED_90) || + (td->transform == WL_OUTPUT_TRANSFORM_FLIPPED_270)) + { + w = tbm_surface_get_height(main_surface); + h = tbm_surface_get_width(main_surface); + } + else + { + w = tbm_surface_get_width(main_surface); + h = tbm_surface_get_height(main_surface); + } + if ((w <= 0) || (h <= 0)) { ERR("Abnormal buffer size of main surface %dx%d", w, h); -- 2.34.1