[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Change to NS drawing routines

From: Alan Third
Subject: Change to NS drawing routines
Date: Sat, 11 Aug 2018 15:06:20 +0100
User-agent: Mutt/1.10.0 (2018-05-17)

The next version of macOS deprecates the method we use in the NS port
to draw to the screen, specifically marking an NSView as ‘focused’ and
then drawing to it. The ‘modern’ way is to only draw from within the
‘drawRect:’ method where ‘focusing’ is already done for you. There is
some previous discussion here:


I’ve created a new branch called scratch/ns-drawing which only draws
from within drawRect by marking areas that are to be drawn as ‘dirty’
and then, at the end of redisplay, forcing an update, which uses
drawRect and expose_frame to redraw the relevant bits of the frame.

I believe this is a somewhat controversial approach.

My experience so far is that performance is not noticeably slower than
master, however if someone with a slower Mac could try it that would
be helpful. 
Alan Third

reply via email to

[Prev in Thread] Current Thread [Next in Thread]