[mutter] MetaMonitorManagerKms: Set output scale when assigning crtc



commit 9f6f778589ffcfd6322d07c37775b64794909b06
Author: Jonas Ådahl <jadahl gmail com>
Date:   Wed Aug 3 15:16:16 2016 +0800

    MetaMonitorManagerKms: Set output scale when assigning crtc
    
    The scale will have been set to 1 no matter what when initializing the
    MetaOutput since it at the time didn't have an CRTC assigned to it.
    Now, when we assign the CRTC to the output, we need to update the scale.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769505

 src/backends/native/meta-monitor-manager-kms.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/src/backends/native/meta-monitor-manager-kms.c b/src/backends/native/meta-monitor-manager-kms.c
index 0cf6eec..1de6484 100644
--- a/src/backends/native/meta-monitor-manager-kms.c
+++ b/src/backends/native/meta-monitor-manager-kms.c
@@ -1203,14 +1203,6 @@ meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
 
           mode = crtc_info->mode;
 
-          for (j = 0; j < crtc_info->outputs->len; j++)
-            {
-              MetaOutput *output = g_ptr_array_index (crtc_info->outputs, j);
-
-              output->is_dirty = TRUE;
-              output->crtc = crtc;
-            }
-
           if (meta_monitor_transform_is_rotated (crtc_info->transform))
             {
               width = mode->height;
@@ -1231,6 +1223,15 @@ meta_monitor_manager_kms_apply_configuration (MetaMonitorManager *manager,
           crtc->rect.height = height;
           crtc->current_mode = mode;
           crtc->transform = crtc_info->transform;
+
+          for (j = 0; j < crtc_info->outputs->len; j++)
+            {
+              MetaOutput *output = g_ptr_array_index (crtc_info->outputs, j);
+
+              output->is_dirty = TRUE;
+              output->crtc = crtc;
+              output->scale = get_output_scale (manager, output);
+            }
         }
 
       if (crtc->all_transforms & (1 << crtc->transform))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]