aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Manuel Stoeckl <code@mstoeckl.com>2021-09-02 21:45:23 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2021-11-23 15:51:54 +0100
commita23cdbbea145e0890627743d316c0ab6fe6c9c1f (patch)
tree586a3c020872b9caa131ebc0ec1896043603f9c9 /include
parentsway: create wlr_renderer and wlr_allocator (diff)
downloadsway-a23cdbbea145e0890627743d316c0ab6fe6c9c1f.tar.gz
sway-a23cdbbea145e0890627743d316c0ab6fe6c9c1f.tar.zst
sway-a23cdbbea145e0890627743d316c0ab6fe6c9c1f.zip
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')
-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;
284sway_cmd output_cmd_mode; 284sway_cmd output_cmd_mode;
285sway_cmd output_cmd_modeline; 285sway_cmd output_cmd_modeline;
286sway_cmd output_cmd_position; 286sway_cmd output_cmd_position;
287sway_cmd output_cmd_render_bit_depth;
287sway_cmd output_cmd_scale; 288sway_cmd output_cmd_scale;
288sway_cmd output_cmd_scale_filter; 289sway_cmd output_cmd_scale_filter;
289sway_cmd output_cmd_subpixel; 290sway_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 {
247 SCALE_FILTER_SMART, 247 SCALE_FILTER_SMART,
248}; 248};
249 249
250enum render_bit_depth {
251 RENDER_BIT_DEPTH_DEFAULT, // the default is currently 8
252 RENDER_BIT_DEPTH_8,
253 RENDER_BIT_DEPTH_10,
254};
255
250/** 256/**
251 * Size and position configuration for a particular output. 257 * Size and position configuration for a particular output.
252 * 258 *
@@ -266,6 +272,7 @@ struct output_config {
266 enum wl_output_subpixel subpixel; 272 enum wl_output_subpixel subpixel;
267 int max_render_time; // In milliseconds 273 int max_render_time; // In milliseconds
268 int adaptive_sync; 274 int adaptive_sync;
275 enum render_bit_depth render_bit_depth;
269 276
270 char *background; 277 char *background;
271 char *background_option; 278 char *background_option;