Commit Graph

15 Commits

Author SHA1 Message Date
Kim Woelders 82db0b0e29 test_grab: Debug tweak 2023-03-06 08:37:00 +01:00
Kim Woelders 3b21892c77 x11_grab: Clear image pixels not actually grabbed
When using imlib_create[_scaled]_image_from_drawable() with non-zero
source offsets the output image could contain pixels either not set or
copied from uninitialised parts of intermediary pixmap.
2023-03-06 06:58:48 +01:00
Kim Woelders 51d74520fc test_grab: Check get-mask-from-shape too
Since only pixmap grabbing is tested for now, testing mask handling
just checks that we don't do something silly (like getting shape from
pixmap).
2023-03-05 19:24:50 +01:00
Kim Woelders 567bb5aa75 test_grab: Add some tests for imlib_copy_drawable_to_image() 2023-03-05 19:24:13 +01:00
Kim Woelders 31c8f06215 test_grab: Update 2023-03-05 19:24:13 +01:00
Kim Woelders 9657d6a291 test_grab: Rearrange code 2023-02-19 16:57:20 +01:00
Kim Woelders 18d0befc57 Use stdint types instead of DATA32 etc.
This should make things slightly more consistent and unambiguous, and
the stdint types are already used here and there (in loaders).

I'm not aware of any systems where this change makes any difference.
If there are targets out there with 64 bit ints imlib2 might now work
there and on targets with 16 bit ints it most likely still doesn't.
2022-03-26 15:54:40 +01:00
Kim Woelders b0f3bfc907 test_grab: Enable testing depths other than 24 and 32
Also test with/without using a mask when grabbing (just a "full" one for
now to hit different grabber paths).
2022-03-07 21:46:56 +01:00
Kim Woelders ac1d4b0520 Deal consistently with including Imlib2.h
- Always include config.h before Imlib2.h
  Needed for X_DISPLAY_MISSING.
- Always include config.h and Imlib2.h first
  Should make it more likely to spot stuff missing but required
  in Imlib2.h, like stddef.h.
  gtest.h apparently must be included before X headers though.
- Make sure we use the Imlib2.h here and not the one in /usr/include

Also ensure that the tests build when building without X.
2022-03-03 07:35:39 +01:00
Kim Woelders 79a5086b58 test: Merge common stuff 2022-02-06 13:07:47 +01:00
Kim Woelders da2ce0d94b test: Move generated image files out of source dir
Simplifies cleaning up.
2022-01-18 20:40:59 +01:00
Kim Woelders e0e4f883e9 test_grab: Add scale-down tests 2021-11-25 15:46:23 +01:00
Kim Woelders 00d050901d test_grab: Cleanups, cosmetics 2021-11-25 15:46:23 +01:00
Kim Woelders 6e27c1e2c3 Fix y-upscaling in imlib_create_scaled_image_from_drawable() 2021-11-25 15:45:56 +01:00
Kim Woelders 008e4e9fd4 test: Add X11 drawable grabbing test 2021-11-23 20:33:25 +01:00