This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository legacy-imlib2.
View the commit online.
commit 5ea6a407cf8a7a30435741864baeba21e8c3410a
Author: Kim Woelders <[email protected]>
AuthorDate: Fri Feb 17 14:25:53 2023 +0100
imlib_create_scaled_image_from_drawable(): Simplify call path
On 1:1 scaling call __imlib_GrabDrawableToRGBA() directly instead of
going through __imlib_GrabDrawableScaledToRGBA().
This fixes 1:1 grabbing of pixmaps.
Non-1:1 pixmaps grabs are still not ok (window grabs are).
---
src/lib/api_x11.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/lib/api_x11.c b/src/lib/api_x11.c
index 4e4c957..dcd1d78 100644
--- a/src/lib/api_x11.c
+++ b/src/lib/api_x11.c
@@ -361,12 +361,23 @@ imlib_create_scaled_image_from_drawable(Pixmap mask, int src_x, int src_y,
domask = mask != 0 || get_mask_from_shape;
- err = __imlib_GrabDrawableScaledToRGBA(im->data, 0, 0, dst_width, dst_height,
- ctx->display, ctx->drawable, mask,
- ctx->visual, ctx->colormap,
- ctx->depth,
- src_x, src_y, src_width, src_height,
- &domask, need_to_grab_x);
+ if (src_width == dst_width && src_height == dst_height)
+ err = __imlib_GrabDrawableToRGBA(im->data,
+ 0, 0, dst_width, dst_height,
+ ctx->display, ctx->drawable, mask,
+ ctx->visual, ctx->colormap,
+ ctx->depth,
+ src_x, src_y, src_width, src_height,
+ &domask, need_to_grab_x);
+ else
+ err = __imlib_GrabDrawableScaledToRGBA(im->data,
+ 0, 0, dst_width, dst_height,
+ ctx->display, ctx->drawable, mask,
+ ctx->visual, ctx->colormap,
+ ctx->depth,
+ src_x, src_y,
+ src_width, src_height,
+ &domask, need_to_grab_x);
if (err)
{
__imlib_FreeImage(im);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.