mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
wlr_scene: Skip direct scanout on color transform
If we need to apply a color transform to rendered content, we will not be able to use direct scanout. Explicitly skip it to not accidentally show frames lacking the color transform.
This commit is contained in:
parent
34201b0e7f
commit
13b9b54f3f
1 changed files with 6 additions and 2 deletions
|
|
@ -1830,8 +1830,12 @@ bool wlr_scene_output_build_state(struct wlr_scene_output *scene_output,
|
||||||
|
|
||||||
output_state_apply_damage(&render_data, state);
|
output_state_apply_damage(&render_data, state);
|
||||||
|
|
||||||
// don't enter direct scanout if we're using the highlight debug option
|
// We only want to try direct scanout if:
|
||||||
bool scanout = list_len == 1 && debug_damage != WLR_SCENE_DEBUG_DAMAGE_HIGHLIGHT &&
|
// - There is only one entry in the render list
|
||||||
|
// - There are no color transforms that need to be applied
|
||||||
|
// - Damage highlight debugging is not enabled
|
||||||
|
bool scanout = options->color_transform == NULL &&
|
||||||
|
list_len == 1 && debug_damage != WLR_SCENE_DEBUG_DAMAGE_HIGHLIGHT &&
|
||||||
scene_entry_try_direct_scanout(&list_data[0], state, &render_data);
|
scene_entry_try_direct_scanout(&list_data[0], state, &render_data);
|
||||||
|
|
||||||
if (scene_output->prev_scanout != scanout) {
|
if (scene_output->prev_scanout != scanout) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue