Lisp HUG Maillist Archive

cached pinboard layout?

Unable to parse email body. Email id is 9588

Re: cached pinboard layout?

Nick Levine <ndl@ravenbrook.com> writes:

> I have a capi:pinboard-layout on which there might sometimes be
> thousands of objects (typically a fuzz of short lines). Expose events
> take too long, because everything gets redrawn every time. I'd like to
> cache the bits.
>
> In the past, with pure capi:output-panes, I've dealt with this
> successfully by creating a pixmap port, doing all my drawing to that,
> and bitblting from pixmap to output-pane in the latter's
> display-callback.
>
> Has anyone ever done anything remotely like this for a
> pinboard-layout? 

I'm looking for tips on how to do this too. On Mac OS X, LW seems to
use some Cocoa built-in buffering, so it's not a problem, but on
Windows and X11 I also sometimes have problems with redraws that
are too cpu-intensive.
--
 regards,
    Espen Vestre
    Netfonds Bank ASA


Re: cached pinboard layout?

That is exactly how I do all my redraws for our schematic layouts in GigaDSP. I always draw to a backing pixmap and then on redraw events I only BLIT those portions of the pixmap that are needed. After any updates to the pixmap I call invalidate on its region. This is very fast, and avoids all the "flashies" in Windows. 

And as Espen pointed out, those flashies never happen in OS/X. But the same technique is used by GigaDSP on both Windows and OS/X and it seems to work quite well -- including live graph updates for oscilloscope displays and such.

Dr. David McClain
Chief Technical Officer
Refined Audiometrics Laboratory
4391 N. Camino Ferreo
Tucson, AZ  85750

email: dbm@refined-audiometrics.com
phone: 1.520.390.3995
web: http://refined-audiometrics.com



On Dec 17, 2009, at 12:18, Nick Levine wrote:


I have a capi:pinboard-layout on which there might sometimes be
thousands of objects (typically a fuzz of short lines). Expose events
take too long, because everything gets redrawn every time. I'd like to
cache the bits.

In the past, with pure capi:output-panes, I've dealt with this
successfully by creating a pixmap port, doing all my drawing to that,
and bitblting from pixmap to output-pane in the latter's
display-callback.

Has anyone ever done anything remotely like this for a
pinboard-layout? 

Thanks,

- nick



Re: cached pinboard layout?

Chris Melen <relativeflux@hotmail.co.uk> writes:

> There is also the :draw-pinboard-objects :buffer (or :local-buffer)
> option with a pinboard-layout. This involves a backing pixmap (or
> one per object if you specify :local-buffer). I use this to avoid
> flicker on XP. It's easier than doing buffering yourself, but in my
> experience somewhat slower - in fact I am in the process of moving
> back to doing my own buffering.

I've tried :buffer on XP, but drawing gets painfully slow.
-- 
  (espen)


RE: cached pinboard layout?



> Date: Mon, 21 Dec 2009 11:18:36 +0000
> From: martin@lispworks.com
> To: lisp-hug@lispworks.com
> Subject: Re: cached pinboard layout?
>
> >
> > It would be nice if double-buffering were available in a simple way for other
> > panes besides pinboard-layouts. Common Graphics (Franz) has a :double-buffered
> > initarg for any of its basic-pane subclasses, and I'd like to see something
> > similar in the CAPI.
>
> LispWorks 6.0 will support double-buffered capi:output-pane. All other panes
> (buttons etc) are implemented by the native window system, so will be
> double-buffered according to the system conventions.
>
> --
> Martin Simmons
> LispWorks Ltd
> http://www.lispworks.com/
>

Thanks Martin, good to know.

CM


View your other email accounts from your Hotmail inbox. Add them now.
Updated at: 2020-12-10 08:40 UTC