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
This commit is contained in:
parent
33d4518e50
commit
91ca86ffe4
@ -1419,9 +1419,14 @@ st_theme_node_render_resources (StThemeNode *node,
|
|||||||
if (offscreen != COGL_INVALID_HANDLE)
|
if (offscreen != COGL_INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
ClutterActorBox box = { 0, 0, width, height };
|
ClutterActorBox box = { 0, 0, width, height };
|
||||||
|
CoglColor clear_color;
|
||||||
|
|
||||||
cogl_push_framebuffer (offscreen);
|
cogl_push_framebuffer (offscreen);
|
||||||
cogl_ortho (0, width, height, 0, 0, 1.0);
|
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);
|
st_theme_node_paint_borders (node, &box, 0xFF);
|
||||||
cogl_pop_framebuffer ();
|
cogl_pop_framebuffer ();
|
||||||
cogl_handle_unref (offscreen);
|
cogl_handle_unref (offscreen);
|
||||||
|
Loading…
Reference in New Issue
Block a user