Slow Frame Rates on 2017+ Macs

Wow. Adding:

        [view setWantsLayer: YES];
        [[view layer] setDrawsAsynchronously: YES];

just under the [view setPostsFrameChangedNotifications: YES]; line takes me from about 10fps to 60fps. It’s like night and day.

I have noticed some graphical glitches but they look like they’re to do with dirty rects (or maybe aliasing) that I can probably work around.
It also looks like you can’t have transparent windows with one of those flags (CallOutBoxes etc.) so I’ll need to do some investigation there too.

7 Likes