mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 03:20:46 -05:00
monitor: Fix tile coordinate calculation
Previously the tile coordinate was used to offset a CRTC scanout coordinate within a larger framebuffer. Since 3.36 we're always scanning out from (0, 0) as we always have one framebuffer per CRTC; we instead use the tile coordinate to calculate the coordinate the tile has in the stage view. Adapt calculation to fulfil this promise instead of the old one. This also corrects the tiled custom monitor test case. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1199
This commit is contained in:
parent
425a10de11
commit
21b8ae10b8
@ -817,19 +817,19 @@ calculate_tile_coordinate (MetaMonitor *monitor,
|
||||
case META_MONITOR_TRANSFORM_270:
|
||||
case META_MONITOR_TRANSFORM_FLIPPED_270:
|
||||
if (other_output->tile_info.loc_v_tile == output->tile_info.loc_v_tile &&
|
||||
other_output->tile_info.loc_h_tile < output->tile_info.loc_h_tile)
|
||||
other_output->tile_info.loc_h_tile > output->tile_info.loc_h_tile)
|
||||
y += other_output->tile_info.tile_w;
|
||||
if (other_output->tile_info.loc_h_tile == output->tile_info.loc_h_tile &&
|
||||
other_output->tile_info.loc_v_tile < output->tile_info.loc_v_tile)
|
||||
other_output->tile_info.loc_v_tile > output->tile_info.loc_v_tile)
|
||||
x += other_output->tile_info.tile_h;
|
||||
break;
|
||||
case META_MONITOR_TRANSFORM_90:
|
||||
case META_MONITOR_TRANSFORM_FLIPPED_90:
|
||||
if (other_output->tile_info.loc_v_tile == output->tile_info.loc_v_tile &&
|
||||
other_output->tile_info.loc_h_tile > output->tile_info.loc_h_tile)
|
||||
other_output->tile_info.loc_h_tile < output->tile_info.loc_h_tile)
|
||||
y += other_output->tile_info.tile_w;
|
||||
if (other_output->tile_info.loc_h_tile == output->tile_info.loc_h_tile &&
|
||||
other_output->tile_info.loc_v_tile > output->tile_info.loc_v_tile)
|
||||
other_output->tile_info.loc_v_tile < output->tile_info.loc_v_tile)
|
||||
x += other_output->tile_info.tile_h;
|
||||
break;
|
||||
}
|
||||
|
@ -4828,12 +4828,13 @@ meta_test_monitor_custom_second_rotated_tiled_config (void)
|
||||
.current_mode = 1,
|
||||
.transform = META_MONITOR_TRANSFORM_90,
|
||||
.x = 1024,
|
||||
.y = 400,
|
||||
.y = 0,
|
||||
},
|
||||
{
|
||||
.current_mode = 1,
|
||||
.transform = META_MONITOR_TRANSFORM_90,
|
||||
.x = 1024,
|
||||
.y = 400,
|
||||
}
|
||||
},
|
||||
.n_crtcs = 3,
|
||||
|
Loading…
Reference in New Issue
Block a user