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
In the case where a portals.conf file does not exist in the user
configuration, there is nothing to patch; we should default to defining
the relevant portals for kitty.
1. Make sure we coalesce XDG_DATA_HOME as per the spec
On my machine /etc/profile.d/flatpak.sh sets
XDG_DATA_DIRS=$HOME/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
but XDG_DATA_HOME is unset.
2. Update directory creation logic to find-or-create
`enable_portal`'s current behavior is to first find a writable directory and
write the portal definition to it, then fall back to creating a directory
in the first available configuration directory.
This is incorrect in the case where one of the locations in
XDG_DATA_DIRS already has a directory, we should still prioritize
XDG_DATA_HOME.
Uses sRGB with the sRGB transfer function. Seems to give identical
results as not specifying a color space. But sadly does not get the
compositor to blend in linear space, we need another wayland protocol
extension for that I suppose. Sigh.