emacs-devel
[Top][All Lists]
Advanced

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

Re: How is current_matrix and desired_matrix be created?


From: Eli Zaretskii
Subject: Re: How is current_matrix and desired_matrix be created?
Date: Mon, 04 May 2020 17:55:44 +0300

> Date: Mon, 4 May 2020 13:49:55 +0200
> From: <address@hidden>
> 
> Current matrix is the status as is shown on screen. Buffer updates
> (insert character here, change some property there, scroll, etc)
> go (conceptually, see below) to desired matrix. So the differences
> of both represent the work that has to be done.
> 
> At redisplay time, both are compared and some "minimal" set of
> changes is calculated, which are transmitted to the "glass", as
> Gerd calls that.

Small correction: the desired matrix is built as part of redisplay,
not before.

> At this point, current matrix is thrown away, and desired matrix
> becomes current matrix.

Small correction: the current matrix is never thrown away.  Instead,
it is updated by copying portions of the desired matrix into the
corresponding portions of the current matrix.  Then the _desired_
matrix is thrown away.

> The "conceptually" above hints at the fact that the desired
> matrix is "sparse", i.e. where it is equal to the current matrix
> it might have a "hole" (if I got things right it happens line-
> wise). So at redisplay time it starts out empty (which means
> "equal to current matrix").

Exactly, which is why the current matrix cannot be thrown away.



reply via email to

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