[Lazarus] Fast drawing to canvas
Sven Barth
pascaldragon at googlemail.com
Fri Feb 10 10:44:39 CET 2012
Am 09.02.2012 19:41, schrieb Darius Blaszyk:
> I've put up the test app on the CCR. All three methods draw at roughly
> 10fps on windows and 6fps on mac. I haven't tried linux yet. I challenge
> everyone to find methods to speed up the the drawing using the current
> implementation. May the best man win!
On Linux I have roughly 5 FPS with all three methods... :(
I then tried to display the pictures using the OpenGLContext. For this I
modified your code quite a bit:
* the images are converted to a "simple image" (a record consisting of
width, height and the image data as an array of a record of 3 byte
values (red, green, blue))
* the images are kept in memory (no writing to a cache on disk the use
of which I don't really understand...)
* draw the images to the OpenGLContext
With this I achieve roughly 25 FPS using the 50% HD images, but the
startup time (the conversion from the PNG image to the simple image) is
around 5 to 10 minutes... (maybe .Canvas.Pixel[...] access isn't that
good for that purpose ^^)
Regards,
Sven
More information about the Lazarus
mailing list