[Libdlo] Basic PNG and SVG display

Phil Endecott spam_from_libdlo at chezphil.org
Thu May 21 12:40:09 PDT 2009


Hi,

I have proved that my hardware basically works with a couple of demos 
that render PNG and SVG images (the latter using librsvg).  My idea was 
that these two formats could be useful in applications like network 
activity graphs when plugged in to your router, and so on.

However, if we get a kernel framebuffer driver (as Roberto promises) 
then a user-space utility like this seems of little use.  There are 
probably already dozens of programs that can render graphics into a 
framebuffer device.  Actually the more I think about it the more I 
believe that a kernel framebuffer driver is the right solution for this 
sort of thing.  The only disadvantage is that it needs a full screen's 
worth of RAM, which might be a bit excessive on an embedded device like 
a router.  (Well, unless you have only N pages mapped to RAM, and if 
the code touches page N+1 you flush the least-recently-used page to the 
screen and re-use it.  That would obviously work better for some 
patterns of access than others.  Roberto, have you considered something 
like this?)

If my MIMO has 16 MB of RAM (as "most devices" do), it has space for 10 
framebuffers (or maybe 20 - does anyone know how many bits per pixel it 
stores?).  Presumably a video player or similar could use 
double-buffering (is there a standard ioctl on the framebuffer device 
for that?).  That still leaves 8 to find a use for.  Here's my 
suggestion: save old screen content as it is overwritten, and if that 
content "comes back" (e.g. you maximise a window that obscures your 
wallpaper, and then minimise it again) you restore it from the data 
stored on the device.  I think this sort of technique could make a big 
performance difference especially while we don't have any compression.  
Who knows how best to implement it?


Phil.





More information about the Libdlo mailing list