This reverts commit 84a304e66e.
This produces marks that are confusing to me. They don't correlate
with actual gaps in the frame cycle and often overlap with regular
'window presented' marks. Also, the function we are emitting these
marks from is called from the get_frame_time getter, and we
definitely don't want to emit marks from there.
In order for the size change check to make sense, vk_pipeline_cache_size
needs to correspond to the size of the cache we last wrote to disk.
We were forgetting to update it after saving the cache, so the
check was ineffective.
We want to store some metadata in our symbolic pngs, so make it
possible to get options when loading a png, along with the texture.
Update all callers.
Use different codepaths for known formats vs unknown formats.
Be more careful with unknown formats and always import them as
GL_TEXTURE_EXTERNAL_OES when possible (GL can't do EXTERNAL) to avoid
problems.
This is a more defensive approach towards older drivers that don't
support modifiers.
This fixes importing YUV textures on AMD Gen8.
Another approach would be to check for YUV and never try
GL_TEXTURE_2D with them, but I decided to go this way first.
Fixes#6668
Use a format of
[XXX] SYMBOL DETAILS
where SYMBOL indicates the offloading status:
🗙 - no offload
▲ - offload above, with background
△ - offload above, no background
▼ - offload below, with background
▽ - offload below, no background
Popping an event of the queue in the IMContext handler
prevents it from being forwarded to the NSApp, in case the
(key) event was not handled by IMContext.
So I reverted to a mix of the original (4.13) and new (4.14.1) behavior
for fetching events: NSEvent lookup for IMContext uses loose matching,
so it can work with rewritten events. When sending events to NSApp, only
we're checking for an exact match.
Now in-app keyboard shortcuts (e.g. Ctrl-F2) work from within text
fields again.
We prefer it over the old DESKTOP_STARTUP_ID environment variable if we
have it and it is valid.
We have to stash and unset XDG_ACTIVATION_TOKEN in addition to
DESKTOP_STARTUP_ID now as well. This makes sure that we don't call any
library functions which might rely on some environment variables. This
way unsetting the environment variables is safe and we can then
afterwards validate and print warnings.
in the old approach it was possible that one NSEvent was
sent to the underlying NSApp multiple times. This resulted in
those events being forwarded to our (glib) event queue again.
The visual result was that no screen updates were done. Under the hood
the application was very busy with passing events around.
By popping the events off of our event queue, we make sure they're sent
only once.
Do the same checks for background coordinates that we do for the
subsurface coordinates themselves: they must be integral in both
application and device pixels.
Spew a bit less per-frame. Unfortunately, we still spew for
every frame, and fixing that would require more extensive
refactoring to centralize all logging in gskoffload.c
Add a high-level setting that gives us more freedom to tweak
font rendering knobs according to our needs. It has a 'manual'
value that lets users continue to influence font rendering using
the low-level font-related settings as before.
Once the schemas have this, we can support setting this session-wide.
See https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/-/merge_requests/79
The initial implementation of 'automatic' font rendering is fairly
simplistic: if the monitor dpi is less than 200, prefer sharpness,
so turn on metrics hinting and slight hinting. If the monitor dpi
is at least 200, we both off.
GdkVulkanContext is deprecated and only exposed in the api because
we need it as return type of the (deprecated)
gdk_surface_create_vulkan_context() API.
In fetch_net_wm_check_window(), before updating the wmspec_check_window, a
check is performed to verify a 15s difference between last_wmspec_check_time
and the current monotonic time.
The comment suggests that this check is done to ensure that it doesn't check
for a new check window repeatedly over and over again. While that was the case
origionally, currently the last_wmspec_check_time only gets updated when
wmspec_check_window is set, which is already checked earlier, making the time
check useless.
This check causes issues on cold boots where gtk4 applications are not able
to obtain the wmspec_check_window until 15 seconds after boot, making gtk
unable to check for extended wm_hints during that time.
Fixes: #6558
Do the backend call before changing the stacking order in the
frontend. This is necessary so the backend can look at the current
stacking order to determine if it will change.
Only commit things that have changed. In the ideal scenario, only
the texture changes from frame to frame, and all the sizing related
setup and the background stay the same, causing the least amount
of work in the compositor.
Rename things so they make more sense. The dest/source naming got
a bit unclear when we added background into the mix. Now we're going
for:
source_rect - the texture region to display
texture_rect - dimensions of the subsurface showing the texture
background_rect - dimensions of the background subsurface
bounds - union of texture_rect and background_rect
Also use this opportunity to add some api docs.
Make it possible for subsurfaces to have a black background on a
secondary subsurface below the actual subsurface. Using a single-pixel
buffer for that background increases the changes that the compositor
will use direct scanout for the actual subsurface.
This changes the private subsurface API. All callers have been
updated to pass an empty background rect.
This is useful for debugging offloading without having to rely
on gstreamer giving us dmabufs. To use it, set
GDK_DEBUG=force-offload
in the environment.