From 5c68596744b49188046139e49ae63d80287f6195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 21 Nov 2019 21:28:36 +0100 Subject: [PATCH] clutter/paint-context: Add API to get base framebuffer This corresponds to the framebuffer the paint targets. For regular stage redraws, this means the framebuffer of the stage view. https://gitlab.gnome.org/GNOME/mutter/merge_requests/935 --- clutter/clutter/clutter-paint-context-private.h | 2 ++ clutter/clutter/clutter-paint-context.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/clutter/clutter/clutter-paint-context-private.h b/clutter/clutter/clutter-paint-context-private.h index bb9118019..ba6b68927 100644 --- a/clutter/clutter/clutter-paint-context-private.h +++ b/clutter/clutter/clutter-paint-context-private.h @@ -29,4 +29,6 @@ void clutter_paint_context_pop_framebuffer (ClutterPaintContext *paint_context); gboolean clutter_paint_context_is_drawing_off_stage (ClutterPaintContext *paint_context); +CoglFramebuffer * clutter_paint_context_get_base_framebuffer (ClutterPaintContext *paint_context); + #endif /* CLUTTER_PAINT_CONTEXT_PRIVATE_H */ diff --git a/clutter/clutter/clutter-paint-context.c b/clutter/clutter/clutter-paint-context.c index fe0b6a6a0..1787435de 100644 --- a/clutter/clutter/clutter-paint-context.c +++ b/clutter/clutter/clutter-paint-context.c @@ -129,6 +129,12 @@ clutter_paint_context_get_framebuffer (ClutterPaintContext *paint_context) return paint_context->framebuffers->data; } +CoglFramebuffer * +clutter_paint_context_get_base_framebuffer (ClutterPaintContext *paint_context) +{ + return g_list_last (paint_context->framebuffers)->data; +} + /** * clutter_paint_context_get_stage_view: (skip) */