Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CGContextDrawImage performance



I have a window with a large(ish) background bitmap of approx 800 x 600 pixels and a few other smaller (32 x 32 or so) bitmaps. I'm animating some of the contents of this window at 15 fps and seeing that drawing the bitmaps is using approx 10% of the CPU (shark points at decode_data).

The actual portion of the window being updated is a smaller 500x300 area in the middle of the window and the clipping path is set to be just that area, however I still 'need' to draw at least the 500x300 portion of the background since it might have changed and the portion being drawn over the top might be transparent in some areas.

Is there anything I can do in 10.3 to improve the performance of these drawing operations ? What exactly is being 'decoded' ?

The CGImage has been initialized by loading a PNG file into a seperate CGImage, creating a matching CGImage/CGBitmapContext data store and then drawing the first image into the second, then disposing the first PNG created CGImage. I then draw the 'second' CGImage so as to avoid the previously reported issues with CGImage re-reading image files from the disc when drawing.

Thanks

Andrew 8-)

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.