mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 06:05:58 +01:00
output: replace wlr_render_timer arg with wlr_buffer_pass_options
This scales better when more render pass options are added.
This commit is contained in:
parent
5d639394f3
commit
a165261f7f
2 changed files with 5 additions and 6 deletions
|
@ -722,6 +722,7 @@ bool wlr_output_configure_primary_swapchain(struct wlr_output *output,
|
||||||
* frames or -1 if unknown. This is useful for damage tracking.
|
* frames or -1 if unknown. This is useful for damage tracking.
|
||||||
*/
|
*/
|
||||||
struct wlr_render_pass *wlr_output_begin_render_pass(struct wlr_output *output,
|
struct wlr_render_pass *wlr_output_begin_render_pass(struct wlr_output *output,
|
||||||
struct wlr_output_state *state, int *buffer_age, struct wlr_render_timer *timer);
|
struct wlr_output_state *state, int *buffer_age,
|
||||||
|
struct wlr_buffer_pass_options *render_options);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -229,7 +229,8 @@ uint32_t wlr_output_preferred_read_format(struct wlr_output *output) {
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlr_render_pass *wlr_output_begin_render_pass(struct wlr_output *output,
|
struct wlr_render_pass *wlr_output_begin_render_pass(struct wlr_output *output,
|
||||||
struct wlr_output_state *state, int *buffer_age, struct wlr_render_timer *timer) {
|
struct wlr_output_state *state, int *buffer_age,
|
||||||
|
struct wlr_buffer_pass_options *render_options) {
|
||||||
if (!wlr_output_configure_primary_swapchain(output, state, &output->swapchain)) {
|
if (!wlr_output_configure_primary_swapchain(output, state, &output->swapchain)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -241,10 +242,7 @@ struct wlr_render_pass *wlr_output_begin_render_pass(struct wlr_output *output,
|
||||||
|
|
||||||
struct wlr_renderer *renderer = output->renderer;
|
struct wlr_renderer *renderer = output->renderer;
|
||||||
assert(renderer != NULL);
|
assert(renderer != NULL);
|
||||||
struct wlr_render_pass *pass = wlr_renderer_begin_buffer_pass(renderer, buffer,
|
struct wlr_render_pass *pass = wlr_renderer_begin_buffer_pass(renderer, buffer, render_options);
|
||||||
&(struct wlr_buffer_pass_options){
|
|
||||||
.timer = timer,
|
|
||||||
});
|
|
||||||
if (pass == NULL) {
|
if (pass == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue