[mutter/gbsneto/window-screencast-fixes: 1/2] window-actor: Shuffle some lines around



commit 0b47424c1f74ca12c4bb4f62aa408a1ec3a74d9a
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Mar 16 19:47:30 2020 -0300

    window-actor: Shuffle some lines around
    
    Move the CoglColor assignment right above the cogl_framebuffer_clear() call,
    and let these wonderful partners together to delight us with an easier to
    read code.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/1129

 src/compositor/meta-window-actor.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 702e2ed03..588f639f1 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -1295,10 +1295,9 @@ meta_window_actor_blit_to_framebuffer (MetaScreenCastWindow *screen_cast_window,
   if (width == 0 || height == 0)
     return FALSE;
 
-  cogl_color_init_from_4ub (&clear_color, 0, 0, 0, 0);
-
   cogl_framebuffer_push_matrix (framebuffer);
 
+  cogl_color_init_from_4ub (&clear_color, 0, 0, 0, 0);
   cogl_framebuffer_clear (framebuffer, COGL_BUFFER_BIT_COLOR, &clear_color);
   cogl_framebuffer_orthographic (framebuffer, 0, 0, width, height, 0, 1.0);
   cogl_framebuffer_scale (framebuffer, resource_scale, resource_scale, 1);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]