devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=8f5299be088acbc2baf823ba01defc96f8743b13

commit 8f5299be088acbc2baf823ba01defc96f8743b13
Author: Chris Michael <[email protected]>
Date:   Tue Sep 19 13:08:36 2017 -0400

    wl-drm: Enable all degrees of screen rotation
    
    This patch enables all degrees of rotation to be selectable in the
    Screen Setup dialog. It then applies the rotation based on hardware or
    software ... that is, if the hardware can do the selected rotation,
    then we use hardware otherwise we will use ecore_evas_rotation
    functions (software).
    
    ref T5999
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/modules/wl_drm/e_mod_main.c | 47 ++++++++++++-----------------------------
 1 file changed, 14 insertions(+), 33 deletions(-)

diff --git a/src/modules/wl_drm/e_mod_main.c b/src/modules/wl_drm/e_mod_main.c
index e4355268e..997cb4fa2 100644
--- a/src/modules/wl_drm/e_mod_main.c
+++ b/src/modules/wl_drm/e_mod_main.c
@@ -410,24 +410,10 @@ _drm2_randr_create(void)
                          s->config.geom.w, s->config.geom.h);
                }
 
-             s->info.can_rot_0 = EINA_FALSE;
-             s->info.can_rot_90 = EINA_FALSE;
-             s->info.can_rot_180 = EINA_FALSE;
-             s->info.can_rot_270 = EINA_FALSE;
-
-             int rotations;
-
-             rotations =
-               ecore_drm2_output_supported_rotations_get(output);
-
-             if (rotations & ECORE_DRM2_ROTATION_NORMAL)
-               s->info.can_rot_0 = EINA_TRUE;
-             if (rotations & ECORE_DRM2_ROTATION_90)
-               s->info.can_rot_90 = EINA_TRUE;
-             if (rotations & ECORE_DRM2_ROTATION_180)
-               s->info.can_rot_180 = EINA_TRUE;
-             if (rotations & ECORE_DRM2_ROTATION_270)
-               s->info.can_rot_270 = EINA_TRUE;
+             s->info.can_rot_0 = EINA_TRUE;
+             s->info.can_rot_90 = EINA_TRUE;
+             s->info.can_rot_180 = EINA_TRUE;
+             s->info.can_rot_270 = EINA_TRUE;
 
              if (cs)
                {
@@ -583,25 +569,12 @@ _drm2_randr_apply(void)
         ecore_drm2_output_mode_set(output, mode, s->config.geom.x,
                                    s->config.geom.y);
 
-        /* TODO: cannot support rotations until we support planes
-         * and we cannot support planes until Atomic support is in */
-        int orient = 0;
-
-        if (s->config.rotation == 0)
-          orient = ECORE_DRM2_ROTATION_NORMAL;
-        else if (s->config.rotation == 90)
-          orient = ECORE_DRM2_ROTATION_90;
-        else if (s->config.rotation == 180)
-          orient = ECORE_DRM2_ROTATION_180;
-        else if (s->config.rotation == 270)
-          orient = ECORE_DRM2_ROTATION_270;
-
-        ecore_drm2_output_rotation_set(output, orient);
+        ecore_drm2_output_enabled_set(output, s->config.enabled);
 
         if (s->config.priority == top_priority)
           _drm2_output_primary_set(outputs, output);
 
-        ecore_drm2_output_enabled_set(output, s->config.enabled);
+        if (!s->config.enabled) continue;
 
         printf("\tDRM2 RRR: Mode\n");
         printf("\t\tDRM2 RRR: Geom: %d %d %dx%d\n",
@@ -613,7 +586,15 @@ _drm2_randr_apply(void)
         printf("\tDRM2 RRR: Relative Mode: %d\n", s->config.relative.mode);
         printf("\tDRM2 RRR: Relative To: %s\n", s->config.relative.to);
         printf("\tDRM2 RRR: Align: %f\n", s->config.relative.align);
+
+        ecore_evas_rotation_with_resize_set(e_comp->ee, s->config.rotation);
+
+        /* TODO: rotate e_comp pointer to match screen ?? */
+        /* ecore_drm2_device_pointer_rotation_set(dev, s->config.rotation); */
      }
+
+   ecore_drm2_device_calibrate(dev, vw, vh);
+   ecore_drm2_device_pointer_max_set(dev, vw, vh);
 }
 
 static void

-- 


Reply via email to