mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 14:04:52 +02:00
Rewrite rendering pipeline
This was needed to fix various corner cases when doing blending of colors in linear space. The new architecture has the same performance as the old in the common case of opaque rendering with no UI layers or images. In the case of only positive z-index images there is a performance decrease as the OS Window is now rendered to a offscreen texture and then blitted to screen. However, in the future when we move to Vulkan or I can figure out how to get Wayland to accept buffers with colors in linear space, this performance penalty can be removed. The performance penalty was not significant on my system but this is highly GPU dependent. Modern GPUs are supposedly optimised for rendering to offscreen buffers, so we will see. The awrit project might be a good test case. Now either we have 1-shot rendering for the case of opaque with only ext or all the various pieces are rendered in successive draw calls into an offscreen buffer that is blitted to the output buffer after all drawing is done. Fixes #8869
This commit is contained in:
@@ -30,7 +30,7 @@ from kitty.fast_data_types import (
|
||||
)
|
||||
from kitty.fast_data_types import Cursor as C
|
||||
from kitty.rgb import to_color
|
||||
from kitty.utils import is_ok_to_read_image_file, is_path_in_temp_dir, sanitize_title, sanitize_url_for_dispay_to_user, shlex_split, shlex_split_with_positions
|
||||
from kitty.utils import is_ok_to_read_image_file, is_path_in_temp_dir, sanitize_title, sanitize_url_for_display_to_user, shlex_split, shlex_split_with_positions
|
||||
|
||||
from . import BaseTest, filled_cursor, filled_history_buf, filled_line_buf
|
||||
|
||||
@@ -466,7 +466,7 @@ class TestDataTypes(BaseTest):
|
||||
if os.path.isdir('/dev/shm'):
|
||||
with tempfile.NamedTemporaryFile(dir='/dev/shm') as tf:
|
||||
self.assertTrue(is_ok_to_read_image_file(tf.name, tf.fileno()), fifo)
|
||||
self.ae(sanitize_url_for_dispay_to_user(
|
||||
self.ae(sanitize_url_for_display_to_user(
|
||||
'h://a\u0430b.com/El%20Ni%C3%B1o/'), 'h://xn--ab-7kc.com/El Niño/')
|
||||
for x in ('~', '~/', '', '~root', '~root/~', '/~', '/a/b/', '~xx/a', '~~'):
|
||||
self.assertEqual(os.path.expanduser(x), expanduser(x), x)
|
||||
|
||||
Reference in New Issue
Block a user