mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-04 20:55:58 +01:00
render: constify struct wlr_buffer_pass_options
Let's not allow renderer implementations to mutate the passed in options.
This commit is contained in:
parent
fe06e5f49a
commit
b7dca21c2b
6 changed files with 6 additions and 6 deletions
|
@ -49,7 +49,7 @@ struct wlr_renderer_impl {
|
|||
struct wlr_texture *(*texture_from_buffer)(struct wlr_renderer *renderer,
|
||||
struct wlr_buffer *buffer);
|
||||
struct wlr_render_pass *(*begin_buffer_pass)(struct wlr_renderer *renderer,
|
||||
struct wlr_buffer *buffer, struct wlr_buffer_pass_options *options);
|
||||
struct wlr_buffer *buffer, const struct wlr_buffer_pass_options *options);
|
||||
struct wlr_render_timer *(*render_timer_create)(struct wlr_renderer *renderer);
|
||||
};
|
||||
|
||||
|
|
|
@ -177,7 +177,7 @@ struct wlr_buffer_pass_options {
|
|||
* render pass.
|
||||
*/
|
||||
struct wlr_render_pass *wlr_renderer_begin_buffer_pass(struct wlr_renderer *renderer,
|
||||
struct wlr_buffer *buffer, struct wlr_buffer_pass_options *options);
|
||||
struct wlr_buffer *buffer, const struct wlr_buffer_pass_options *options);
|
||||
|
||||
/**
|
||||
* Submit the render pass.
|
||||
|
|
|
@ -552,7 +552,7 @@ static void gles2_destroy(struct wlr_renderer *wlr_renderer) {
|
|||
}
|
||||
|
||||
static struct wlr_render_pass *gles2_begin_buffer_pass(struct wlr_renderer *wlr_renderer,
|
||||
struct wlr_buffer *wlr_buffer, struct wlr_buffer_pass_options *options) {
|
||||
struct wlr_buffer *wlr_buffer, const struct wlr_buffer_pass_options *options) {
|
||||
struct wlr_gles2_renderer *renderer = gles2_get_renderer(wlr_renderer);
|
||||
if (!wlr_egl_make_current(renderer->egl)) {
|
||||
return NULL;
|
||||
|
|
|
@ -493,7 +493,7 @@ static uint32_t pixman_get_render_buffer_caps(struct wlr_renderer *renderer) {
|
|||
}
|
||||
|
||||
static struct wlr_render_pass *pixman_begin_buffer_pass(struct wlr_renderer *wlr_renderer,
|
||||
struct wlr_buffer *wlr_buffer, struct wlr_buffer_pass_options *options) {
|
||||
struct wlr_buffer *wlr_buffer, const struct wlr_buffer_pass_options *options) {
|
||||
struct wlr_pixman_renderer *renderer = get_renderer(wlr_renderer);
|
||||
|
||||
struct wlr_pixman_buffer *buffer = get_buffer(renderer, wlr_buffer);
|
||||
|
|
|
@ -1922,7 +1922,7 @@ static uint32_t vulkan_get_render_buffer_caps(struct wlr_renderer *wlr_renderer)
|
|||
}
|
||||
|
||||
static struct wlr_render_pass *vulkan_begin_buffer_pass(struct wlr_renderer *wlr_renderer,
|
||||
struct wlr_buffer *buffer, struct wlr_buffer_pass_options *options) {
|
||||
struct wlr_buffer *buffer, const struct wlr_buffer_pass_options *options) {
|
||||
struct wlr_vk_renderer *renderer = vulkan_get_renderer(wlr_renderer);
|
||||
|
||||
struct wlr_vk_render_buffer *render_buffer = get_render_buffer(renderer, buffer);
|
||||
|
|
|
@ -415,7 +415,7 @@ int wlr_renderer_get_drm_fd(struct wlr_renderer *r) {
|
|||
}
|
||||
|
||||
struct wlr_render_pass *wlr_renderer_begin_buffer_pass(struct wlr_renderer *renderer,
|
||||
struct wlr_buffer *buffer, struct wlr_buffer_pass_options *options) {
|
||||
struct wlr_buffer *buffer, const struct wlr_buffer_pass_options *options) {
|
||||
if (!renderer->impl->begin_buffer_pass) {
|
||||
return begin_legacy_buffer_render_pass(renderer, buffer);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue