mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
wlr_scene: fix tf/prim comparison for scanout attempt
We were incorrectly doing comparison with `!= 0` to detect non-sRGB
tf/primaries. Since these enums are bit flags, the default sRGB values
are 1, not 0, so sRGB buffers were incorrectly rejected.
Fixes: bf40f396bf ("scene: grab image description from output state")
This commit is contained in:
parent
406aa5f7f5
commit
dde07b6840
1 changed files with 2 additions and 1 deletions
|
|
@ -1982,7 +1982,8 @@ static enum scene_direct_scanout_result scene_entry_try_direct_scanout(
|
|||
}
|
||||
|
||||
const struct wlr_output_image_description *img_desc = output_pending_image_description(scene_output->output, state);
|
||||
if (buffer->transfer_function != 0 || buffer->primaries != 0) {
|
||||
if (buffer->transfer_function != WLR_COLOR_TRANSFER_FUNCTION_SRGB ||
|
||||
buffer->primaries != WLR_COLOR_NAMED_PRIMARIES_SRGB) {
|
||||
if (img_desc == NULL || img_desc->transfer_function != buffer->transfer_function ||
|
||||
img_desc->primaries != buffer->primaries) {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue