Debian Codegraph @

src/renderer/command_builder.h

raw symbols SCIP
1 // SPDX-License-Identifier: MPL-2.0
2 // Copyright (c) Yuxuan Shui <[email protected]>
3
4 #pragma once
5
6 #include <stdbool.h>
7
8 struct command_builder;
9 struct backend_command;
10 struct layout;
11 struct x_monitors;
12 struct win_option;
13 struct shader_info;
14 typedef struct image_handle *image_handle;
15 typedef struct pixman_box32 rect_t;
16
17 struct command_builder *command_builder_new(void);
18 void command_builder_free(struct command_builder *);
19
20 void command_builder_command_list_free(struct backend_command *cmds);
21
22 /// Generate render commands that need to be executed to render the current layout.
23 /// This function updates `layout->commands` with the list of generated commands, and also
24 /// the `number_of_commands` field of each of the layers in `layout`. The list of
25 /// commands must later be freed with `command_builder_command_list_free`
26 /// It is guaranteed that each of the command's region of operation (e.g. the mask.region
27 /// argument of blit), will be store in `struct backend_command::mask`. This might not
28 /// stay true after further passes.
29 void command_builder_build(struct command_builder *cb, struct layout *layout,
30 bool force_blend, bool blur_frame, bool inactive_dim_fixed,
31 double max_brightness, const struct x_monitors *monitors,
32 image_handle root_image, const rect_t *root_image_extent,
33 const struct shader_info *root_pixmap_shader,
34 const struct shader_info *shaders);