[cairo-commit] 2 commits - boilerplate/cairo-boilerplate-glitz.c src/cairo-glitz-surface.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Oct 15 04:22:50 PDT 2008


 boilerplate/cairo-boilerplate-glitz.c |   12 ++++++------
 src/cairo-glitz-surface.c             |    7 +++++++
 2 files changed, 13 insertions(+), 6 deletions(-)

New commits:
commit 877e77fa3e85c09c29e64ca5ae7329346db029cc
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Oct 15 12:20:00 2008 +0100

    [glitz] Disable caching of solid surfaces.
    
    glitz currently has no mechanism to release resources upon connection
    closure (ala XCloseDisplay) and so will attempt invalid accesses when
    evicting old surfaces from the solid pattern cache.

diff --git a/src/cairo-glitz-surface.c b/src/cairo-glitz-surface.c
index 71a5b9d..aa138db 100644
--- a/src/cairo-glitz-surface.c
+++ b/src/cairo-glitz-surface.c
@@ -2381,6 +2381,13 @@ _cairo_glitz_surface_is_similar (void *surface_a,
     glitz_drawable_t *drawable_a = glitz_surface_get_drawable (a->surface);
     glitz_drawable_t *drawable_b = glitz_surface_get_drawable (b->surface);
 
+    /* XXX Disable caching of glitz surfaces by the solid pattern cache.
+     * Until glitz has a mechanism for releasing resources on connection
+     * closure, we will attempt to access invalid pointers when evicting
+     * old surfaces from the solid pattern cache.
+     */
+    return FALSE;
+
     return drawable_a == drawable_b;
 }
 
commit fc04a1e0dbc3cefa51c7602e0a23dba886813fe5
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Oct 15 12:13:40 2008 +0100

    [boilerplate] Fixup compilation for gliitz.
    
    Convert a few old references to cairo_boilerplate_surface_set_user_data.

diff --git a/boilerplate/cairo-boilerplate-glitz.c b/boilerplate/cairo-boilerplate-glitz.c
index b0d65ac..a764080 100644
--- a/boilerplate/cairo-boilerplate-glitz.c
+++ b/boilerplate/cairo-boilerplate-glitz.c
@@ -217,8 +217,8 @@ _cairo_boilerplate_glitz_glx_create_surface (const char			 *name,
     gxtc->base.width = width;
     gxtc->base.height = height;
     gxtc->base.content = content;
-    status = cairo_boilerplate_surface_set_user_data (surface,
-	                                      &glitz_closure_key, gxtc, NULL);
+    status = cairo_surface_set_user_data (surface,
+					  &glitz_closure_key, gxtc, NULL);
     if (status == CAIRO_STATUS_SUCCESS)
 	return surface;
 
@@ -361,8 +361,8 @@ _cairo_boilerplate_glitz_agl_create_surface (const char			 *name,
     aglc->base.width = width;
     aglc->base.height = height;
     aglc->base.content = content;
-    status = cairo_boilerplate_surface_set_user_data (surface,
-	                                      &glitz_closure_key, aglc, NULL);
+    status = cairo_surface_set_user_data (surface,
+					  &glitz_closure_key, aglc, NULL);
     if (status == CAIRO_STATUS_SUCCESS)
 	return surface;
 
@@ -493,8 +493,8 @@ _cairo_boilerplate_glitz_wgl_create_surface (const char			 *name,
     wglc->base.width = width;
     wglc->base.height = height;
     wglc->base.content = content;
-    status = cairo_boilerplate_surface_set_user_data (surface,
-	                                      &glitz_closure_key, wglc, NULL);
+    status = cairo_surface_set_user_data (surface,
+					  &glitz_closure_key, wglc, NULL);
     if (status == CAIRO_STATUS_SUCCESS)
 	return surface;
 


More information about the cairo-commit mailing list