aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/gles2/renderer.c6
-rw-r--r--render/pixman/renderer.c7
2 files changed, 13 insertions, 0 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
index dad18975..baf53c72 100644
--- a/render/gles2/renderer.c
+++ b/render/gles2/renderer.c
@@ -919,3 +919,9 @@ bool wlr_gles2_renderer_check_ext(struct wlr_renderer *wlr_renderer,
struct wlr_gles2_renderer *renderer = gles2_get_renderer(wlr_renderer);
return check_gl_ext(renderer->exts_str, ext);
}
+
+GLuint wlr_gles2_renderer_get_current_fbo(struct wlr_renderer *wlr_renderer) {
+ struct wlr_gles2_renderer *renderer = gles2_get_renderer(wlr_renderer);
+ assert(renderer->current_buffer);
+ return renderer->current_buffer->fbo;
+}
diff --git a/render/pixman/renderer.c b/render/pixman/renderer.c
index 56960fc2..f1c1a3d5 100644
--- a/render/pixman/renderer.c
+++ b/render/pixman/renderer.c
@@ -567,3 +567,10 @@ pixman_image_t *wlr_pixman_texture_get_image(struct wlr_texture *wlr_texture) {
struct wlr_pixman_texture *texture = get_texture(wlr_texture);
return texture->image;
}
+
+pixman_image_t *wlr_pixman_renderer_get_current_image(
+ struct wlr_renderer *wlr_renderer) {
+ struct wlr_pixman_renderer *renderer = get_renderer(wlr_renderer);
+ assert(renderer->current_buffer);
+ return renderer->current_buffer->image;
+}