[Top][All Lists]

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

Re: Emacs canvas support

From: Eli Zaretskii
Subject: Re: Emacs canvas support
Date: Thu, 30 Apr 2020 17:18:55 +0300

> From: Arthur Miller <address@hidden>
> Date: Thu, 30 Apr 2020 15:11:10 +0200
> Cc: address@hidden, address@hidden
> I have a question here about display: when lisp engine decides to draw
> the display, how difficult would it be to add a callback for pre- and
> post render?

I don't think I understand the question.  It is trivial to add a call
to a Lisp function anywhere in Emacs, the question is what that
function will be able to do to be useful.  If the called Lisp can do
anything it wants, then how can it be useful without knowing a whole
lot about the window layout, and what was just now, or will be in a
moment, drawn on it, and in which parts?

> Prerender callback could be any user lisp function called
> that do anything it wants, say draw something on the screen as it owned
> window itself. Than render engine would it's ordinary rendering drawing
> just as it does now, pretending that there was nothing already drawn, so
> it would mean no change at all to current c code for rendering.

So how do we prevent the display engine from blissfully drawing over
what the pre-render draws?

> Similarly one call a post-render callback and draw over the already
> rendered text so user could draw whatever on top of already draw
> onverlas and what not.

How will the post-render know where it can and where it cannot draw?
Or even where to draw, for that matter (assuming you want to do
something more useful than just put the same pixels in the same pixel
coordinates)?  For example, if the window scrolls, wouldn't you want
the graphics drawn by these pre/post-renderers to move on display as
well, at least sometimes?  If you do, how can you do that without
knowing some details about the scroll?

> It is just how z-buffer works and it would mean z order from pre-render,
> normal render (as it is now) and post render as implicit z-depths.

AFIU, z-buffer doesn't care to obscure what's displayed below.  is
this what you have in mind: obscuring the "normal" display with some

reply via email to

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