all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Cursor drawing (was: Process: Determining the origin of a command loop)
Date: Thu, 20 Dec 2018 10:39:53 -0500	[thread overview]
Message-ID: <jwvr2ec6wvp.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: 838t0kcmpj.fsf@gnu.org

I was wondering whether it would make sense to introduce a clear notion
of layers.  IIUC the current situation is:

- redisplay renders buffers into glyph matrix.
- redraw of a clipping region is done by "rendering" the corresponding
  part of a glyph matrix into pixels.

and I'm not completely sure where the cursor and the mouse-face
highlight fit into this picture, but IIUC they're handled in a somewhat
ad-hoc way.

The layering could look like:

- redisplay renders buffers into glyph matrix.
- cursors and crosshairs are rendered into a separate data-structure
  (let's call it "overlay").
- redraw of a clipping region is done by "rendering" the corresponding
  part of a glyph matrix combined with the corresponding part of the
  overlay layer into pixels.

Here we'd have 2 layers (the glyph matrix and the overlay), tho I guess
the idea could be generalized to more layers if there's a need for it.
The advantage would be mostly that the overlay data structure could be
designed completely differently from glyph-matrices, so you don't have
to shoehorn crosshairs into the glyph matrix.

There's a good chance what I'm suggesting makes no sense or wouldn't
help with the actually hard part of the code, because I'm not familiar
enough with it.  If so, please ignore me,


        Stefan




  reply	other threads:[~2018-12-20 15:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-20  4:11 Process: Determining the origin of a command loop Keith David Bershatsky
2018-12-20 14:11 ` Eli Zaretskii
2018-12-20 15:39   ` Stefan Monnier [this message]
2018-12-20 19:07     ` Cursor drawing Eli Zaretskii
2018-12-20 19:18       ` Stefan Monnier
2018-12-20 19:35         ` Eli Zaretskii
2018-12-20 19:58           ` Stefan Monnier
2018-12-21  4:03             ` Elias Mårtenson
2018-12-21  7:09               ` Eli Zaretskii
2018-12-21 16:36                 ` Elias Mårtenson
2018-12-21 20:05                   ` Eli Zaretskii
2018-12-21 20:27                     ` Clément Pit-Claudel
2018-12-21 20:37                       ` Eli Zaretskii
2018-12-21 20:41                         ` Eli Zaretskii
2018-12-22 16:43                         ` Stefan Monnier
2018-12-22 17:03                           ` Eli Zaretskii

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=jwvr2ec6wvp.fsf-monnier+gmane.emacs.devel@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --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.