tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: drawing to a 1bpp aux display



On Mon, Oct 24, 2016 at 12:00:43PM -0400, Michael wrote:
> Hello,
> 
> On Sun, 23 Oct 2016 14:25:49 +0200
> Manuel Bouyer <bouyer%antioche.eu.org@localhost> wrote:
> 
> > I have a graphical application (opencpn, http://opencpn.org, FWIW)
> > using wxWidgets (wxGTK on NetBSD). I want to write a plugin which can
> > repeat some information to a second (or more), 1bpp display
> > (a LCD display with resolution in the 128x64-240x128 range - this is not
> > fixed yet). This display will be available as a genfb on NetBSD.
> > It can be managed by a Xorg wsfb server, or by the plugin directly
> > (whatever is more convenient).
> > 
> > So I will have to write a piece of code which will be dlopen()'ed
> > by opencpn, so will have to coexists with wxGTK and dependancies,
> > and will have to do rendering on a small 1bpp display/framebuffer
> > of text (of various sizes) and graphics.
> > 
> > What would people familiar with X11 or graphics developement recomment ?
> 
> I assume there is no mappable framebuffer?

No, the communication with the display will be via a SPI link.
But luckily the A20 has a DMA-capable SPI controller, so this shouldn't
need too much work from the CPU.

> I'd just use a shadow framebuffer in memory, let wsdisplay / wsfb
> scribble into it and periodically update the actual display. Depending
> on the speed of the link to the display you may want to divide it up
> and implement some scheme to update only parts that actually changed.
> That would also take care of bitmap format / framebuffer organization
> issues.

Yes, I has something like that in mind. Also, it looks like the
X11 internal damage framework could help updating only the parts that
actually changed. So maybe we could extend our genfb and wsfb to
make use of that.

On the userland side; it looks like I could use Xlib, or maybe cairo.
Both are already part of the main application, and from what I've seen
they support multiple contexts.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index