[mutter] Check for TFP usage after actually setting the pixmap



commit ce1ffa46244a5442fa0a3d2568a2b781918e9a39
Author: Adel Gadllah <adel gadllah gmail com>
Date:   Fri Jul 30 16:16:55 2010 +0200

    Check for TFP usage after actually setting the pixmap
    
    Starting with clutter 1.4 clutter / cogl only knows whether TFP is in use after
    setting the pixmap, so doing the check before setting the pixmap will just
    lead to a wrong message.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=624757

 src/compositor/mutter-window.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/compositor/mutter-window.c b/src/compositor/mutter-window.c
index 377611f..eb90c9d 100644
--- a/src/compositor/mutter-window.c
+++ b/src/compositor/mutter-window.c
@@ -358,10 +358,6 @@ mutter_window_constructed (GObject *object)
     {
       priv->actor = mutter_shaped_texture_new ();
 
-      if (!clutter_glx_texture_pixmap_using_extension (
-                                  CLUTTER_GLX_TEXTURE_PIXMAP (priv->actor)))
-        g_warning ("NOTE: Not using GLX TFP!\n");
-
       clutter_container_add_actor (CLUTTER_CONTAINER (self), priv->actor);
 
       /*
@@ -1621,6 +1617,14 @@ check_needs_pixmap (MutterWindow *self)
       clutter_x11_texture_pixmap_set_pixmap
                        (CLUTTER_X11_TEXTURE_PIXMAP (priv->actor),
                         priv->back_pixmap);
+      /*
+       * This only works *after* actually setting the pixmap, so we have to
+       * do it here.
+       * See: http://bugzilla.clutter-project.org/show_bug.cgi?id=2236
+       */
+      if (!clutter_glx_texture_pixmap_using_extension (
+                                  CLUTTER_GLX_TEXTURE_PIXMAP (priv->actor)))
+        g_warning ("NOTE: Not using GLX TFP!\n");
 
       g_object_get (priv->actor,
                     "pixmap-width", &pxm_width,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]