all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: emacs-devel@gnu.org
Subject: redisplay and expose_frame
Date: Sun, 22 Jul 2018 13:44:18 +0100	[thread overview]
Message-ID: <20180722124418.GA8674@breton.holly.idiocy.org> (raw)

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	other threads:[~2018-07-22 12:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-22 12:44 Alan Third [this message]
2018-07-22 14:37 ` redisplay and expose_frame Eli Zaretskii
2018-07-23  9:58 ` YAMAMOTO Mitsuharu
2018-07-24 20:42   ` Alan Third
2018-07-25  9:33     ` YAMAMOTO Mitsuharu
2018-08-04 16:19       ` Alan Third

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180722124418.GA8674@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.