diff options
author | emersion <contact@emersion.fr> | 2018-01-22 16:42:22 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-01-22 16:42:22 +0100 |
commit | 415a2b7c569457ebf85d7ae066cc19bee196d22e (patch) | |
tree | dcab6c9896c23eccd632315e5aad3eaf9d12a946 /include/wlr | |
parent | 3f1c4f5be799a63ddd75284847bf0e78f77369bf (diff) |
render: add wlr_renderer_clear and wlr_renderer_scissor
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/render.h | 4 | ||||
-rw-r--r-- | include/wlr/render/egl.h | 3 | ||||
-rw-r--r-- | include/wlr/render/interface.h | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/include/wlr/render.h b/include/wlr/render.h index 5027064d..bfd9e829 100644 --- a/include/wlr/render.h +++ b/include/wlr/render.h @@ -5,6 +5,7 @@ #include <EGL/egl.h> #include <EGL/eglext.h> #include <wayland-server-protocol.h> +#include <wlr/types/wlr_box.h> #include <wlr/types/wlr_output.h> struct wlr_texture; @@ -12,6 +13,9 @@ struct wlr_renderer; void wlr_renderer_begin(struct wlr_renderer *r, struct wlr_output *output); void wlr_renderer_end(struct wlr_renderer *r); +void wlr_renderer_clear(struct wlr_renderer *r, float red, float green, + float blue, float alpha); +void wlr_renderer_scissor(struct wlr_renderer *r, struct wlr_box *box); /** * Requests a texture handle from this renderer. */ diff --git a/include/wlr/render/egl.h b/include/wlr/render/egl.h index c292a6f8..6979fd9b 100644 --- a/include/wlr/render/egl.h +++ b/include/wlr/render/egl.h @@ -72,7 +72,4 @@ const char *egl_error(void); bool wlr_egl_make_current(struct wlr_egl *egl, EGLSurface surface, int *buffer_age); -// TODO: remove -int wlr_egl_get_buffer_age(struct wlr_egl *egl, EGLSurface surface); - #endif diff --git a/include/wlr/render/interface.h b/include/wlr/render/interface.h index bbc5acb4..3927795d 100644 --- a/include/wlr/render/interface.h +++ b/include/wlr/render/interface.h @@ -6,6 +6,7 @@ #include <EGL/eglext.h> #include <stdbool.h> #include <wlr/render.h> +#include <wlr/types/wlr_box.h> #include <wlr/types/wlr_output.h> struct wlr_renderer_impl; @@ -17,6 +18,9 @@ struct wlr_renderer { struct wlr_renderer_impl { void (*begin)(struct wlr_renderer *renderer, struct wlr_output *output); void (*end)(struct wlr_renderer *renderer); + void (*clear)(struct wlr_renderer *renderer, float red, float green, + float blue, float alpha); + void (*scissor)(struct wlr_renderer *renderer, struct wlr_box *box); struct wlr_texture *(*texture_create)(struct wlr_renderer *renderer); bool (*render_with_matrix)(struct wlr_renderer *renderer, struct wlr_texture *texture, const float (*matrix)[16]); |