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
This commit is contained in:
Jonas Ådahl 2019-11-21 21:28:36 +01:00 committed by Georges Basile Stavracas Neto
parent 61b1ead1a2
commit 5c68596744
2 changed files with 8 additions and 0 deletions

View File

@ -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 */

View File

@ -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)
*/