Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
render/gles2: add getter for wlr_egl_context instead of wlr_egl
Browse files Browse the repository at this point in the history
  • Loading branch information
bl4ckb0ne committed Sep 21, 2021
1 parent e9904db commit 6d62f9b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
10 changes: 8 additions & 2 deletions include/wlr/render/gles2.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@
#include <wlr/backend.h>
#include <wlr/render/wlr_renderer.h>

struct wlr_egl;
struct wlr_egl_context;

struct wlr_renderer *wlr_gles2_renderer_create_with_drm_fd(int drm_fd);

struct wlr_egl *wlr_gles2_renderer_get_egl(struct wlr_renderer *renderer);
/**
* Returns the current EGL context
* The pointer returned is not owned by the caller
*/
struct wlr_egl_context *wlr_gles2_renderer_get_egl_context(
struct wlr_renderer *wlr_renderer);

bool wlr_gles2_renderer_check_ext(struct wlr_renderer *renderer,
const char *ext);
/**
Expand Down
8 changes: 4 additions & 4 deletions render/gles2/renderer.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,10 @@ static uint32_t gles2_get_render_buffer_caps(struct wlr_renderer *wlr_renderer)
return WLR_BUFFER_CAP_DMABUF;
}

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;
struct wlr_egl_context *wlr_gles2_renderer_get_egl_context(
struct wlr_renderer *wlr_renderer) {
struct wlr_gles2_renderer *renderer = gles2_get_renderer(wlr_renderer);
return &renderer->egl->ctx;
}

static void gles2_destroy(struct wlr_renderer *wlr_renderer) {
Expand Down

0 comments on commit 6d62f9b

Please sign in to comment.