]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
ply-pixel-buffer: Fix marking buffers as opaque when doing a solid fill
authorHans de Goede <hdegoede@redhat.com>
Fri, 9 Nov 2018 22:05:24 +0000 (23:05 +0100)
committerHans de Goede <hdegoede@redhat.com>
Tue, 27 Nov 2018 07:48:56 +0000 (08:48 +0100)
Instead of comparing fill_area addresses actually compare the contents
of the ply_rectangles.

This allows us to use the memcpy fastpath in ply_pixel_buffer_with_buffer
more often.

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

index 04aa0d663f480d80d2263b450f204af43a4bb1bd..86e8e3f070be4802b3c6edc3739b6cd032e04e24 100644 (file)
@@ -315,7 +315,7 @@ ply_pixel_buffer_fill_area_with_pixel_value (ply_pixel_buffer_t *buffer,
         /* If we're filling the entire buffer with a fully opaque color,
          * then make note of it
          */
-        if (fill_area == &buffer->area &&
+        if (memcmp(fill_area, &buffer->area, sizeof(ply_rectangle_t)) == 0 &&
             (pixel_value >> 24) == 0xff) {
                 buffer->is_opaque = true;
         }