[gnome-shell] st-theme-node-drawing: clear border buffer before drawing on it



commit 91ca86ffe474f94bd544e086317eaed6a22de19b
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon Jan 16 14:43:35 2012 -0500

    st-theme-node-drawing: clear border buffer before drawing on it
    
    A new texture has undefined contents - when we're creating a shadow,
    we need to clear the contents of the texture before drawing the border
    and background into it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=668048

 src/st/st-theme-node-drawing.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/st/st-theme-node-drawing.c b/src/st/st-theme-node-drawing.c
index 8533107..1e7ac5b 100644
--- a/src/st/st-theme-node-drawing.c
+++ b/src/st/st-theme-node-drawing.c
@@ -1419,9 +1419,14 @@ st_theme_node_render_resources (StThemeNode   *node,
           if (offscreen != COGL_INVALID_HANDLE)
             {
               ClutterActorBox box = { 0, 0, width, height };
+              CoglColor clear_color;
 
               cogl_push_framebuffer (offscreen);
               cogl_ortho (0, width, height, 0, 0, 1.0);
+
+              cogl_color_set_from_4ub (&clear_color, 0, 0, 0, 0);
+              cogl_clear (&clear_color, COGL_BUFFER_BIT_COLOR);
+
               st_theme_node_paint_borders (node, &box, 0xFF);
               cogl_pop_framebuffer ();
               cogl_handle_unref (offscreen);



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