aboutsummaryrefslogtreecommitdiffstats
path: root/src/xlib.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john.hawthorn@gmail.com>2009-12-20 09:18:48 -0800
committerJohn Hawthorn <john.hawthorn@gmail.com>2009-12-20 09:18:48 -0800
commitc97d443e62bd27755fa62e3f5dc8836c80ae5fc7 (patch)
tree3a1a95b127c1b2e4773a8d2c08f6a60e833a630c /src/xlib.c
parent2803eebe996da45dc13a593a49a2330c829829c1 (diff)
downloadmirror-meh-c97d443e62bd27755fa62e3f5dc8836c80ae5fc7.tar.gz
mirror-meh-c97d443e62bd27755fa62e3f5dc8836c80ae5fc7.tar.bz2
mirror-meh-c97d443e62bd27755fa62e3f5dc8836c80ae5fc7.zip
add performance tests for scaling.
Diffstat (limited to 'src/xlib.c')
-rw-r--r--src/xlib.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/xlib.c b/src/xlib.c
index ca0a1b5..a407f15 100644
--- a/src/xlib.c
+++ b/src/xlib.c
@@ -21,9 +21,6 @@ GC gc;
int xshm = 0;
-void scale(struct image *img, XImage *ximg);
-void linearscale(struct image *img, XImage *ximg);
-
XShmSegmentInfo *shminfo;
XImage *ximage(struct image *img, unsigned int width, unsigned int height, int fast){
int depth;
@@ -71,7 +68,7 @@ XImage *ximage(struct image *img, unsigned int width, unsigned int height, int f
ximg->data = malloc(ximg->bytes_per_line * ximg->height);
XInitImage(ximg);
}
- (fast ? linearscale : scale)(img, ximg);
+ (fast ? nearestscale : scale)(img, ximg->width, ximg->height, ximg->bytes_per_line, ximg->data);
}else{
/* TODO other depths */
fprintf(stderr, "This program does not yet support display depths <24.\n");