mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-21 22:52:20 +00:00
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:
parent
7717c92ed0
commit
cf43a447cb
@ -1865,10 +1865,12 @@ static bool scene_entry_try_direct_scanout(struct render_list_entry *entry,
|
|||||||
pending.buffer_src_box = buffer->src_box;
|
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.x = entry->x - scene_output->x;
|
||||||
pending.buffer_dst_box.y = entry->y - scene_output->y;
|
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);
|
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);
|
wlr_output_state_set_buffer(&pending, buffer->buffer);
|
||||||
if (buffer->wait_timeline != NULL) {
|
if (buffer->wait_timeline != NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user