File:  [Plan 9 NeXT] / lucent / sys / src / libgnot / timetest.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 18:01:05 2018 UTC (8 years, 1 month ago) by root
Branches: lucent, MAIN
CVS tags: plan9, HEAD
Plan 9 NeXT

#include	<u.h>
#include	<libc.h>
#include	<libg.h>
#include	"/sys/include/gnot.h"

int
main(int argc, char *argv[])
{
	GBitmap *b;
	int h,v,iters,i,op,fac;
	Rectangle r;
	Point p;

	v = h = 100;
	fac = 1;
	op = S;
	if(argc > 1)
		v = atoi(argv[1]);
	if(argc > 2)
		h = atoi(argv[2]);
	if(argc > 3)
		op = atoi(argv[3]);
	if(argc > 4)
		fac = atoi(argv[4]);
	b = gballoc(Rect(0,0,1024,1024),0);
	r = Rect(48,33,48+h,33+v);
	iters = fac * 100000/(((h+31)/32) * v);
	print("h=%d v=%d op=%d nblits=%d\n", h, v, op, iters*32);
	while(--iters >= 0) {
		p = Pt(31,33);
		for(i=32; --i>=0;){
			gbitblt(b, p, b, r, op);
			p.x--;
		}
	}
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.