ecore_evas_wl: do set_buffer_transform in gl side 43/139443/1
authorBoram Park <boram1288.park@samsung.com>
Thu, 15 Jun 2017 07:11:46 +0000 (16:11 +0900)
committerBoram Park <boram1288.park@samsung.com>
Wed, 19 Jul 2017 03:43:49 +0000 (12:43 +0900)
buffer-transform = window-rotation + output-transform

Change-Id: I276552bb1979a54f35398e24bddde4b0e049eac4

src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
src/modules/evas/engines/wayland_egl/Evas_Engine_Wayland_Egl.h
src/modules/evas/engines/wayland_egl/evas_wl_main.c

index 50e3cc4..1e661b1 100755 (executable)
@@ -104,7 +104,8 @@ _ecore_evas_wl_common_engine_info_rotation_set(Ecore_Evas *ee, Evas_Engine_Info
 #ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
         Evas_Engine_Info_Wayland_Egl *einfo = (Evas_Engine_Info_Wayland_Egl *)info;
         einfo->info.rotation = (ee->rotation + wdata->output_rotation) % 360;
-        ecore_wl_window_buffer_transform_set(wdata->win, wdata->output_rotation / 90);
+        /* the buffer transform information will be set in side of gl when rendering finish */
+        einfo->window_rotation = ee->rotation;
         WRN("evas engine rotate: %d", einfo->info.rotation);
 #endif
      }
index 588e636..6767e1c 100644 (file)
@@ -50,6 +50,8 @@ struct _Evas_Engine_Info_Wayland_Egl
    int           depth_bits;
    int           stencil_bits;
    int           msaa_bits;
+
+   int window_rotation;
 };
 
 #endif
index ec2c46a..e9a9687 100644 (file)
@@ -561,6 +561,15 @@ eng_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth EIN
                dy = ah - h;
           }
 
+        /* buffer_transform: screen rotation + window rotation
+         * window_transform: window rotation only
+         * We have to let the display server know the window rotation value
+         * because the display server needs to calcuate the screen rotation value
+         * from buffer_transform value.
+         */
+        wl_egl_window_set_buffer_transform(ob->win, ob->info->info.rotation / 90);
+        wl_egl_window_set_window_transform(ob->win, ob->info->window_rotation / 90);
+
         if ((ob->info->info.rotation == 90) || (ob->info->info.rotation == 270))
           wl_egl_window_resize(ob->win, h, w, dx, dy);
         else