Re: Core Animation Flickering
Re: Core Animation Flickering
- Subject: Re: Core Animation Flickering
- From: Colin Cornaby <email@hidden>
- Date: Sat, 26 Apr 2008 23:45:33 -0700
Just an update on this issue...
Everything looked fine in the console when I enabled that debug
switch. However, I've sidestepped the issue and created an alternate
implementation that does not flicker. Drawing manually in a CALayer
had other challenges, such as not doing synchronized drawing with the
window resize.
I originally encountered this flickering issue a while ago. I
originally sidestepped it by doing my drawing in an NSView, and then
adding that as a subview to the parent layer. I was informed by
someone when I asked about CoreAnimation deadlocks that adding a
NSView to a layer might affect working the layer tree that view is a
member of. I'm not sure if that was what was causing the issue, but I
removed the NSView from the parent layer anyway just to be safe, and
went back to looking at a fully CA solution to what I needed to draw.
I will get the test case working if I have time and post it to the
list. I'm trying to get something prepped for ADA so I'm on a tight
schedule here...
On Apr 25, 2008, at 8:52 AM, John Harper wrote:
On Apr 25, 2008, at 1:20 AM, Colin Cornaby wrote:
I have a CALayer subclass, set to redraw on bounds change, with the
following draw code (I don't expect it to be meaningful, but I'm
pasting it here for the sake of completeness.)
…
It's parent view is set up to change the layers frame to always
fill the contents of the entire view on
resizeWithOldSuperviewSize:. This works great, except for a really
annoying flicker that occurs once every few seconds while the view
is resizing. Every layer in the view flickers in and out (stuff
like background colors doesn't flicker).
Did I miss some drawing cleanup or something else obvious here?
One thing to check for is that the bounds of one of your layers
isn't being set to empty temporarily. Running your program with the
CA_PRINT_TREE environment variable set to "1" is a good way to debug
that, you can scan the logs for anything that looks suspicious. If
you don't see anything, file a radar with a test case and we will
look into it…
John
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden