Mailing Lists: Apple Mailing Lists

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

Re: CARenderer Memory Issue




On Mar 24, 2008, at 8:56 AM, John Harper wrote:

On Mar 23, 2008, at 11:49 PM, Colin Cornaby wrote:

I am successfully rendering a layer tree that is never shown on the screen with a CARenderer. I set up a pixel buffer, and then render to the pixel buffer. But, when I call [CATransaction commit] before I actually do the rendering, there is a very large allocation of memory depending on the size of the image. Apparently glClear is being called internally by CoreAnimation, and I'm guessing it's allocating some sort of buffer internal to CoreAnimation. I can't figure out how to get CoreAnimation to let go of it, and it exists for the lifetime of my program.

From the backtrace you provided below, it looks like the allocation is made by OpenGL when _you_ called glClear in your program. Maybe it's the depth buffer that is being allocated the first time you draw into the surface? (You probably don't need the depth buffer, CA definitely doesn't use it.)

: slaps forehead : Hi, my name is Colin, I blindly trust the line number Instruments gives me..


Not clearing the depth buffer seems to have worked. I'm on my work Mac, so I can't trust quite as throughly, but Instruments is now showing memory usage going back to normal levels after rendering finishes.

Thanks,
Colin
_______________________________________________
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
References: 
 >CARenderer Memory Issue (From: Colin Cornaby <email@hidden>)
 >Re: CARenderer Memory Issue (From: John Harper <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.