aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/wlr/render/interface.h2
-rw-r--r--include/wlr/render/wlr_texture.h2
-rw-r--r--render/gles2/texture.c4
-rw-r--r--render/vulkan/texture.c4
-rw-r--r--render/wlr_texture.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/include/wlr/render/interface.h b/include/wlr/render/interface.h
index e347f29b..ed7c4c8f 100644
--- a/include/wlr/render/interface.h
+++ b/include/wlr/render/interface.h
@@ -55,7 +55,7 @@ void wlr_renderer_init(struct wlr_renderer *renderer,
struct wlr_texture_impl {
bool (*update_from_buffer)(struct wlr_texture *texture,
- struct wlr_buffer *buffer, pixman_region32_t *damage);
+ struct wlr_buffer *buffer, const pixman_region32_t *damage);
void (*destroy)(struct wlr_texture *texture);
};
diff --git a/include/wlr/render/wlr_texture.h b/include/wlr/render/wlr_texture.h
index 5d4b0b61..8d401518 100644
--- a/include/wlr/render/wlr_texture.h
+++ b/include/wlr/render/wlr_texture.h
@@ -48,7 +48,7 @@ struct wlr_texture *wlr_texture_from_dmabuf(struct wlr_renderer *renderer,
* region needs to be updated.
*/
bool wlr_texture_update_from_buffer(struct wlr_texture *texture,
- struct wlr_buffer *buffer, pixman_region32_t *damage);
+ struct wlr_buffer *buffer, const pixman_region32_t *damage);
/**
* Destroys the texture.
diff --git a/render/gles2/texture.c b/render/gles2/texture.c
index 776baf40..f304df93 100644
--- a/render/gles2/texture.c
+++ b/render/gles2/texture.c
@@ -44,7 +44,7 @@ static bool check_stride(const struct wlr_pixel_format_info *fmt,
}
static bool gles2_texture_update_from_buffer(struct wlr_texture *wlr_texture,
- struct wlr_buffer *buffer, pixman_region32_t *damage) {
+ struct wlr_buffer *buffer, const pixman_region32_t *damage) {
struct wlr_gles2_texture *texture = gles2_get_texture(wlr_texture);
if (texture->target != GL_TEXTURE_2D || texture->image != EGL_NO_IMAGE_KHR) {
@@ -86,7 +86,7 @@ static bool gles2_texture_update_from_buffer(struct wlr_texture *wlr_texture,
glBindTexture(GL_TEXTURE_2D, texture->tex);
int rects_len = 0;
- pixman_box32_t *rects = pixman_region32_rectangles(damage, &rects_len);
+ const pixman_box32_t *rects = pixman_region32_rectangles(damage, &rects_len);
for (int i = 0; i < rects_len; i++) {
pixman_box32_t rect = rects[i];
diff --git a/render/vulkan/texture.c b/render/vulkan/texture.c
index c636f9f5..1f70bc44 100644
--- a/render/vulkan/texture.c
+++ b/render/vulkan/texture.c
@@ -137,7 +137,7 @@ static bool write_pixels(struct wlr_vk_texture *texture,
}
static bool vulkan_texture_update_from_buffer(struct wlr_texture *wlr_texture,
- struct wlr_buffer *buffer, pixman_region32_t *damage) {
+ struct wlr_buffer *buffer, const pixman_region32_t *damage) {
struct wlr_vk_texture *texture = vulkan_get_texture(wlr_texture);
void *data;
@@ -156,7 +156,7 @@ static bool vulkan_texture_update_from_buffer(struct wlr_texture *wlr_texture,
}
int rects_len = 0;
- pixman_box32_t *rects = pixman_region32_rectangles(damage, &rects_len);
+ const pixman_box32_t *rects = pixman_region32_rectangles(damage, &rects_len);
for (int i = 0; i < rects_len; i++) {
pixman_box32_t rect = rects[i];
diff --git a/render/wlr_texture.c b/render/wlr_texture.c
index 7a59af30..8be2e811 100644
--- a/render/wlr_texture.c
+++ b/render/wlr_texture.c
@@ -72,7 +72,7 @@ struct wlr_texture *wlr_texture_from_buffer(struct wlr_renderer *renderer,
}
bool wlr_texture_update_from_buffer(struct wlr_texture *texture,
- struct wlr_buffer *buffer, pixman_region32_t *damage) {
+ struct wlr_buffer *buffer, const pixman_region32_t *damage) {
if (!texture->impl->update_from_buffer) {
return false;
}