emacs-devel
[Top][All Lists]
Advanced

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

Re: Question about display engine


From: martin rudalics
Subject: Re: Question about display engine
Date: Tue, 3 Sep 2019 10:45:18 +0200

> I don't think I understand why you are talking about face pointers.
> The iterator doesn't keep any face pointers, it keeps face IDs (which
> allow to obtain the face pointer, when needed, by using FACE_FROM_ID).
>
> So all you need is to have another face ID member in the iterator, to
> be used for extending past EOL; depending on how the :extend bits are
> set, that face ID may or may not be identical to the "normal" face ID,
> the one we have now and use for buffer text.

But a face ID is only available after realizing a face.  With a lazy
approach there might be no realized face yet and the iterator would
realize that face on the fly.

>> In the display engine we do this very
>> frequently. As extend_face_to_end_of_line is very localized we just need
>> to save a pointer to a+b+c+d on the beginning of the function and
>> restore it at the end.
>
> Again, not a pointer: a face ID.  And yes, we have saved_face_id
> member of the iterator for this purpose.

In that case we would have a face ID for sure.

martin



reply via email to

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