summaryrefslogtreecommitdiff
path: root/draw
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-07-01 17:32:07 +0200
committerTor Andersson <tor@ghostscript.com>2010-07-01 17:32:07 +0200
commit19bba2f8efbfd1ffb19a7c975c070d53e6f1e93b (patch)
tree149cbb82cfb0982617553b8c611e4d2474e4debf /draw
parentd96c642ea56b011b4a14a1ca9a8f3d9bba9d60a6 (diff)
downloadmupdf-19bba2f8efbfd1ffb19a7c975c070d53e6f1e93b.tar.xz
Remove unused blendover functions.
Diffstat (limited to 'draw')
-rw-r--r--draw/porterduff.c84
1 files changed, 5 insertions, 79 deletions
diff --git a/draw/porterduff.c b/draw/porterduff.c
index 5c3339ec..9af8b55c 100644
--- a/draw/porterduff.c
+++ b/draw/porterduff.c
@@ -76,40 +76,14 @@ typedef unsigned char byte;
* Blend pixmap regions
*/
-/* dst = src over dst */
-static void
-duff_non(byte * restrict sp, int sw, int sn, byte * restrict dp, int dw, int w0, int h)
-{
- int k;
-
- sw -= w0*sn;
- dw -= w0*sn;
- while (h--)
- {
- int w = w0;
- while (w--)
- {
- int ssa = 255 - sp[sn-1];
- for (k = 0; k < sn; k++)
- {
- dp[k] = sp[k] + fz_mul255(dp[k], ssa);
- }
- sp += sn;
- dp += sn;
- }
- sp += sw;
- dp += dw;
- }
-}
-
/* dst = src in msk over dst */
static void
-duff_nimon(byte * restrict sp, int sw, int sn, byte * restrict mp, int mw, int mn, byte * restrict dp, int dw, int w0, int h)
+duff_ni1on(byte * restrict sp, int sw, int sn, byte * restrict mp, int mw, byte * restrict dp, int dw, int w0, int h)
{
int k;
sw -= w0*sn;
- mw -= w0*mn;
+ mw -= w0;
dw -= w0*sn;
while (h--)
{
@@ -117,13 +91,13 @@ duff_nimon(byte * restrict sp, int sw, int sn, byte * restrict mp, int mw, int m
while (w--)
{
int ma = mp[0];
- int ssa = 255-fz_mul255(sp[sn-1], ma);
+ int ssa = 255 - fz_mul255(sp[sn-1], ma);
for (k = 0; k < sn; k++)
{
dp[k] = fz_mul255(sp[k], ma) + fz_mul255(dp[k], ssa);
}
sp += sn;
- mp += mn;
+ mp ++;
dp += sn;
}
sp += sw;
@@ -133,51 +107,6 @@ duff_nimon(byte * restrict sp, int sw, int sn, byte * restrict mp, int mw, int m
}
static void
-duff_1o1(byte * restrict sp0, int sw, byte * restrict dp0, int dw, int w0, int h)
-{
- /* duff_non(sp0, sw, 1, dp0, dw, w0, h); */
- while (h--)
- {
- byte *sp = sp0;
- byte *dp = dp0;
- int w = w0;
- while (w--)
- {
- dp[0] = sp[0] + fz_mul255(dp[0], 255 - sp[0]);
- sp ++;
- dp ++;
- }
- sp0 += sw;
- dp0 += dw;
- }
-}
-
-static void
-duff_4o4(byte *sp, int sw, byte *dp, int dw, int w0, int h)
-{
- /* duff_non(sp0, sw, 4, dp0, dw, w0, h); */
-
- sw -= w0<<2;
- dw -= w0<<2;
- while (h--)
- {
- int w = w0;
- while (w--)
- {
- byte ssa = 255 - sp[3];
- dp[0] = sp[0] + fz_mul255(dp[0], ssa);
- dp[1] = sp[1] + fz_mul255(dp[1], ssa);
- dp[2] = sp[2] + fz_mul255(dp[2], ssa);
- dp[3] = sp[3] + fz_mul255(dp[3], ssa);
- sp += 4;
- dp += 4;
- }
- sp += sw;
- dp += dw;
- }
-}
-
-static void
duff_1i1o1(byte * restrict sp, int sw, byte * restrict mp, int mw, byte * restrict dp, int dw, int w0, int h)
{
/* duff_nimon(sp0, sw, 1, mp0, mw, 1, dp0, dw, w0, h); */
@@ -394,10 +323,7 @@ text_w4i1o4(byte * restrict rgba, byte * restrict src, int srcw, byte * restrict
* ... and the function pointers
*/
-void (*fz_duff_non)(byte*,int,int,byte*,int,int,int) = duff_non;
-void (*fz_duff_nimon)(byte*,int,int,byte*,int,int,byte*,int,int,int) = duff_nimon;
-void (*fz_duff_1o1)(byte*,int,byte*,int,int,int) = duff_1o1;
-void (*fz_duff_4o4)(byte*,int,byte*,int,int,int) = duff_4o4;
+void (*fz_duff_ni1on)(byte*,int,int,byte*,int,byte*,int,int,int) = duff_ni1on;
void (*fz_duff_1i1o1)(byte*,int,byte*,int,byte*,int,int,int) = duff_1i1o1;
void (*fz_duff_2i1o2)(byte*,int,byte*,int,byte*,int,int,int) = duff_2i1o2;
void (*fz_duff_4i1o4)(byte*,int,byte*,int,byte*,int,int,int) = duff_4i1o4;