aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
authorManuel Stoeckl <code@mstoeckl.com>2021-09-02 21:45:23 -0400
committerSimon Ser <contact@emersion.fr>2021-11-23 15:51:54 +0100
commita23cdbbea145e0890627743d316c0ab6fe6c9c1f (patch)
tree586a3c020872b9caa131ebc0ec1896043603f9c9 /include/sway
parent5865af75cf8029cc703cda36b68daafcb658c97b (diff)
Add 'output render_bit_depth [8|10]' command
This makes it possible to hint to the renderer and backends how many bits per channel the buffers that the compositor draws windows onto should have. Renderers and backends may deviate from this if they do not support the formats with higher bit depth.
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/commands.h1
-rw-r--r--include/sway/config.h7
2 files changed, 8 insertions, 0 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h
index 4be40870..c6f5c2e0 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -284,6 +284,7 @@ sway_cmd output_cmd_max_render_time;
sway_cmd output_cmd_mode;
sway_cmd output_cmd_modeline;
sway_cmd output_cmd_position;
+sway_cmd output_cmd_render_bit_depth;
sway_cmd output_cmd_scale;
sway_cmd output_cmd_scale_filter;
sway_cmd output_cmd_subpixel;
diff --git a/include/sway/config.h b/include/sway/config.h
index 660245c1..aa71209d 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -247,6 +247,12 @@ enum scale_filter_mode {
SCALE_FILTER_SMART,
};
+enum render_bit_depth {
+ RENDER_BIT_DEPTH_DEFAULT, // the default is currently 8
+ RENDER_BIT_DEPTH_8,
+ RENDER_BIT_DEPTH_10,
+};
+
/**
* Size and position configuration for a particular output.
*
@@ -266,6 +272,7 @@ struct output_config {
enum wl_output_subpixel subpixel;
int max_render_time; // In milliseconds
int adaptive_sync;
+ enum render_bit_depth render_bit_depth;
char *background;
char *background_option;