video: Fix errors in calculation of transform 68/248968/2
authorSeunghun Lee <shiin.lee@samsung.com>
Thu, 3 Dec 2020 22:59:24 +0000 (07:59 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Mon, 7 Dec 2020 05:12:03 +0000 (05:12 +0000)
It was discovered that change of video wasn't able to be applied with
the state, which was destination area out bound of screen with
WL_OUTPUT_TRANSFORM_90.

It turned out because of errors in calculation of transform. That error
made source(input) area empty and empty area cannot be applied.

The transform value which caused this issue was as follow:

wl_subsurface_set_position(840, 0)
wl_viewport_set_destination(1080, 1920)
wl_viewport_set_source(0, 1936, 1080, 2160)
wl_surface_set_buffer_transform(WL_OUTPUT_TRANSFORM_90)

* The state of output: size (1920x1080) transform (0)

Change-Id: I3134980d46305a03965076c843a568fd84f226d0

src/bin/video/iface/e_video_hwc.c

index 8c5c674c12bd681a0abba3ee1af71b954fdab6b2..2f48bbe72c9f954129a1e84f49dd590d62193381 100644 (file)
@@ -814,13 +814,13 @@ _e_video_hwc_coord_transform(Eina_Rectangle *src_rect, Eina_Rectangle *dst_rect,
          *dx = sx, *dy = sy;
          break;
       case WL_OUTPUT_TRANSFORM_270:
-         *dx = sx, *dy = src_rect->w - sx;
+         *dx = sy, *dy = src_rect->w - sx;
          break;
       case WL_OUTPUT_TRANSFORM_180:
-         *dx = src_rect->w - sx, *dy = dst_rect->h - sy;
+         *dx = src_rect->w - sx, *dy = src_rect->h - sy;
          break;
       case WL_OUTPUT_TRANSFORM_90:
-         *dx = src_rect->y - sy, *dy = sx;
+         *dx = src_rect->h - sy, *dy = sx;
          break;
       case WL_OUTPUT_TRANSFORM_FLIPPED:
          *dx = src_rect->w - sx, *dy = sy;