[Lazarus] Optimizing Lazarus drawing performance
Mattias Gaertner
nc-gaertnma at netcologne.de
Wed Sep 9 18:16:30 CEST 2009
On Wed, 09 Sep 2009 14:33:48 +0200
Adriaan van Os <fpc at microbizz.nl> wrote:
> Lazarus has the TCarbonBitmapContext class, implemented as a Quartz
> CGBitmapContext. User interface objects use a CGImage as pixel cache.
> During profiling a Lazarus application on Mac OS X, I noticed that
> the application spends a lot of time in
> TCarbonDeviceContext.DrawCGImage.
>
> Apple writes
> <http://developer.apple.com/mac/library/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_context/dq_context.html>
>
> Graphics Contexts
> Note: If you want to perform offscreen drawing, before you use a
> bitmap graphics context, you should first read “CGLayer Drawing.”
> CGLayer objects, introduced in Mac OS X v10.4 and available in iPhone
> OS, support drawing to layers and provide a much more optimized
> solution for offscreen drawing than bitmap graphics contexts provide.
>
> and
>
> Creating a Bitmap Graphics Context
> CGLayer objects (CGLayerRef), available in Mac OS X v10.4 and later,
> are optimized for offscreen drawing because, whenever possible,
> Quartz caches layers on the video card.
>
> Therefore - unless someone else is working on it - I would like to
> add CGLayer support to the Carbon widget, using CGLayers as pixel
> cache for interface objects. Is this a change that the Lazarus team
> would welcome ? My work will is being sponsored by PGMusic
> <http://www.pgmusic.com>.
ok for me
Mattias
More information about the Lazarus
mailing list