emacs-devel
[Top][All Lists]
Advanced

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

redisplay and expose_frame


From: Alan Third
Subject: redisplay and expose_frame
Date: Sun, 22 Jul 2018 13:44:18 +0100
User-agent: Mutt/1.10.0 (2018-05-17)

Hi all,

I’m looking for a little bit of guidance as to how exactly Emacs draws
to a GUI frame.

The background here is that I’m working on splitting the NS port’s GUI
code into its own thread, and while working on that I noticed that
Apple have deprecated the method we use to draw, so I thought that
since I’m working with the code anyway, I may as well try to
‘modernise’ it.

The ‘new’ way of drawing to the screen works thus:

 1. When you want to update a portion of the screen you mark it as
    dirty.

 2. At some point you have to call [emacs-frame display], which does
    some set‐up and then calls drawRect with an argument that is a
    rectangle showing which parts of the screen need to be updated.

 3. *All* the drawing *must* occur in drawRect.

 4. done.

At the moment NS Emacs calls expose_frame from within drawRect which
works well, however it also does some drawing outside of drawRect, and
I strongly suspect that redisplay_internal must, somehow, call
expose_frame (or an equivalent), but I can’t see where.

Does Emacs explicitly draw to the screen as part of redisplay? If so,
where is it doing it?

Thanks!
-- 
Alan Third



reply via email to

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