From e320b06aaade305552a3f58d90f8a1c5b983e827 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 8 Aug 2014 17:29:26 -0400 Subject: [PATCH] texture-tower: Fix error case in meta-texture-tower If we for some reason have an error trying to allocate the framebuffer, we'll still mark the tower as revalidated. Move the validation to the end of the actual revalidation code to solve this. --- src/compositor/meta-texture-tower.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/compositor/meta-texture-tower.c b/src/compositor/meta-texture-tower.c index 80675c21a..a6eec7a7b 100644 --- a/src/compositor/meta-texture-tower.c +++ b/src/compositor/meta-texture-tower.c @@ -378,8 +378,8 @@ texture_tower_create_texture (MetaTextureTower *tower, } static void -texture_tower_revalidate_fbo (MetaTextureTower *tower, - int level) +texture_tower_revalidate (MetaTextureTower *tower, + int level) { CoglTexture *source_texture = tower->textures[level - 1]; int source_texture_width = cogl_texture_get_width (source_texture); @@ -425,13 +425,6 @@ texture_tower_revalidate_fbo (MetaTextureTower *tower, (2. * invalid->y2) / source_texture_height); cogl_object_unref (pipeline); -} - -static void -texture_tower_revalidate (MetaTextureTower *tower, - int level) -{ - texture_tower_revalidate_fbo (tower, level); tower->invalid[level].x1 = tower->invalid[level].x2 = 0; tower->invalid[level].y1 = tower->invalid[level].y2 = 0;