aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/render
diff options
context:
space:
mode:
Diffstat (limited to 'include/wlr/render')
-rw-r--r--include/wlr/render/interface.h13
-rw-r--r--include/wlr/render/wlr_renderer.h2
-rw-r--r--include/wlr/render/wlr_texture.h2
3 files changed, 8 insertions, 9 deletions
diff --git a/include/wlr/render/interface.h b/include/wlr/render/interface.h
index f0307230..7f25c0ff 100644
--- a/include/wlr/render/interface.h
+++ b/include/wlr/render/interface.h
@@ -14,11 +14,12 @@
struct wlr_renderer_impl;
struct wlr_renderer {
- struct wlr_renderer_impl *impl;
+ const struct wlr_renderer_impl *impl;
};
struct wlr_renderer_impl {
- void (*begin)(struct wlr_renderer *renderer, struct wlr_output *output);
+ void (*begin)(struct wlr_renderer *renderer, uint32_t width,
+ uint32_t height);
void (*end)(struct wlr_renderer *renderer);
void (*clear)(struct wlr_renderer *renderer, const float color[static 4]);
void (*scissor)(struct wlr_renderer *renderer, struct wlr_box *box);
@@ -44,7 +45,7 @@ struct wlr_renderer_impl {
};
void wlr_renderer_init(struct wlr_renderer *renderer,
- struct wlr_renderer_impl *impl);
+ const struct wlr_renderer_impl *impl);
struct wlr_texture_impl {
bool (*upload_pixels)(struct wlr_texture *texture,
@@ -65,14 +66,12 @@ struct wlr_texture_impl {
struct wl_resource *dmabuf_resource);
void (*get_buffer_size)(struct wlr_texture *texture,
struct wl_resource *resource, int *width, int *height);
- void (*bind)(struct wlr_texture *texture);
void (*destroy)(struct wlr_texture *texture);
};
void wlr_texture_init(struct wlr_texture *texture,
- struct wlr_texture_impl *impl);
-void wlr_texture_bind(struct wlr_texture *texture);
+ const struct wlr_texture_impl *impl);
void wlr_texture_get_buffer_size(struct wlr_texture *texture,
- struct wl_resource *resource, int *width, int *height);
+ struct wl_resource *resource, int *width, int *height);
#endif
diff --git a/include/wlr/render/wlr_renderer.h b/include/wlr/render/wlr_renderer.h
index d5f3cf70..6f0d2ecc 100644
--- a/include/wlr/render/wlr_renderer.h
+++ b/include/wlr/render/wlr_renderer.h
@@ -12,7 +12,7 @@ struct wlr_output;
struct wlr_renderer;
-void wlr_renderer_begin(struct wlr_renderer *r, struct wlr_output *output);
+void wlr_renderer_begin(struct wlr_renderer *r, int width, int height);
void wlr_renderer_end(struct wlr_renderer *r);
void wlr_renderer_clear(struct wlr_renderer *r, const float color[static 4]);
/**
diff --git a/include/wlr/render/wlr_texture.h b/include/wlr/render/wlr_texture.h
index 49aa93d7..095097e6 100644
--- a/include/wlr/render/wlr_texture.h
+++ b/include/wlr/render/wlr_texture.h
@@ -9,7 +9,7 @@
struct wlr_texture_impl;
struct wlr_texture {
- struct wlr_texture_impl *impl;
+ const struct wlr_texture_impl *impl;
bool valid;
uint32_t format;