shithub: riscv

Download patch

ref: b4db73795e37e1233b0eca57ff3ae11207882861
parent: dd4de0b0fa99364265ff6e99462259b8aef493c1
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Nov 17 14:42:12 EST 2016

libmemdraw: remove unused static drawbuf variables and ptrfn() declaration

--- a/sys/src/libmemdraw/draw.c
+++ b/sys/src/libmemdraw/draw.c
@@ -461,9 +461,6 @@
 	int	convdx;
 };
 
-static uchar *drawbuf;
-static int	ndrawbuf;
-static int	mdrawbuf;
 static Readfn	greymaskread, replread, readptr;
 static Writefn	nullwrite;
 static Calcfn	alphacalc0, alphacalc14, alphacalc2810, alphacalc3679, alphacalc5, alphacalc11, alphacalcS;
@@ -475,7 +472,6 @@
 
 static Calcfn*	boolcopyfn(Memimage*, Memimage*);
 static Readfn*	convfn(Memimage*, Param*, Memimage*, Param*, int*);
-static Readfn*	ptrfn(Memimage*);
 
 static Calcfn *alphacalc[Ncomp] = 
 {
@@ -2567,31 +2563,6 @@
 }
 #undef DBG
 
-
-/*
- * Fill entire byte with replicated (if necessary) copy of source pixel,
- * assuming destination ldepth is >= source ldepth.
- *
- * This code is just plain wrong for >8bpp.
- *
-ulong
-membyteval(Memimage *src)
-{
-	int i, val, bpp;
-	uchar uc;
-
-	unloadmemimage(src, src->r, &uc, 1);
-	bpp = src->depth;
-	uc <<= (src->r.min.x&(7/src->depth))*src->depth;
-	uc &= ~(0xFF>>bpp);
-	/* pixel value is now in high part of byte. repeat throughout byte 
-	val = uc;
-	for(i=bpp; i<8; i<<=1)
-		val |= val>>i;
-	return val;
-}
- * 
- */
 
 void
 memfillcolor(Memimage *i, ulong val)