[Xfce4-commits] [xfce/xfwm4] 02/03: compositor: Use buffer number

noreply at xfce.org noreply at xfce.org
Tue May 28 22:44:15 CEST 2019


This is an automated email from the git hooks/post-receive script.

o   l   i   v   i   e   r       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfwm4.

commit 7eb506e3906f15d9c3420c6218bf4f240b61f35b
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Tue May 28 21:44:01 2019 +0200

    compositor: Use buffer number
    
    Instead of passing the pixmap id around.
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/compositor.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index 06cbd2d..d4b8415 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1374,7 +1374,7 @@ init_glx (ScreenInfo *screen_info)
 }
 
 static GLXDrawable
-create_glx_drawable (ScreenInfo *screen_info, Pixmap pixmap)
+create_glx_drawable (ScreenInfo *screen_info, gushort buffer)
 {
     int pixmap_attribs[] = {
         GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_2D_EXT,
@@ -1384,7 +1384,6 @@ create_glx_drawable (ScreenInfo *screen_info, Pixmap pixmap)
     GLXDrawable glx_drawable;
 
     g_return_val_if_fail (screen_info != NULL, None);
-    g_return_val_if_fail (pixmap != None, None);
     TRACE ("entering");
 
     pixmap_attribs[1] = screen_info->texture_target;
@@ -1392,9 +1391,10 @@ create_glx_drawable (ScreenInfo *screen_info, Pixmap pixmap)
 
     glx_drawable = glXCreatePixmap (myScreenGetXDisplay (screen_info),
                                     screen_info->glx_fbconfig,
-                                    pixmap, pixmap_attribs);
+                                    screen_info->rootPixmap[buffer],
+                                    pixmap_attribs);
     check_gl_error();
-    TRACE ("created GLX pixmap 0x%lx from Pixmap 0x%lx", glx_drawable, pixmap);
+    TRACE ("created GLX pixmap 0x%lx for buffer %i", glx_drawable, buffer);
 
     return glx_drawable;
 }
@@ -1524,10 +1524,9 @@ fence_destroy (ScreenInfo *screen_info, gushort buffer)
 }
 
 static void
-bind_glx_texture (ScreenInfo *screen_info, Pixmap pixmap)
+bind_glx_texture (ScreenInfo *screen_info, gushort buffer)
 {
     g_return_if_fail (screen_info != NULL);
-    g_return_if_fail (pixmap != None);
     TRACE ("entering");
 
     if (screen_info->rootTexture == None)
@@ -1537,7 +1536,7 @@ bind_glx_texture (ScreenInfo *screen_info, Pixmap pixmap)
     }
     if (screen_info->glx_drawable == None)
     {
-        screen_info->glx_drawable = create_glx_drawable (screen_info, pixmap);
+        screen_info->glx_drawable = create_glx_drawable (screen_info, buffer);
     }
     TRACE ("(re)Binding GLX pixmap 0x%lx to texture 0x%x",
            screen_info->glx_drawable, screen_info->rootTexture);
@@ -2129,8 +2128,7 @@ paint_all (ScreenInfo *screen_info, XserverRegion region, gushort buffer)
 #ifdef HAVE_EPOXY
         if (screen_info->use_glx)
         {
-            bind_glx_texture (screen_info,
-                              screen_info->rootPixmap[buffer]);
+            bind_glx_texture (screen_info, buffer);
             fence_create (screen_info, buffer);
         }
 #endif /* HAVE_EPOXY */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list