diff options
author | emersion <contact@emersion.fr> | 2018-03-24 18:30:28 -0400 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-03-24 23:48:32 -0400 |
commit | c63d94483b1e52817ca01ca82a867a78ebd39fa6 (patch) | |
tree | 46ec0a24a43aeff6513ca7a8a8ec25eb0c70e8e7 /include/wlr/render/wlr_renderer.h | |
parent | 80d3561d325335e92b196f7cb5797eea9d71d17d (diff) |
Redesign wlr_texture
- Textures are now immutable (apart from those created from raw
pixels), no more invalid textures
- Move all wl_drm stuff in wlr_renderer
- Most of wlr_texture fields are now private
- Remove some duplicated DMA-BUF code in the DRM backend
- Add more assertions
- Stride is now always given as bytes rather than pixels
- Drop wl_shm functions
Fun fact: this patch has been written 10,000 meters up in the air.
Diffstat (limited to 'include/wlr/render/wlr_renderer.h')
-rw-r--r-- | include/wlr/render/wlr_renderer.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/include/wlr/render/wlr_renderer.h b/include/wlr/render/wlr_renderer.h index 6f0d2ecc..decd14f5 100644 --- a/include/wlr/render/wlr_renderer.h +++ b/include/wlr/render/wlr_renderer.h @@ -1,8 +1,6 @@ #ifndef WLR_RENDER_WLR_RENDERER_H #define WLR_RENDER_WLR_RENDERER_H -#include <EGL/egl.h> -#include <EGL/eglext.h> #include <stdint.h> #include <wayland-server-protocol.h> #include <wlr/render/wlr_texture.h> @@ -22,10 +20,6 @@ void wlr_renderer_clear(struct wlr_renderer *r, const float color[static 4]); */ void wlr_renderer_scissor(struct wlr_renderer *r, struct wlr_box *box); /** - * Requests a texture handle from this renderer. - */ -struct wlr_texture *wlr_render_texture_create(struct wlr_renderer *r); -/** * Renders the requested texture. */ bool wlr_render_texture(struct wlr_renderer *r, struct wlr_texture *texture, @@ -51,11 +45,16 @@ void wlr_render_colored_ellipse(struct wlr_renderer *r, const enum wl_shm_format *wlr_renderer_get_formats(struct wlr_renderer *r, size_t *len); /** - * Returns true if this wl_buffer is a DRM buffer. + * Returns true if this wl_buffer is a wl_drm buffer. */ -bool wlr_renderer_buffer_is_drm(struct wlr_renderer *renderer, +bool wlr_renderer_resource_is_wl_drm_buffer(struct wlr_renderer *renderer, struct wl_resource *buffer); /** + * Gets the width and height of a wl_drm buffer. + */ +void wlr_renderer_wl_drm_buffer_get_size(struct wlr_renderer *renderer, + struct wl_resource *buffer, int *width, int *height); +/** * Reads out of pixels of the currently bound surface into data. `stride` is in * bytes. */ |