Canvas doublebuffer double buffered?

Possibly stupid question, but if. I do basically my own double-buffering by drawing to a picture and in the canvas simply draw that picture, then is there a point to enabling doublebuffer on the canvas, or am I missing something here?

TiA

Markus

Questions are never stupid.

On Mac, double buffering is carried out by the hardware, anyway. So turning it on should not make any difference.

Also, I do not think drawing to a picture at the same time as the canvas can exactly be called double buffering. Maybe double drawing. See Multiple buffering - Wikipedia

On PC where the hardware does not double buffer, switching a canvas to double buffering can make a lot of difference about flicker.

.Net is entirely double buffered, and it would be highly desirable that eventually Xojo implements at long last that framework, which has been around for over 10 years. <https://xojo.com/issue/28733>

But that’s not what he said he is doing.

If you’re drawing to a picture which you then draw to a canvas, then DoubleBuffer isn’t going to make much difference, as long as you turn off EraseBackground and pass FALSE to any calls to Invalidate and Refresh.

Unless I am mistaken, Markus is on Mac, where it makes absolutely no difference whatsoever anyway. I replied to “is there a point to enabling doublebuffer on the canvas”.

You do have a point, though. On Windows, that can be a way to minimize flicker without doublebuffer.

I’m actually cross-platform, which is my main reason for using Xojo.

The reason for drawing to a picture is twofold: it makes it easy to print, and it reduces flicker on Windows.

But I wondered what it would do if the canvas is already double-buffered, like on Mac now, or on Win with Xojo 2017 R2 :wink:

You mean when they will have implemented .NET next year ? :wink:

Hope springs eternal …