[Xquartz-changes] [278] AppleSGLX/trunk

source_changes at macosforge.org source_changes at macosforge.org
Tue Mar 3 12:04:18 PST 2009


Revision: 278
          http://trac.macosforge.org/projects/xquartz/changeset/278
Author:   gstaplin at apple.com
Date:     2009-03-03 12:04:18 -0800 (Tue, 03 Mar 2009)
Log Message:
-----------
Add more diagnostics for surfaces and drawables.

It seems I was wrong about the test code not causing a leak.

The drawables are created and destroyed, but it seems that
the WindowServer grows.  Something appears to be leaking
and I'm not sure what yet.  

I will verify with some printf statements in the X server 
to make sure it's destroying the surface when 
XAppleDRIDestroySurface is called.

Modified Paths:
--------------
    AppleSGLX/trunk/apple_glx_drawable.c
    AppleSGLX/trunk/apple_glx_surface.c

Modified: AppleSGLX/trunk/apple_glx_drawable.c
===================================================================
--- AppleSGLX/trunk/apple_glx_drawable.c	2009-03-03 19:51:51 UTC (rev 277)
+++ AppleSGLX/trunk/apple_glx_drawable.c	2009-03-03 20:04:18 UTC (rev 278)
@@ -170,6 +170,10 @@
     bool result;
 
     d->lock(d);
+
+    apple_glx_diagnostic("%s: %p ->reference_count before -- %d\n", __func__,
+			 (void *)d, d->reference_count);
+
     d->reference_count--;
 
     if(d->reference_count > 0) {

Modified: AppleSGLX/trunk/apple_glx_surface.c
===================================================================
--- AppleSGLX/trunk/apple_glx_surface.c	2009-03-03 19:51:51 UTC (rev 277)
+++ AppleSGLX/trunk/apple_glx_surface.c	2009-03-03 20:04:18 UTC (rev 278)
@@ -109,7 +109,8 @@
     XAppleDRIDestroySurface(d->display, DefaultScreen(d->display), 
 			    d->drawable);
 
-    apple_glx_diagnostic("destroyed a surface for 0x%lx\n", d->drawable);
+    apple_glx_diagnostic("%s: destroyed a surface for drawable 0x%lx\n", 
+			 __func__, d->drawable);
 }
 
 /* Return true if an error occured. */
@@ -139,7 +140,8 @@
 	    return true;
 	}
 	
-	apple_glx_diagnostic("created a surface for 0x%lx\n", d->drawable);
+	apple_glx_diagnostic("%s: created a surface for 0x%lx\n", 
+			     __func__, d->drawable);
 	return false; /*success*/
     }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/xquartz-changes/attachments/20090303/2a4b1faf/attachment.html>


More information about the Xquartz-changes mailing list