From ffa2310a34d42237b9f64c769bb11810bd2f233b Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 21 Jul 2011 17:44:06 +0100 Subject: [PATCH] Use Cogl API to check for TfP extension support Do not use the ClutterGLXTexturePixmap method, since it's been deprecated and it's just a convenience function around the Cogl API anyway. https://bugzilla.gnome.org/show_bug.cgi?id=655064 --- src/compositor/meta-window-actor.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index acf09e15a..da0daf03d 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -11,6 +11,8 @@ #include #include +#define COGL_ENABLE_EXPERIMENTAL_API +#include #include /* for gdk_rectangle_union() */ #include @@ -1869,6 +1871,19 @@ meta_window_actor_reset_visible_regions (MetaWindowActor *self) meta_window_actor_clear_shadow_clip (self); } +static gboolean +texture_pixmap_using_extension (ClutterX11TexturePixmap *texture) +{ + ClutterTexture *self = CLUTTER_TEXTURE (texture); + CoglHandle handle; + + handle = clutter_texture_get_cogl_texture (self); + + return handle != NULL && + cogl_is_texture_pixmap_x11 (handle) && + cogl_texture_pixmap_x11_is_using_tfp_extension (handle); +} + static void check_needs_pixmap (MetaWindowActor *self) { @@ -1939,11 +1954,8 @@ check_needs_pixmap (MetaWindowActor *self) * do it here. * See: http://bugzilla.clutter-project.org/show_bug.cgi?id=2236 */ -#ifdef HAVE_GLX_TEXTURE_PIXMAP - if (G_UNLIKELY (!clutter_glx_texture_pixmap_using_extension ( - CLUTTER_GLX_TEXTURE_PIXMAP (priv->actor)))) + if (G_UNLIKELY (!texture_pixmap_using_extension (CLUTTER_X11_TEXTURE_PIXMAP (priv->actor)))) g_warning ("NOTE: Not using GLX TFP!\n"); -#endif g_object_get (priv->actor, "pixmap-width", &pxm_width,