Artifacts after startup when compositor Enabled
There is a history of artifacts after startup. And recently commit 554e5c7a was applied to clear the frame buffer so that "undefined" data would not be used. That "undefined" data often was latest rendered image, and this actually masked the underlying problem.
On startup, a full paint of the screen is never scheduled for the frame buffer. This causes parts of the render buffer to remain untouched (now black). And when executing a flip, those areas are now black instead of undefined. The problem is clearly visible, when you have background set, and you execute xfwm4 --replace
from a terminal (on system without other screens). Most of the background will be black instead of the background image. When moving the terminal around it will "fix" the areas covered.
The proper fix seems to schedule a full draw when compositor is enabled.
E.g. something like:
diff --git a/src/compositor.c b/src/compositor.c
index 7dd8a0be0..97d334a5a 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -166,6 +166,9 @@ struct _CWindow
guint32 bypass_compositor;
};
+static void
+damage_screen (ScreenInfo *screen_info);
+
static CWindow*
find_cwindow_in_screen (ScreenInfo *screen_info, Window id)
{
@@ -2193,14 +2196,9 @@ static void
paint_root (ScreenInfo *screen_info, Picture paint_buffer)
{
g_return_if_fail (screen_info != NULL);
+ g_return_if_fail (screen_info->rootTile != None);
TRACE ("entering");
- if (screen_info->rootTile == None)
- {
- screen_info->rootTile = root_tile (screen_info);
- g_return_if_fail (screen_info->rootTile != None);
- }
-
XRenderComposite (myScreenGetXDisplay (screen_info),
PictOpSrc,
screen_info->rootTile,
@@ -2741,6 +2739,13 @@ repair_screen (ScreenInfo *screen_info)
#warning GL_SIGNALED not supported by libepoxy, please update your version of libepoxy
#endif
#endif /* HAVE_EPOXY */
+
+ if (screen_info->rootTile == None)
+ {
+ screen_info->rootTile = root_tile (screen_info);
+ damage_screen (screen_info);
+ }
+
display_info = screen_info->display_info;
damage = screen_info->allDamage;
if (damage)
Seems to already make the situation noticeable better. However, some areas like the xfce4-panel area still flickers. Not sure why.