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
This commit is contained in:
Jonas Ådahl 2016-08-03 15:16:16 +08:00
parent 1f657d2c81
commit 9f6f778589

View File

@ -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))