[cairo-commit] 4 commits - src/cairo-egl-context.c src/cairo-gl-glyphs.c src/cairo-xlib-display.c util/cairo-trace

Chris Wilson ickle at kemper.freedesktop.org
Sat Aug 11 09:49:40 PDT 2012


 src/cairo-egl-context.c  |    5 +++--
 src/cairo-gl-glyphs.c    |    1 -
 src/cairo-xlib-display.c |    9 +++++----
 util/cairo-trace/trace.c |    2 +-
 4 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 46d79228df5c5fda114e68d3df02eaa33b5a41c9
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Aug 11 17:48:17 2012 +0100

    xlib: Silence compiler warning
    
    cairo-xlib-display.c: In function '_cairo_xlib_display_get_xrender_format':
    cairo-xlib-display.c:519:21: warning: 'pict_format' may be used
    uninitialized in this function [-Wmaybe-uninitialized]
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-xlib-display.c b/src/cairo-xlib-display.c
index e685c7c..d806bfd 100644
--- a/src/cairo-xlib-display.c
+++ b/src/cairo-xlib-display.c
@@ -492,7 +492,7 @@ _cairo_xlib_display_get_xrender_format (cairo_xlib_display_t	*display,
 
     xrender_format = display->cached_xrender_formats[format];
     if (xrender_format == NULL) {
-	int pict_format;
+	int pict_format = 0;
 
 	switch (format) {
 	case CAIRO_FORMAT_A1:
@@ -515,9 +515,10 @@ _cairo_xlib_display_get_xrender_format (cairo_xlib_display_t	*display,
 	case CAIRO_FORMAT_ARGB32:
 	    pict_format = PictStandardARGB32; break;
 	}
-	if (!xrender_format)
-	    xrender_format = XRenderFindStandardFormat (display->display,
-		                                        pict_format);
+	if (pict_format) {
+	    xrender_format =
+		XRenderFindStandardFormat (display->display, pict_format);
+	}
 	display->cached_xrender_formats[format] = xrender_format;
     }
 
commit 40e6be327861397a821e92ab626269e31fd13979
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Aug 11 17:43:46 2012 +0100

    gl: Remove unused variable
    
    cairo-gl-glyphs.c: In function '_cairo_gl_composite_glyphs_with_clip':
    cairo-gl-glyphs.c:442:9: warning: unused variable 'i' [-Wunused-variable]
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-gl-glyphs.c b/src/cairo-gl-glyphs.c
index 0139bd1..431f5ee 100644
--- a/src/cairo-gl-glyphs.c
+++ b/src/cairo-gl-glyphs.c
@@ -439,7 +439,6 @@ _cairo_gl_composite_glyphs_with_clip (void			    *_dst,
 {
     cairo_gl_surface_t *dst = _dst;
     cairo_bool_t has_component_alpha;
-    int i;
 
     TRACE ((stderr, "%s\n", __FUNCTION__));
 
commit f59b0914f4ddbff0d116c918343a6726d5f4317b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Aug 11 17:38:36 2012 +0100

    egl: s/EGL_KHR_surfaceless_opengl/EGL_KHR_surfaceless_context/
    
    Mesa changed the name of the extension it invented, so check for the
    real name and the old name before falling back to pbuffers which are not
    supported by most EGL implementations.
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=53361
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-egl-context.c b/src/cairo-egl-context.c
index eb1ef29..b24bc80 100644
--- a/src/cairo-egl-context.c
+++ b/src/cairo-egl-context.c
@@ -122,8 +122,10 @@ _egl_make_current_surfaceless(cairo_egl_context_t *ctx)
     const char *extensions;
 
     extensions = eglQueryString(ctx->display, EGL_EXTENSIONS);
-    if (!strstr(extensions, "EGL_KHR_surfaceless_opengl"))
+    if (strstr(extensions, "EGL_KHR_surfaceless_context") == NULL &&
+	strstr(extensions, "EGL_KHR_surfaceless_opengl") == NULL)
 	return FALSE;
+
     if (!eglMakeCurrent(ctx->display,
 			EGL_NO_SURFACE, EGL_NO_SURFACE, ctx->context))
 	return FALSE;
@@ -174,7 +176,6 @@ cairo_egl_device_create (EGLDisplay dpy, EGLContext egl)
 	eglChooseConfig (dpy, config_attribs, &config, 1, &numConfigs);
 
 	ctx->dummy_surface = eglCreatePbufferSurface (dpy, config, attribs);
-
 	if (ctx->dummy_surface == NULL) {
 	    free (ctx);
 	    return _cairo_gl_context_create_in_error (CAIRO_STATUS_NO_MEMORY);
commit b438e583089229d934df48e6fbf0edcd1b23dcd4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Aug 11 17:37:52 2012 +0100

    trace: Fix propagation of CAIRO_TRACE_OUTDIR to children
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c
index da7d2f0..f7945e7 100644
--- a/util/cairo-trace/trace.c
+++ b/util/cairo-trace/trace.c
@@ -832,7 +832,7 @@ _init_logfile (void)
 		filename, name, getpid());
 
 	filename = buf;
-
+    } else {
 	setenv ("CAIRO_TRACE_FD", "-1", 1);
     }
 


More information about the cairo-commit mailing list