Commit Graph

1745 Commits

Author SHA1 Message Date
Kim Woelders b28d9110e4 updates: Reduce memory usage
Apparently, sizeof(struct _tile) was 4 (gcc 11.2.1) ?!?
Weird - I think that once upon a time it was 1.
Anyway, avoid having ill defined struct size.

Also, simplify logic a bit (no need to deal with .usage as bit flags.
2021-12-21 06:05:32 +01:00
Kim Woelders f9e0e92189 Loader loading: Avoid access to uninitialized load() item 2021-12-21 06:05:18 +01:00
Kim Woelders f1bef7ae01 debug: Avoid use of uninitialized data 2021-12-21 06:05:18 +01:00
Kim Woelders 82bbd0a278 Indent 2021-12-21 06:05:18 +01:00
Kim Woelders 6ce28a9380 ICO loader: Debug tweaks 2021-12-19 14:58:43 +01:00
Kim Woelders 179d3b7e05 GIF loader: Multiframe support 2021-12-19 14:58:43 +01:00
Kim Woelders bdfcc554ed GIF loader: Some refactoring, add debug 2021-12-19 14:58:43 +01:00
Kim Woelders 7a0022684d ICO loader: Multiframe support 2021-12-19 14:58:43 +01:00
Kim Woelders b2ac97d93a WEBP loader: Multiframe support 2021-12-19 14:58:43 +01:00
Kim Woelders 549ff77b85 debug: Add DL macro for additional loader debug 2021-12-19 14:58:43 +01:00
Kim Woelders f09d3d022a imlib2_view: Add support for multiframe images 2021-12-19 14:58:43 +01:00
Kim Woelders fdd6419fe4 imlib2_load: Add support for multiframe images 2021-12-19 14:58:43 +01:00
Kim Woelders d105b29017 Enable caching for multiframe images 2021-12-19 14:58:43 +01:00
Kim Woelders 1a57db7dcb Add support for multiframe (animated) images 2021-12-19 14:58:43 +01:00
Kim Woelders d792aaa130 imlib2_view: Fix caching option
As imlib2_view did rendering via the (loader) progress callback, cached
images wouldn't be rendered.
Now, when caching is enabled, we don't use progress callbacks but render
explicitly after the image is loaded.
2021-12-19 09:32:53 +01:00
Kim Woelders 343b2041cf debug: Add some image caching debug 2021-12-19 09:32:34 +01:00
Kim Woelders b5e2bd146d imlib2_view: Tweaks around timeout 2021-12-19 09:32:34 +01:00
Kim Woelders d8e2f7a32d imlib2_view: Remove some pointless function calls 2021-12-19 09:32:13 +01:00
Kim Woelders d5c23565bd imlib2_view: Refactor pixmap rendering 2021-12-18 23:05:36 +01:00
Kim Woelders eb7eee0dfc imlib2_view: Move window background image init to separate function 2021-12-18 23:05:36 +01:00
Kim Woelders f2d98a2c15 imlib2_view: Add 'r' command to refresh 2021-12-18 23:05:29 +01:00
Kim Woelders 45575222f5 imlib2_view: Cosmetics (if -> switch) 2021-12-18 23:03:28 +01:00
Kim Woelders 104f330c9f Trivial cleanups 2021-12-18 06:07:08 +01:00
Kim Woelders 52b0752af4 Pass parameters to __imlib_LoadImage() by struct
Makes it much easier to change stuff.
2021-12-18 06:07:08 +01:00
Kim Woelders 8470ecec66 Use __func__ instead of open coded function names
We are already requiring C99, at least since the recent initial context
changes.
2021-12-18 06:07:08 +01:00
Kim Woelders 89def8bab3 Drop context check/init in API functions
Obsolete as we now have an initial static one.
2021-12-10 19:29:46 +01:00
Kim Woelders 8370777a31 Make initial context static
Avoids having to check on every API function call.
2021-12-08 19:12:29 +01:00
Kim Woelders 01d76b56a0 Drop context image save/restore around __imlib_Load/SaveImage() calls
Should not be necessary.
2021-12-06 14:30:30 +01:00
Kim Woelders dbdea2a4a6 test: Add context test 2021-12-06 14:30:30 +01:00
Kim Woelders fe8ef27575 1.7.5 2021-12-06 07:26:23 +01:00
Kim Woelders 1216f11686 Update doc for imlib_load_image_fd() 2021-12-06 07:08:06 +01:00
Kim Woelders 273a7aaac3 Refactor condition for using assembly functions
Makes it easier to override the decision for testing.

Setting IMLIB2_ASM_OFF will now disable use of assembly functions.
2021-12-04 15:14:50 +01:00
Kim Woelders b1208a1333 Refactoring around mmx and scaling function calls
Move call to __imlib_Scale_mmx_AARGBA() into __imlib_ScaleAARGBA() and
__imlib_ScaleAARGB().

Similar to mmx/rotation handling.
2021-12-04 06:55:21 +01:00
Kim Woelders 1411f6ac69 Refactoring around mmx and rotate function calls
Move call to __imlib_mmx_RotateAA() into __imlib_RotateAA().

Avoids some code duplication.
2021-12-04 06:55:21 +01:00
Kim Woelders 9b29249619 test: Add some scaling/rotation tests 2021-12-04 06:55:21 +01:00
Kim Woelders 074c408608 test_save: Check images with alpha too 2021-12-04 06:55:21 +01:00
Kim Woelders f935f31bad Simplify build wrt. asm files 2021-12-04 06:55:21 +01:00
Kim Woelders 8f28d7d706 blend.c: Tweaks, cleanups 2021-12-04 06:55:11 +01:00
Kim Woelders 152366c87e Avoid "exceeds maximum object size" warning
..for 32 bit arch too.
2021-12-02 18:10:18 +01:00
Kim Woelders 84343e5a61 Avoid signedness warning 2021-12-02 18:10:18 +01:00
Kim Woelders 5627edbb76 Speedup in imlib_create_scaled_image_from_drawable()
Avoid intermediate pixmap copy when scaling 1:1 with no offset.
2021-11-29 17:37:20 +01:00
Kim Woelders b2d7af466e x11_grab.c: Introduce function to get shape mask
Avoiding some code duplication.
2021-11-29 17:37:20 +01:00
Kim Woelders 314fb50e92 x11_grab.c: Cosmetics 2021-11-29 17:37:20 +01:00
Kim Woelders 5ab0fa77f1 imlib2_view: Enable grabbing/viewing drawables 2021-11-29 17:37:20 +01:00
Kim Woelders 1471e92f62 Only set MAINTAINERCLEANFILES in top-level Makefile.am
Less likely to forget one (currently in test/).
2021-11-29 17:37:20 +01:00
NRK 524d439adf WEBP loader: fix key selecting last frame
as far as i can tell, iter is being used uninitialized here leading to
reading garbage values resulting in the last frame always being selected
when key is present.
2021-11-29 17:37:20 +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 add72b4023 x11_grab.c: Rename source/destination variables for clarity 2021-11-25 09:17:50 +01:00