clutter/stage: Refactor view setup code

We'll share it between pick and paint, so refactor
the framebuffer and view setup code from paint
into a new function.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/865
This commit is contained in:
Georges Basile Stavracas Neto 2019-10-17 17:03:26 +02:00
parent 179d5ba6a6
commit ff8ed70f84

View File

@ -892,9 +892,9 @@ _clutter_stage_update_active_framebuffer (ClutterStage *stage,
* be able to cull them.
*/
static void
clutter_stage_do_paint_view (ClutterStage *stage,
ClutterStageView *view,
const cairo_rectangle_int_t *clip)
setup_view_for_pick_or_paint (ClutterStage *stage,
ClutterStageView *view,
const cairo_rectangle_int_t *clip)
{
ClutterStagePrivate *priv = stage->priv;
CoglFramebuffer *framebuffer = clutter_stage_view_get_framebuffer (view);
@ -949,6 +949,14 @@ clutter_stage_do_paint_view (ClutterStage *stage,
_clutter_stage_paint_volume_stack_free_all (stage);
_clutter_stage_update_active_framebuffer (stage, framebuffer);
}
static void
clutter_stage_do_paint_view (ClutterStage *stage,
ClutterStageView *view,
const cairo_rectangle_int_t *clip)
{
setup_view_for_pick_or_paint (stage, view, clip);
clutter_actor_paint (CLUTTER_ACTOR (stage));
}