e_plane: consider the output transform when showing a buffer to HW layer accepted/tizen/3.0/common/20170519.190100 accepted/tizen/3.0/ivi/20170519.070033 accepted/tizen/3.0/mobile/20170519.070024 accepted/tizen/3.0/tv/20170519.070027 accepted/tizen/3.0/wearable/20170519.070030 submit/tizen_3.0/20170518.082921 submit/tizen_3.0/20170519.010441 submit/tizen_3.0/20170519.050229
authorBoram Park <boram1288.park@samsung.com>
Thu, 18 May 2017 07:58:08 +0000 (16:58 +0900)
committerBoram Park <boram1288.park@samsung.com>
Thu, 18 May 2017 08:12:48 +0000 (17:12 +0900)
if output is transformed, the position of a buffer on screen should be also
transformed.

Change-Id: I34be071ca58d8afb979db1f60454bcea822fe9a1

src/bin/e_plane.c

index 993a7ad4e3c7447e503c6272e13eface64567ae5..5e2df15b172c6c83b51ff345a8e5b829bba1104f 100644 (file)
@@ -190,6 +190,18 @@ _e_plane_surface_set(E_Plane *plane, tbm_surface_h tsurface)
              dst_pos_y = ec->y;
           }
 
+        /* if output is transformed, the position of a buffer on screen should be also
+         * transformed.
+         */
+        if (output->config.rotation > 0)
+          {
+             int bw, bh;
+             e_pixmap_size_get(ec->pixmap, &bw, &bh);
+             e_comp_wl_rect_convert(ec->zone->w, ec->zone->h,
+                                    output->config.rotation / 90, 1,
+                                    dst_pos_x, dst_pos_y, bw, bh,
+                                    &dst_pos_x, &dst_pos_y, NULL, NULL);
+          }
 
         if (plane->info.src_config.size.h != aligned_width ||
             plane->info.src_config.size.v != surf_info.height ||