[Xfce4-commits] [xfce/xfwm4] 01/01: compositor: Apply texture filter for zooming

noreply at xfce.org noreply at xfce.org
Sun May 12 17:56:51 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 14cd399a6e518a52e0d9944711f97e8e1741e2a4
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Sun May 12 17:52:39 2019 +0200

    compositor: Apply texture filter for zooming
    
    Bug: 15392
    
    The texture filter changes based on the zoom value to give best results
    when zooming at higher levels.
    
    As we do not unbind/rebind at each repaint anymore, the texture filter
    would not be updated, hence the chosen filter is ignored.
    
    Make sure we apply the texture filter when zooming.
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/compositor.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index 85818f8..a2c7557 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1501,12 +1501,6 @@ bind_glx_texture (ScreenInfo *screen_info, Pixmap pixmap)
     enable_glx_texture (screen_info);
     glXBindTexImageEXT (myScreenGetXDisplay (screen_info),
                         screen_info->glx_drawable, GLX_FRONT_EXT, NULL);
-    glTexParameteri(screen_info->texture_type,
-                    GL_TEXTURE_MIN_FILTER,
-                    screen_info->texture_filter);
-    glTexParameteri(screen_info->texture_type,
-                    GL_TEXTURE_MAG_FILTER,
-                    screen_info->texture_filter);
 
     check_gl_error();
 }
@@ -1597,6 +1591,10 @@ redraw_glx_texture (ScreenInfo *screen_info, XserverRegion region)
         double x = XFixedToDouble (xp) / (screen_info->width * zoom);
         double y = XFixedToDouble (yp) / (screen_info->height * zoom);
 
+        glTexParameteri(screen_info->texture_type,
+                        GL_TEXTURE_MAG_FILTER,
+                        screen_info->texture_filter);
+
         scale_glx_texture (screen_info, screen_info->width, screen_info->height, zoom);
         glTranslated (x, y, 0.0);
         redraw_glx_screen (screen_info);

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


More information about the Xfce4-commits mailing list