]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
ply-pixel-buffer: Fix bottom edge rendering of scaled buffers
authorHans de Goede <hdegoede@redhat.com>
Sat, 12 Oct 2019 10:38:25 +0000 (12:38 +0200)
committerHans de Goede <hdegoede@redhat.com>
Sat, 12 Oct 2019 10:48:51 +0000 (12:48 +0200)
Commit 4e1c00b89a71 (" ply-pixel-buffer: Fix right and bottom edge rendering
of scaled buffers"), which tried to fix a minor rendering issue with the right
and bottom edge of scaled images, contains a typo which actually makes things
worse :|

When checking if iy exceeds the height of the image, ix gets set to the height
instead of iy leading to addressing pass part of the buffer which leads to
various rendering artifacts.

This commit fixes the typo and thus also the artifacts.

Fixes: #83
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
src/libply-splash-core/ply-pixel-buffer.c

index aa4b344ec3303539b4dff9b47b11cba1e0d8c765..cc55a6ff505184718f0fd8521827c5d0bbc1410f 100644 (file)
@@ -671,7 +671,7 @@ ply_pixels_interpolate (uint32_t *bytes,
                                 ix = width - 1;
 
                         if (iy >= height)
-                                ix = height - 1;
+                                iy = height - 1;
 
                         if (ix < 0 || iy < 0)
                                 pixels[offset_y][offset_x] = 0x00000000;