I have an NSView (lets call it mainview) with a few subviews. One of these subviews has a time based (called via a timer) animation which is done in its drawRect method. Also I have some CIFilter effects applied to the mainview.

All works as expected under 10.6.x and 10.7.x ( I.e. I see my animation happening and filters applied).

The problem shows up only under 10.8 - the animation stops right after I apply a filter (using setContentFilters: and setWantsLayer:) to the mainview and resumes only after I remove a filter (using setContentFilters:nil). My subview's drawRect method doesn't even gets called when filters are applied...

I would really appreciate if someone could shed some light on the situation.

thank you.

有帮助吗?

解决方案

Turns out a setNeedsDisplay: is not thread safe. I had a setNeedsDisplay: called for my subview not on the main thread. Calling in on my main thread fixed the issue.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top