Ok, thanks.

On Mon, May 4, 2020 at 10:51 PM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Tipo Jo <tiziyuanfang@gmail.com>
> Date: Mon, 4 May 2020 13:32:15 +0800
>
> I know that window->contents is the buffer should be shown in window. The redisplay code use
> current_matrix and desired_matrix as the content should be shown.
> So what's the relationship between contents and those matrices? How does emacs create the two matrices
> from window->contents?

Some of this is described in the large comment at the beginning of the
file xdisp.c.  I suggest to read that, and if you have follow-up
questions, ask them here.