[Top][All Lists]

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

Re: Can we go GTK-only?

From: Stefan Monnier
Subject: Re: Can we go GTK-only?
Date: Sun, 30 Oct 2016 19:57:31 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> But this scheme won't really eliminate the coupling between redisplay and
> lisp though, since the former calls into the latter.  The redisplay thread
> has to block waiting on lisp anyway.

Indeed.  Moving redisplay to a separate thread would be neat, but it'd
take a much more significant amount of work, I think.

> The key insight there is that we shouldn't have redisplay *lock* the display
> matrix and render it.  The lisp universe should send a *copy* of the matrix
> set, then go about its business.

Good, point we can decouple the two a bit more this way.  Actually, we
already have this copy since we have 2 sets of matrices.  So we just
need to say that the "current matrix" belongs to the GUI thread/process,
while the "desired matrix" belongs to the redisplay.  And the "send
a copy" is done by comparing the two, so only the part that changed is
sent (and so the GUI thread gets to know which part needs to be redrawn).

Of course, comparing the two sets of matrices requires access to both,
so either we need the two threads to belong to the same process and we
temporarily use locking (but this locking is not used when responding
to expose events, it's only used to update the current matrices), or we
need a 3rd copy.


reply via email to

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