From 092cc47afcaa02f3a92d000dba5f5756a3336771 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Sat, 8 May 2010 17:11:49 -0400 Subject: [PATCH] Work around COGL bug causing flash for new windows COGL bug http://bugzilla.openedhand.com/show_bug.cgi?id=2110 results in pending drawing at the time of cogl_offscreen_new_to_texture() going to the newly created framebuffer rather than the stage. This would result in most windows being missing for the first frame when a new window is mapped. Work around this by calling cogl_flush() before cogl_offscreen_new_to_texture(). https://bugzilla.gnome.org/show_bug.cgi?id=618138 --- src/compositor/mutter-texture-tower.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/compositor/mutter-texture-tower.c b/src/compositor/mutter-texture-tower.c index 67f878baa..f9307cb19 100644 --- a/src/compositor/mutter-texture-tower.c +++ b/src/compositor/mutter-texture-tower.c @@ -422,7 +422,12 @@ texture_tower_revalidate_fbo (MutterTextureTower *tower, CoglMatrix modelview; if (tower->fbos[level] == COGL_INVALID_HANDLE) - tower->fbos[level] = cogl_offscreen_new_to_texture (dest_texture); + { + /* Work around http://bugzilla.openedhand.com/show_bug.cgi?id=2110 */ + cogl_flush(); + + tower->fbos[level] = cogl_offscreen_new_to_texture (dest_texture); + } if (tower->fbos[level] == COGL_INVALID_HANDLE) return FALSE;