summaryrefslogtreecommitdiff
path: root/draw/draw_blend.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-04-08 13:49:11 +0200
committerTor Andersson <tor.andersson@artifex.com>2011-04-08 13:49:11 +0200
commit94e774a8bd2891f36885ae710efd42caebd855ed (patch)
tree883147e1bf5dc8feba5d142b8ffcde8e7e0676f6 /draw/draw_blend.c
parenta1b5f023ccebd339e9a74ef7f3bcc94c0c74d3e0 (diff)
downloadmupdf-94e774a8bd2891f36885ae710efd42caebd855ed.tar.xz
Remove inline keyword where it is not strictly necessary for performance.
Also put the function on the same line for inline functions, so they stick out and are easy to find with grep.
Diffstat (limited to 'draw/draw_blend.c')
-rw-r--r--draw/draw_blend.c32
1 files changed, 11 insertions, 21 deletions
diff --git a/draw/draw_blend.c b/draw/draw_blend.c
index 5b4d8e83..2d68758a 100644
--- a/draw/draw_blend.c
+++ b/draw/draw_blend.c
@@ -27,14 +27,12 @@ const char *fz_blendmode_names[] =
/* Separable blend modes */
-static inline int
-fz_screen_byte(int b, int s)
+static inline int fz_screen_byte(int b, int s)
{
return b + s - fz_mul255(b, s);
}
-static inline int
-fz_hard_light_byte(int b, int s)
+static inline int fz_hard_light_byte(int b, int s)
{
int s2 = s << 1;
if (s <= 127)
@@ -43,26 +41,22 @@ fz_hard_light_byte(int b, int s)
return fz_screen_byte(b, s2 - 255);
}
-static inline int
-fz_overlay_byte(int b, int s)
+static inline int fz_overlay_byte(int b, int s)
{
return fz_hard_light_byte(s, b); /* note swapped order */
}
-static inline int
-fz_darken_byte(int b, int s)
+static inline int fz_darken_byte(int b, int s)
{
return MIN(b, s);
}
-static inline int
-fz_lighten_byte(int b, int s)
+static inline int fz_lighten_byte(int b, int s)
{
return MAX(b, s);
}
-static inline int
-fz_color_dodge_byte(int b, int s)
+static inline int fz_color_dodge_byte(int b, int s)
{
s = 255 - s;
if (b == 0)
@@ -73,8 +67,7 @@ fz_color_dodge_byte(int b, int s)
return (0x1fe * b + s) / (s << 1);
}
-static inline int
-fz_color_burn_byte(int b, int s)
+static inline int fz_color_burn_byte(int b, int s)
{
b = 255 - b;
if (b == 0)
@@ -85,8 +78,7 @@ fz_color_burn_byte(int b, int s)
return 0xff - (0x1fe * b + s) / (s << 1);
}
-static inline int
-fz_soft_light_byte(int b, int s)
+static inline int fz_soft_light_byte(int b, int s)
{
/* review this */
if (s < 128) {
@@ -102,21 +94,19 @@ fz_soft_light_byte(int b, int s)
}
}
-static inline int
-fz_difference_byte(int b, int s)
+static inline int fz_difference_byte(int b, int s)
{
return ABS(b - s);
}
-static inline int
-fz_exclusion_byte(int b, int s)
+static inline int fz_exclusion_byte(int b, int s)
{
return b + s - (fz_mul255(b, s)<<1);
}
/* Non-separable blend modes */
-static inline void
+static void
fz_luminosity_rgb(int *rd, int *gd, int *bd, int rb, int gb, int bb, int rs, int gs, int bs)
{
int delta, scale;