From fbd4e85c51d8566b9429724ce1af7b27681fd7ff Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Sat, 7 Mar 2026 14:13:59 +0100 Subject: [PATCH] output: implement Default for requirements --- src/tree/output.rs | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/src/tree/output.rs b/src/tree/output.rs index 1fdd8659..bf047663 100644 --- a/src/tree/output.rs +++ b/src/tree/output.rs @@ -1920,14 +1920,24 @@ pub enum VrrMode { #[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] pub struct VrrSurfaceRequirements { - content_type: Option, + pub content_type: Option, } -#[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct VrrContentTypeRequirements { - photo: bool, - video: bool, - game: bool, + pub photo: bool, + pub video: bool, + pub game: bool, +} + +impl Default for VrrContentTypeRequirements { + fn default() -> Self { + Self { + photo: true, + video: true, + game: true, + } + } } impl VrrMode { @@ -1986,7 +1996,15 @@ pub enum TearingMode { #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct TearingSurfaceRequirements { - tearing_requested: bool, + pub tearing_requested: bool, +} + +impl Default for TearingSurfaceRequirements { + fn default() -> Self { + Self { + tearing_requested: true, + } + } } impl TearingMode {