scene: Transform coordinates for direct scanout

We support direct scanout when there is an output and buffer
transform so long as the transforms are the same (so cancel out for the
buffer contents).  But we still need to apply the output transform to
the destination box location and size.
This commit is contained in:
David Turner 2024-10-24 18:32:44 +01:00
parent 7717c92ed0
commit cf43a447cb

View File

@ -1865,10 +1865,12 @@ static bool scene_entry_try_direct_scanout(struct render_list_entry *entry,
pending.buffer_src_box = buffer->src_box;
}
// Translate the location from scene coordinates to output coordinates
// Translate the position from scene coordinates to output coordinates
pending.buffer_dst_box.x = entry->x - scene_output->x;
pending.buffer_dst_box.y = entry->y - scene_output->y;
scene_node_get_size(node, &pending.buffer_dst_box.width, &pending.buffer_dst_box.height);
transform_output_box(&pending.buffer_dst_box, data);
wlr_output_state_set_buffer(&pending, buffer->buffer);
if (buffer->wait_timeline != NULL) {