[Top][All Lists]

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

NS Port drawing, again

From: Alan Third
Subject: NS Port drawing, again
Date: Fri, 12 Oct 2018 10:28:07 +0100

On Fri, 12 Oct 2018, 09:54 Alan Third, <address@hidden> wrote:

The idea is that when running redisplay cocoa does not let you draw to the screen, so ns_clip_to_rect, etc., marks the area as needing to be redrawn later, and returns NO so you know not to try drawing to the frame.

Later drawRect is called with a list of the areas that have been marked as needing redrawn and it calls expose on those areas and so Emacs runs the drawing functions again, but this time ns_clip_to_rect returns YES so you know you can go ahead and draw.

BTW, with all the unexpected little niggles this approach has introduced that are proving hard to work round, I'm considering abandoning it and following the Mac port's lead where we would draw to an off-screen surface and then blit it back to the screen.

I think this would solve issues with the cursor being left behind on scrolling, the flicker on resizing from lisp and probably the random blanking of frames users report.

It would also avoid some concerns I have with making the NS port fully threading compatible as drawing would be thread agnostic, and blitting to the screen would always be handled by the main NS thread. They would be completely separated.

I'm not sure what would be involved at this stage, though.

reply via email to

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