video: Fix transform translation 64/284964/1
authorSeunghun Lee <shiin.lee@samsung.com>
Thu, 1 Sep 2022 00:09:35 +0000 (09:09 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Fri, 2 Dec 2022 00:22:51 +0000 (09:22 +0900)
The function _e_video_hwc_coord_transform() did actually translate the
90 and 270 degree rotations into the inverse of what it's supposed to
do.

Since it's to get the points in buffer-local coordinates from physical
screen-local coordinates, it has to translate 90 and 270 degree
rotations into inverse of buffer_transform().

Change-Id: Ib48fe10dd6213888bf563e5645f8954d34cf36e2

src/bin/video/iface/e_video_hwc.c

index ced3c8139afdaba205f8eafffc57b03304b60cc6..a9746dfbbfb38bf6b8334abbb04abf2d8278368d 100644 (file)
@@ -816,25 +816,25 @@ _e_video_hwc_coord_transform(Eina_Rectangle *src_rect, Eina_Rectangle *dst_rect,
       default:
          *dx = sx, *dy = sy;
          break;
-      case WL_OUTPUT_TRANSFORM_270:
+      case WL_OUTPUT_TRANSFORM_90:
          *dx = sy, *dy = src_rect->w - sx;
          break;
       case WL_OUTPUT_TRANSFORM_180:
          *dx = src_rect->w - sx, *dy = src_rect->h - sy;
          break;
-      case WL_OUTPUT_TRANSFORM_90:
+      case WL_OUTPUT_TRANSFORM_270:
          *dx = src_rect->h - sy, *dy = sx;
          break;
       case WL_OUTPUT_TRANSFORM_FLIPPED:
          *dx = src_rect->w - sx, *dy = sy;
          break;
-      case WL_OUTPUT_TRANSFORM_FLIPPED_270:
+      case WL_OUTPUT_TRANSFORM_FLIPPED_90:
          *dx = sy, *dy = sx;
          break;
       case WL_OUTPUT_TRANSFORM_FLIPPED_180:
          *dx = sx, *dy = src_rect->h - sy;
          break;
-      case WL_OUTPUT_TRANSFORM_FLIPPED_90:
+      case WL_OUTPUT_TRANSFORM_FLIPPED_270:
          *dx = src_rect->h - sy, *dy = src_rect->w - sx;
          break;
      }