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 ad22ac8b8eb0799cee4d7321e963334d46b9deec
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Fri Oct 4 19:57:36 2024 +0200
scale/blend: Add some missing consts
---
src/lib/blend.c | 20 +++++++++++---------
src/lib/blend.h | 12 ++++++------
src/lib/scale.c | 39 +++++++++++++++++++++++----------------
src/lib/scale.h | 8 ++++----
4 files changed, 44 insertions(+), 35 deletions(-)
diff --git a/src/lib/blend.c b/src/lib/blend.c
index 1e68c22..5cd5287 100644
--- a/src/lib/blend.c
+++ b/src/lib/blend.c
@@ -1510,7 +1510,7 @@ __imlib_ReCopyRGBToRGBACmod(uint32_t *src, int srcw, uint32_t *dst, int dstw,
ImlibBlendFunction
__imlib_GetBlendFunction(ImlibOp op, char blend, char merge_alpha, char rgb_src,
- ImlibColorModifier *cm)
+ const ImlibColorModifier *cm)
{
/*\ [ mmx ][ operation ][ cmod ][ merge_alpha ][ rgb_src ][ blend ] \ */
static const ImlibBlendFunction ibfuncs[][4][2][2][2][2] = {
@@ -1746,10 +1746,11 @@ __imlib_GetBlendFunction(ImlibOp op, char blend, char merge_alpha, char rgb_src,
}
void
-__imlib_BlendRGBAToData(uint32_t *src, int src_w, int src_h, uint32_t *dst,
- int dst_w, int dst_h, int sx, int sy, int dx, int dy,
- int w, int h, char blend, char merge_alpha,
- ImlibColorModifier *cm, ImlibOp op, char rgb_src)
+__imlib_BlendRGBAToData(const uint32_t *src, int src_w, int src_h,
+ uint32_t *dst, int dst_w, int dst_h,
+ int sx, int sy, int dx, int dy, int w, int h,
+ char blend, char merge_alpha,
+ const ImlibColorModifier *cm, ImlibOp op, char rgb_src)
{
ImlibBlendFunction blender;
@@ -1793,18 +1794,19 @@ __imlib_BlendRGBAToData(uint32_t *src, int src_w, int src_h, uint32_t *dst,
__imlib_build_pow_lut();
blender = __imlib_GetBlendFunction(op, blend, merge_alpha, rgb_src, cm);
if (blender)
- blender(src + (sy * src_w) + sx, src_w,
- dst + (dy * dst_w) + dx, dst_w, w, h, cm);
+ blender((uint32_t *) src + (sy * src_w) + sx, src_w,
+ dst + (dy * dst_w) + dx, dst_w, w, h,
+ (ImlibColorModifier *) cm);
}
#define LINESIZE 16
void
-__imlib_BlendImageToImage(ImlibImage *im_src, ImlibImage *im_dst,
+__imlib_BlendImageToImage(const ImlibImage *im_src, ImlibImage *im_dst,
char aa, char blend, char merge_alpha,
int ssx, int ssy, int ssw, int ssh,
int ddx, int ddy, int ddw, int ddh,
- ImlibColorModifier *cm, ImlibOp op,
+ const ImlibColorModifier *cm, ImlibOp op,
int clx, int cly, int clw, int clh)
{
char rgb_src = 0;
diff --git a/src/lib/blend.h b/src/lib/blend.h
index a1aa278..458de53 100644
--- a/src/lib/blend.h
+++ b/src/lib/blend.h
@@ -309,24 +309,24 @@ typedef void (*ImlibBlendFunction)(uint32_t *, int, uint32_t *, int, int,
ImlibBlendFunction __imlib_GetBlendFunction(ImlibOp op, char merge_alpha,
char blend, char rgb_src,
- ImlibColorModifier * cm);
-void __imlib_BlendImageToImage(ImlibImage * im_src,
+ const ImlibColorModifier * cm);
+void __imlib_BlendImageToImage(const ImlibImage * im_src,
ImlibImage * im_dst, char aa,
char blend, char merge_alpha,
int ssx, int ssy,
int ssw, int ssh,
int ddx, int ddy,
int ddw, int ddh,
- ImlibColorModifier * cm,
+ const ImlibColorModifier * cm,
ImlibOp op, int clx, int cly,
int clw, int clh);
-void __imlib_BlendRGBAToData(uint32_t * src, int src_w,
+void __imlib_BlendRGBAToData(const uint32_t * src, int src_w,
int src_h, uint32_t * dst,
int dst_w, int dst_h, int sx,
int sy, int dx, int dy, int w,
int h, char blend, char merge_alpha,
- ImlibColorModifier * cm, ImlibOp op,
- char rgb_src);
+ const ImlibColorModifier * cm,
+ ImlibOp op, char rgb_src);
void __imlib_build_pow_lut(void);
/* *INDENT-OFF* */
diff --git a/src/lib/scale.c b/src/lib/scale.c
index e04c388..2122268 100644
--- a/src/lib/scale.c
+++ b/src/lib/scale.c
@@ -197,7 +197,8 @@ __imlib_FreeScaleInfo(ImlibScaleInfo *isi)
}
ImlibScaleInfo *
-__imlib_CalcScaleInfo(ImlibImage *im, int sw, int sh, int dw, int dh, bool aa)
+__imlib_CalcScaleInfo(const ImlibImage *im, int sw, int sh, int dw, int dh,
+ bool aa)
{
ImlibScaleInfo *isi;
int scw, sch;
@@ -249,11 +250,13 @@ __imlib_CalcScaleInfo(ImlibImage *im, int sw, int sh, int dw, int dh, bool aa)
/* scale by pixel sampling only */
static void
-__imlib_ScaleSampleRGBA(ImlibScaleInfo *isi, uint32_t *srce, uint32_t *dest,
- int dxx, int dyy, int dx, int dy, int dw, int dh,
- int dow, int sow)
+__imlib_ScaleSampleRGBA(const ImlibScaleInfo *isi,
+ const uint32_t *srce, uint32_t *dest,
+ int dxx, int dyy, int dx, int dy,
+ int dw, int dh, int dow, int sow)
{
- uint32_t *sptr, *dptr;
+ const uint32_t *sptr;
+ uint32_t *dptr;
int x, y, end;
int *ypoints = isi->ypoints;
int *xpoints = isi->xpoints;
@@ -277,11 +280,13 @@ __imlib_ScaleSampleRGBA(ImlibScaleInfo *isi, uint32_t *srce, uint32_t *dest,
/* scale by area sampling */
static void
-__imlib_ScaleAARGBA(ImlibScaleInfo *isi, uint32_t *srce, uint32_t *dest,
- int dxx, int dyy, int dx, int dy, int dw, int dh, int dow,
- int sow)
+__imlib_ScaleAARGBA(const ImlibScaleInfo *isi,
+ const uint32_t *srce, uint32_t *dest,
+ int dxx, int dyy, int dx, int dy, int dw, int dh,
+ int dow, int sow)
{
- uint32_t *sptr, *dptr, *pix;
+ const uint32_t *sptr, *pix;
+ uint32_t *dptr;
int r, g, b, a;
int x, y, end;
int *ypoints;
@@ -681,11 +686,13 @@ __imlib_ScaleAARGBA(ImlibScaleInfo *isi, uint32_t *srce, uint32_t *dest,
/* scale by area sampling - IGNORE the ALPHA byte*/
static void
-__imlib_ScaleAARGB(ImlibScaleInfo *isi, uint32_t *srce, uint32_t *dest,
- int dxx, int dyy, int dx, int dy, int dw, int dh, int dow,
- int sow)
+__imlib_ScaleAARGB(const ImlibScaleInfo *isi,
+ const uint32_t *srce, uint32_t *dest,
+ int dxx, int dyy, int dx, int dy, int dw, int dh,
+ int dow, int sow)
{
- uint32_t *sptr, *dptr, *pix;
+ const uint32_t *sptr, *pix;
+ uint32_t *dptr;
int r, g, b;
int x, y, end;
int *ypoints;
@@ -1038,9 +1045,9 @@ __imlib_ScaleAARGB(ImlibScaleInfo *isi, uint32_t *srce, uint32_t *dest,
}
void
-__imlib_Scale(ImlibScaleInfo *isi, bool aa, bool alpha,
- uint32_t *srce, uint32_t *dest, int dxx, int dyy, int dx,
- int dy, int dw, int dh, int dow, int sow)
+__imlib_Scale(const ImlibScaleInfo *isi, bool aa, bool alpha,
+ const uint32_t *srce, uint32_t *dest, int dxx, int dyy,
+ int dx, int dy, int dw, int dh, int dow, int sow)
{
if (aa)
{
diff --git a/src/lib/scale.h b/src/lib/scale.h
index 45e0e73..43a4ab8 100644
--- a/src/lib/scale.h
+++ b/src/lib/scale.h
@@ -5,17 +5,17 @@
typedef struct _imlib_scale_info ImlibScaleInfo;
-ImlibScaleInfo *__imlib_CalcScaleInfo(ImlibImage * im,
+ImlibScaleInfo *__imlib_CalcScaleInfo(const ImlibImage * im,
int sw, int sh, int dw, int dh, bool aa);
ImlibScaleInfo *__imlib_FreeScaleInfo(ImlibScaleInfo * isi);
-void __imlib_Scale(ImlibScaleInfo * isi, bool aa, bool alpha,
- uint32_t * srce, uint32_t * dest,
+void __imlib_Scale(const ImlibScaleInfo * isi, bool aa, bool alpha,
+ const uint32_t * srce, uint32_t * dest,
int dxx, int dyy, int dx, int dy,
int dw, int dh, int dow, int sow);
#ifdef DO_MMX_ASM
-void __imlib_Scale_mmx_AARGBA(ImlibScaleInfo * isi,
+void __imlib_Scale_mmx_AARGBA(const ImlibScaleInfo * isi,
uint32_t * dest,
int dxx, int dyy, int dx, int dy,
int dw, int dh, int dow, int sow);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.