2008-06-30 Matthew Allum <mallum@openedhand.com>

Bug 1007 - Fix TFP fallback mechanism

        * clutter/glx/clutter-glx-texture-pixmap.c:
        * clutter/x11/clutter-x11-texture-pixmap.c:
        Add some extra safety to glx pixmap creations and tidy up some notes.
        Patch from Gwenole Beauchesne.
This commit is contained in:
Matthew Allum 2008-06-30 16:06:36 +00:00
parent 06d0696874
commit 7d59aa3da0
3 changed files with 23 additions and 9 deletions

View File

@ -1,3 +1,12 @@
2008-06-30 Matthew Allum <mallum@openedhand.com>
Bug 1007 - Fix TFP fallback mechanism
* clutter/glx/clutter-glx-texture-pixmap.c:
* clutter/x11/clutter-x11-texture-pixmap.c:
Add some extra safety to glx pixmap creations and tidy up some notes.
Patch from Gwenole Beauchesne.
2008-06-30 Neil Roberts <neil@o-hand.com>
* clutter/x11/clutter-event-x11.c:

View File

@ -499,7 +499,7 @@ clutter_glx_texture_pixmap_create_glx_pixmap (ClutterGLXTexturePixmap *texture)
goto cleanup;
}
quality = clutter_texture_get_filter_quality (CLUTTER_TEXTURE(texture));
quality = clutter_texture_get_filter_quality (CLUTTER_TEXTURE (texture));
if (quality == CLUTTER_TEXTURE_QUALITY_HIGH)
mipmap = 1;
@ -523,7 +523,12 @@ clutter_glx_texture_pixmap_create_glx_pixmap (ClutterGLXTexturePixmap *texture)
attribs);
XSync (dpy, FALSE);
if (clutter_x11_untrap_x_errors ())
CLUTTER_NOTE (TEXTURE, "Failed to create GLXPixmap");
{
CLUTTER_NOTE (TEXTURE, "Failed to create GLXPixmap");
/* Make sure we don't think the call actually succeeded */
glx_pixmap = None;
}
g_free (fbconfig);
@ -565,7 +570,7 @@ clutter_glx_texture_pixmap_update_area (ClutterX11TexturePixmap *texture,
Display *dpy;
CLUTTER_NOTE (TEXTURE, "Updaing texture pixmap");
CLUTTER_NOTE (TEXTURE, "Updating texture pixmap");
priv = CLUTTER_GLX_TEXTURE_PIXMAP (texture)->priv;
dpy = clutter_x11_get_default_display();
@ -575,7 +580,7 @@ clutter_glx_texture_pixmap_update_area (ClutterX11TexturePixmap *texture,
if (priv->use_fallback)
{
CLUTTER_NOTE (TEXTURE, "Falling back to X11..");
CLUTTER_NOTE (TEXTURE, "Falling back to X11");
parent_class->update_area (texture,
x, y,
width, height);

View File

@ -127,7 +127,7 @@ check_extensions (ClutterX11TexturePixmap *texture)
if (!XDamageQueryExtension (dpy,
&_damage_event_base, &damage_error))
{
g_warning ("No Damage extension\n");
g_warning ("No Damage extension");
return FALSE;
}
@ -213,7 +213,7 @@ try_alloc_shm (ClutterX11TexturePixmap *texture)
goto failed_xshmattach;
if (clutter_x11_untrap_x_errors ())
g_warning ("X Error: Failed to setup XShm.");
g_warning ("X Error: Failed to setup XShm");
priv->have_shm = TRUE;
return TRUE;
@ -230,7 +230,7 @@ failed_shmget:
failed_image_create:
if (clutter_x11_untrap_x_errors ())
g_warning ("X Error: Failed to setup XShm.");
g_warning ("X Error: Failed to setup XShm");
priv->have_shm = FALSE;
return FALSE;
@ -662,7 +662,7 @@ clutter_x11_texture_pixmap_update_area_real (ClutterX11TexturePixmap *texture,
if ((err_code = clutter_x11_untrap_x_errors ()))
{
g_warning ("Failed to get XImage of pixmap: %lx, removing.",
g_warning ("Failed to get XImage of pixmap: %lx, removing",
priv->pixmap);
/* safe to assume pixmap has gone away? - therefor reset */
clutter_x11_texture_pixmap_set_pixmap (texture, None);
@ -882,7 +882,7 @@ clutter_x11_texture_pixmap_set_pixmap (ClutterX11TexturePixmap *texture,
if (clutter_x11_untrap_x_errors () || status == 0)
{
if (pixmap != None)
g_warning ("Unable to query pixmap: %lx\n", pixmap);
g_warning ("Unable to query pixmap: %lx", pixmap);
pixmap = None;
width = height = depth = 0;
}