From 65230bfd7fe861de4f2eaa58d058722f7ace8d99 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Mon, 16 Jan 2012 14:43:35 -0500 Subject: [PATCH] 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 file changed, 5 insertions(+) diff --git a/src/st/st-theme-node-drawing.c b/src/st/st-theme-node-drawing.c index 440ca138a..b83481192 100644 --- a/src/st/st-theme-node-drawing.c +++ b/src/st/st-theme-node-drawing.c @@ -1427,9 +1427,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);