|
From: | Cecilio Pardo |
Subject: | Re: Drawing UI elements behind text |
Date: | Wed, 27 Nov 2024 21:30:54 +0100 |
User-agent: | Mozilla Thunderbird |
On 27/11/2024 21:12, Eli Zaretskii wrote:
Date: Wed, 27 Nov 2024 21:01:42 +0100 From: Cecilio Pardo <cpardo@imayhem.com> On 27/11/2024 19:58, Eli Zaretskii wrote:They are drawn after switching the back paint buffer, so that the redisplay result is left alone.So you clear them up when redisplay starts and then redraw them in their entirety when it ends, something like that? Doesn't that slow down redisplay, especially if there are many pixels and a large window?Yes. We do a full frame copy on each double buffered redisplay, I expect we can add this with reasonable impact. The very naive implementation I have now adds something like 5ms to each redisplay on a 1900px frame, and I hope to bring it down a lot from there.What takes 5ms, exactly? what kind of redisplay did you trigger, and how did you trigger it?
A minimal redisplay, just moving the cursor around. This takes less than 1ms, including the time to copy the back buffer to the window.
When the segment drawing is activated (with tens of thousands of them, though only tens of them visible in some window) the process takes around 5ms.
This process includes: - Making a new bitmap, and copy the result of redisplay to it.- Iterate trough lisp objects to prepare the segments, clip them and draw them to this bitmap.
There is a lot of room here to make it faster.
[Prev in Thread] | Current Thread | [Next in Thread] |