On Mon, 10 Oct 2016, Mattias Gaertner via Lazarus wrote:

On Mon, 10 Oct 2016 12:50:26 +0200 (CEST)
Michael Van Canneyt <mich...@freepascal.org> wrote:

On Mon, 10 Oct 2016, Mattias Gaertner via Lazarus wrote:

> On Mon, 10 Oct 2016 12:05:41 +0200 (CEST)
> Michael Van Canneyt via Lazarus <lazarus@lists.lazarus-ide.org> wrote:
> >> [...] >> > If you want to optimize for mini changes like the focusrect you might >> > want to use a bitmap. >> >> Please explain ? >
> Draw to a bitmap and in OnPaint draw that. Similar to a TImage.
> Then you can also use aggpas.
I thought lazarus did double buffering by default, so this should be so 
automatically ?

Double buffering means, that there are two buffers, one for showing and
for painting. When painting is done they are "swapped".
This avoids flickering. No more, no less.

I understand that.

But the effect is that inside the Paint() event you are actually drawing to a bitmap (buffer), which is then swapped to the display once the paint method is done ?

So why would I want to introduce a third buffer, which is then copied to the
second, which is then copied to the actual display ?

I thought the idea was to be more efficient, not less ?

Michael.
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to