[PATCH 2/5] DEBUG_PAINT: log windows that will not be repainted.

Forest Bond forest at alittletooquiet.net
Sun Jun 13 08:58:08 PDT 2010


With DEBUG_PAINT, windows that were being painted were logged, but
nothing was logged for skipped windows.  With this patch, the reason
a window is skipped is logged ("not damaged", "invisible") with the
window id.

Signed-off-by: Forest Bond <forest at alittletooquiet.net>
---
 xcompmgr.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/xcompmgr.c b/xcompmgr.c
index dc5b225..1f6b450 100644
--- a/xcompmgr.c
+++ b/xcompmgr.c
@@ -945,11 +945,21 @@ paint_all (Display *dpy, XserverRegion region)
 #endif
 	/* never painted, ignore it */
 	if (!w->damaged)
+	{
+#if DEBUG_REPAINT
+	    printf (" [not damaged: 0x%x]", w->id);
+#endif
 	    continue;
+	}
 	/* if invisible, ignore it */
 	if (w->a.x + w->a.width < 1 || w->a.y + w->a.height < 1
 	    || w->a.x >= root_width || w->a.y >= root_height)
+	{
+#if DEBUG_REPAINT
+	    printf (" [invisible: 0x%x]", w->id);
+#endif
 	    continue;
+	}
 	if (!w->picture)
 	{
 	    XRenderPictureAttributes	pa;
@@ -970,7 +980,7 @@ paint_all (Display *dpy, XserverRegion region)
 					       &pa);
 	}
 #if DEBUG_REPAINT
-	printf (" 0x%x", w->id);
+	printf (" [painting 0x%x]", w->id);
 #endif
 	if (clipChanged)
 	{
-- 
1.7.0.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100613/71d44ed0/attachment.pgp>


More information about the xorg-devel mailing list