stage: Push framebuffer before setting up viewport

When capture_view* functions are called with the paint flag set
to TRUE, we need to setup the framebuffer, however this was
happening after setting up the viewport, while the viewport
needs the framebuffer to be valid when calling cogl_set_viewport.

https://bugzilla.gnome.org/show_bug.cgi?id=791809
This commit is contained in:
Marco Trevisan (Treviño) 2017-12-20 01:50:09 +01:00
parent 827d0b3f7f
commit 7ef3ed0f82

View File

@ -4726,8 +4726,8 @@ capture_view (ClutterStage *stage,
if (paint) if (paint)
{ {
_clutter_stage_maybe_setup_viewport (stage, view);
cogl_push_framebuffer (framebuffer); cogl_push_framebuffer (framebuffer);
_clutter_stage_maybe_setup_viewport (stage, view);
clutter_stage_do_paint_view (stage, view, rect); clutter_stage_do_paint_view (stage, view, rect);
} }
@ -4829,8 +4829,8 @@ capture_view_into (ClutterStage *stage,
if (paint) if (paint)
{ {
_clutter_stage_maybe_setup_viewport (stage, view);
cogl_push_framebuffer (framebuffer); cogl_push_framebuffer (framebuffer);
_clutter_stage_maybe_setup_viewport (stage, view);
clutter_stage_do_paint_view (stage, view, rect); clutter_stage_do_paint_view (stage, view, rect);
} }