-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: rxvt-unicode-sixel
action: commit
revision:
path_from:
revision_from: 569873780e77b01ef42d3834c49595f5adca7cf8:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

git://git.thebackupbox.net/rxvt-unicode-sixel

commit 569873780e77b01ef42d3834c49595f5adca7cf8
Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Date:   Fri May 11 08:16:58 2012 +0000

    Rewrite loop optimized for 32-bit bpp to be more similar to the general one.

diff --git a/src/background.C b/src/background.C

index c66ac864d65323680334e6035d35e9679b7c4009..

index ..8c6e1dcff5537a24c5efe62482666665d0ee232f 100644

--- a/src/background.C
+++ b/src/background.C
@@ -1289,22 +1289,20 @@ rxvt_term::tint_ximage (Visual *visual, XImage *ximage)
       && (ximage->depth == 24 || ximage->depth == 32)
       && ximage->byte_order == host_byte_order)
     {
-      uint32_t *p1, *pf, *p, *pl;
-      p1 = (uint32_t *) ximage->data;
-      pf = (uint32_t *) (ximage->data + ximage->height * ximage->bytes_per_line);
+      char *line = ximage->data;

-      while (p1 < pf)
+      for (int y = 0; y < ximage->height; y++)
         {
-          p = p1;
-          pl = p1 + ximage->width;
-          for (; p < pl; p++)
+          uint32_t *p = (uint32_t *)line;
+          for (int x = 0; x < ximage->width; x++)
             {
               *p = lookup_r[(*p & 0xff0000) >> 16] |
                    lookup_g[(*p & 0x00ff00) >> 8] |
                    lookup_b[(*p & 0x0000ff)] |
                    (*p & 0xff000000);
+              p++;
             }
-          p1 = (uint32_t *) ((char *) p1 + ximage->bytes_per_line);
+          line += ximage->bytes_per_line;
         }
     }
   else

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 11:04:31 2024