Date: Thu, 29 Jan 1998 01:13:27 -0600 (CST) From: Joel Ray Holveck <joelh@gnu.org> To: jonny@coppe.ufrj.br Cc: jkh@time.cdrom.com, tlambert@primenet.com, dag-erli@ifi.uio.no, hackers@FreeBSD.ORG Subject: Re: Graphical screen saver Message-ID: <199801290713.BAA04624@detlev.UUCP> In-Reply-To: <199801290302.BAA22088@gaia.coppe.ufrj.br> (message from Joao Carlos Mendes Luis on Thu, 29 Jan 1998 01:02:14 -0200 (EDT)) References: <199801290302.BAA22088@gaia.coppe.ufrj.br>
next in thread | previous in thread | raw e-mail | index | archive | help
>>> routines for variable initialization and the actual drawing. (The >>> actual drawing is currently handled by direct memory writes.) I'm not >> It would be nice if, at the very minimum, you supplied some minimum >> routines/macros for talking to this memory region, perhaps like this: >> This would sort of give you your "getpixel()/putpixel()" equivalent >> interface for implementing the higher-level line, rectangle, circle, >> etc. drawing primitives which screen-saver writers would probably >> much rather use. > Isn't this too much overhead for a screen saver ? Not really. The typedefs take no space at all, and the functions will be implemented in code anyway. We're talking about low-level functions here, stuff that any screensaver will use, so why not make it easier? In my experience, the slightly higher-level graphics functions (line, circle, etc) are rarely used, so I will probably write them but make them optional linkage. Is there any way to have ld, when linking the lkm, throw out all the functions that aren't used, except the entry points that I specify? > I haven't yet seen the graphic screen savers, but shouldn't they be > done as a user level program with some kernel hooks? I've considered this. So far, both of the graphic screen savers written are very lightweight (2k, and daemon_saver is 6k), and are no problem to load in the kernel. However, graphic programs are normally large. The popular Bad Dog screensaver in AfterDark 3.0 is 536k, which is far too large to link into the kernel. I am considering writing a screensaver stub which loads an object file from disk and calls routines in it. (Would dlopen be the right interface, or does the kernel have something better?) This allows the saver to be paged out (since it's only in memory as a vnode, not an lkm), and makes for slightly easier debugging. Thoughts? > This would allow X to interface with syscons saver framework. I don't see how you mean. The saver is allowed to choose the mode (currently at compile time, although I may make it a runtime option), which right there would seem to blow X out of the picture. Happy hacking, joelh -- Joel Ray Holveck - joelh@gnu.org - http://www.wp.com/piquan Fourth law of programming: Anything that can go wrong wi sendmail: segmentation violation - core dumped
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801290713.BAA04624>