Introduce wlr_renderer_get_egl

master
Drew DeVault 5 years ago committed by Simon Ser
parent aa9ea95e1f
commit 4c9423278a

@ -17,6 +17,8 @@ struct wlr_egl;
struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_egl *egl); struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_egl *egl);
struct wlr_egl *wlr_gles2_renderer_get_egl(struct wlr_renderer *renderer);
struct wlr_texture *wlr_gles2_texture_from_pixels(struct wlr_egl *egl, struct wlr_texture *wlr_gles2_texture_from_pixels(struct wlr_egl *egl,
enum wl_shm_format wl_fmt, uint32_t stride, uint32_t width, uint32_t height, enum wl_shm_format wl_fmt, uint32_t stride, uint32_t width, uint32_t height,
const void *data); const void *data);

@ -109,6 +109,7 @@ bool wlr_renderer_format_supported(struct wlr_renderer *r,
enum wl_shm_format fmt); enum wl_shm_format fmt);
void wlr_renderer_init_wl_display(struct wlr_renderer *r, void wlr_renderer_init_wl_display(struct wlr_renderer *r,
struct wl_display *wl_display); struct wl_display *wl_display);
/** /**
* Destroys this wlr_renderer. Textures must be destroyed separately. * Destroys this wlr_renderer. Textures must be destroyed separately.
*/ */

@ -356,6 +356,12 @@ static void gles2_init_wl_display(struct wlr_renderer *wlr_renderer,
} }
} }
struct wlr_egl *wlr_gles2_renderer_get_egl(struct wlr_renderer *wlr_renderer) {
struct wlr_gles2_renderer *renderer =
gles2_get_renderer(wlr_renderer);
return renderer->egl;
}
static void gles2_destroy(struct wlr_renderer *wlr_renderer) { static void gles2_destroy(struct wlr_renderer *wlr_renderer) {
struct wlr_gles2_renderer *renderer = gles2_get_renderer(wlr_renderer); struct wlr_gles2_renderer *renderer = gles2_get_renderer(wlr_renderer);

Loading…
Cancel
Save