aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/render/wlr_renderer.h
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2018-03-28 00:20:39 -0400
committerTony Crisci <tony@dubstepdish.com>2018-03-28 00:20:39 -0400
commit41e54ba632ae5804d09f75f1af4a708ea33932cf (patch)
tree79a523c5dc4bdf148361ebcda47c4d6a9027e98a /include/wlr/render/wlr_renderer.h
parentedb643fc6c55b47dd766b4e516b16108719d1ecd (diff)
parent330ee081269790922a46091399b616b12ce14f51 (diff)
Merge branch 'master' into xdg-positioner
Diffstat (limited to 'include/wlr/render/wlr_renderer.h')
-rw-r--r--include/wlr/render/wlr_renderer.h31
1 files changed, 20 insertions, 11 deletions
diff --git a/include/wlr/render/wlr_renderer.h b/include/wlr/render/wlr_renderer.h
index 6f0d2ecc..65fc7b19 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,
@@ -36,14 +30,24 @@ bool wlr_render_texture(struct wlr_renderer *r, struct wlr_texture *texture,
bool wlr_render_texture_with_matrix(struct wlr_renderer *r,
struct wlr_texture *texture, const float matrix[static 9], float alpha);
/**
- * Renders a solid quad in the specified color.
+ * Renders a solid rectangle in the specified color.
+ */
+void wlr_render_rect(struct wlr_renderer *r, const struct wlr_box *box,
+ const float color[static 4], const float projection[static 9]);
+/**
+ * Renders a solid quadrangle in the specified color with the specified matrix.
*/
-void wlr_render_colored_quad(struct wlr_renderer *r,
+void wlr_render_quad_with_matrix(struct wlr_renderer *r,
const float color[static 4], const float matrix[static 9]);
/**
* Renders a solid ellipse in the specified color.
*/
-void wlr_render_colored_ellipse(struct wlr_renderer *r,
+void wlr_render_ellipse(struct wlr_renderer *r, const struct wlr_box *box,
+ const float color[static 4], const float projection[static 9]);
+/**
+ * Renders a solid ellipse in the specified color with the specified matrix.
+ */
+void wlr_render_ellipse_with_matrix(struct wlr_renderer *r,
const float color[static 4], const float matrix[static 9]);
/**
* Returns a list of pixel formats supported by this renderer.
@@ -51,11 +55,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.
*/