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

git pushed a commit to branch master
in repository legacy-imlib2.

View the commit online.

commit faf0f175a51dcb0007cd14ec5bde27ba0ab25e9d
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Fri Apr 19 16:54:27 2024 +0200

    imlib2_view: Optionally disable final anti-aliased rendering
---
 src/bin/imlib2_view.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/bin/imlib2_view.c b/src/bin/imlib2_view.c
index 2899242..82f66ef 100644
--- a/src/bin/imlib2_view.c
+++ b/src/bin/imlib2_view.c
@@ -36,6 +36,7 @@ static bool     opt_cache = false;
 static bool     opt_progr = true;       /* Render through progress callback */
 static bool     opt_scale = false;
 static bool     opt_cbalt = false;      /* Alternate checkerboard colors (red/green) */
+static bool     opt_aa_final = true;    /* Do final anti-aliased rendering */
 static double   opt_scale_x = 1.;
 static double   opt_scale_y = 1.;
 static double   opt_sgrab_x = 1.;
@@ -65,6 +66,7 @@ static int      animloop = 0;   /* Animation loop count          */
    "Usage:\n" \
    "  imlib2_view [OPTIONS] {FILE | XID}...\n" \
    "OPTIONS:\n" \
+   "  -a         : Disable final anti-aliased rendering\n" \
    "  -c         : Enable image caching (implies -e)\n" \
    "  -d         : Enable debug\n" \
    "  -e         : Do rendering explicitly (not via progress callback)\n" \
@@ -611,10 +613,13 @@ main(int argc, char **argv)
 
     verbose = 0;
 
-    while ((opt = getopt(argc, argv, "cdeg:l:ps:S:t:v")) != -1)
+    while ((opt = getopt(argc, argv, "acdeg:l:ps:S:t:v")) != -1)
     {
         switch (opt)
         {
+        case 'a':
+            opt_aa_final = false;
+            break;
         case 'c':
             opt_cache = true;
             opt_progr = false;  /* Cached images won't give progress callbacks */
@@ -876,8 +881,11 @@ main(int argc, char **argv)
         }
         else if (count == 0)
         {
-            /* "Final" (delayed) re-rendering with AA */
-            bg_pm_redraw(zx, zy, zoom, 1);
+            if (opt_aa_final)
+            {
+                /* "Final" (delayed) re-rendering with AA */
+                bg_pm_redraw(zx, zy, zoom, 1);
+            }
         }
     }
 

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

Reply via email to