From c498bce9e444c665f239813d3f22b500a526b369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 31 May 2016 15:44:22 +0800 Subject: [PATCH] cogl: Add API to get the texture from an offscreen https://bugzilla.gnome.org/show_bug.cgi?id=768976 --- cogl/cogl/cogl-framebuffer.c | 6 ++++++ cogl/cogl/cogl-offscreen.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/cogl/cogl/cogl-framebuffer.c b/cogl/cogl/cogl-framebuffer.c index 9dbd2a17d..55b9e3756 100644 --- a/cogl/cogl/cogl-framebuffer.c +++ b/cogl/cogl/cogl-framebuffer.c @@ -705,6 +705,12 @@ cogl_offscreen_new_with_texture (CoglTexture *texture) return _cogl_offscreen_new_with_texture_full (texture, 0, 0); } +CoglTexture * +cogl_offscreen_get_texture (CoglOffscreen *offscreen) +{ + return offscreen->texture; +} + static void _cogl_offscreen_free (CoglOffscreen *offscreen) { diff --git a/cogl/cogl/cogl-offscreen.h b/cogl/cogl/cogl-offscreen.h index 9c844426c..26016f530 100644 --- a/cogl/cogl/cogl-offscreen.h +++ b/cogl/cogl/cogl-offscreen.h @@ -167,6 +167,12 @@ COGL_DEPRECATED_FOR (cogl_object_unref) void cogl_offscreen_unref (void *offscreen); +/** + * cogl_offscreen_get_texture: (skip) + */ +CoglTexture * +cogl_offscreen_get_texture (CoglOffscreen *offscreen); + COGL_END_DECLS #endif /* __COGL_OFFSCREEN_H__ */