From 2b60fb01445133e11214d3e66984708387128fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 20 Dec 2017 01:50:09 +0100 Subject: [PATCH] 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 --- clutter/clutter/clutter-stage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c index 02ab07b86..0a800f426 100644 --- a/clutter/clutter/clutter-stage.c +++ b/clutter/clutter/clutter-stage.c @@ -4726,8 +4726,8 @@ capture_view (ClutterStage *stage, if (paint) { - _clutter_stage_maybe_setup_viewport (stage, view); cogl_push_framebuffer (framebuffer); + _clutter_stage_maybe_setup_viewport (stage, view); clutter_stage_do_paint_view (stage, view, rect); } @@ -4829,8 +4829,8 @@ capture_view_into (ClutterStage *stage, if (paint) { - _clutter_stage_maybe_setup_viewport (stage, view); cogl_push_framebuffer (framebuffer); + _clutter_stage_maybe_setup_viewport (stage, view); clutter_stage_do_paint_view (stage, view, rect); }