Commit Graph

81774 Commits

Author SHA1 Message Date
Benjamin Otte
6a986f03b6 gpu: Simplify the blur op a bit
I was looking through it and thought this looks better.

It's also 21 lineas of code less.
2024-08-23 19:01:05 +02:00
Ekaterine Papava
a52ae238ab Update Georgian translation 2024-08-23 09:55:42 +00:00
Yuri Chornoivan
8a0d688a61 Update Ukrainian translation 2024-08-23 04:43:09 +00:00
g.willems
3260b8f142 applicationwindow: set menubar a11y label
This fixes a warning from the inspector's accessibility checker.

Users only control the menu model, not the menubar widget,
so this can only be done in gtk.
2024-08-22 22:46:30 +02:00
Jordi Mas i Hernandez
dc8e01d469 Update Catalan translation 2024-08-22 18:46:28 +00:00
Matthias Clasen
0105da3238 Merge branch 'main' into 'main'
textbuffer: Clear paste point override from empty middle clicks

Closes #5530

See merge request GNOME/gtk!6811
2024-08-22 18:11:05 +00:00
Yosef Or Boczko
8979515aa4 Update Hebrew translation 2024-08-22 15:41:53 +00:00
Vasil Pupkin
a8c827455d Update Belarusian translation 2024-08-22 00:25:24 +00:00
Benjamin Otte
798edf5300 Merge branch 'wip/otte/for-leio' into 'main'
Only run a single renderpass

See merge request GNOME/gtk!7594
2024-08-21 20:11:52 +00:00
Benjamin Otte
54758bee1f gpu: Only run a single renderpass
Instead of running one renderpass per clip region, run one renderpass for
the whole clip extents, and just set the scissor to the individual clip
rects.

This means that we need to use LOAD_OP_LOAD in cases where we don't
redraw the full extents, but nonetheless, the eprformance wins of
avoiding renderpasses are worth it, in particualr on tilers like the
Raspberry Pi or other mobile chips and the Apple M1/2.
2024-08-21 21:13:34 +02:00
Benjamin Otte
cfe0da1eed gpu: Add GskGpuLoadOp
We want to differentiate between CLEAR, DONT_CARE and LOAD in the
future, and the current boolean doesn't allow that.

Also implement support for the the different ops in the Vulkan
renderpass code.
2024-08-21 21:13:34 +02:00
Benjamin Otte
1198dc76a4 gpu: Add gsk_gpu_first_node_begin_rendering()
This starts the renderpass at the given scissor rect.

It just splits out the gsk_gpu_render_pass_begin_op() call into a
simpler function, so it's harder to mess up.
2024-08-21 21:13:34 +02:00
Benjamin Otte
bed3e9918b gpu: Add GskGpuFirstNodeInfo
Just encapsulate all the data for the add_first_node() call into a
single struct.
2024-08-21 21:13:34 +02:00
Benjamin Otte
d76bb2991a gpu: Refactoring: Pull out nodeprocessor
Add gsk_gpu_node_processor_set_scissor() that allows resetting the
nodeprocessor's scissor and clip rectangle.
That in turn allows using the same nodeprocessor instance for all the
rects we draw for the clip region.
2024-08-21 21:13:34 +02:00
Benjamin Otte
e962e86fcd gpu: Split out a function
converting an image to any colorstate (not just ccs-capable default
colorstates) can go in its own function.
2024-08-21 21:13:34 +02:00
Benjamin Otte
dd59c90842 rendernode: repeeat nodes with empty child bounds are transparent
So they must not copy the fully_opaque flag from the child.

Adapted the testcase that accidentally caught it do now always catch it
by setting a proper background.
2024-08-21 21:13:26 +02:00
Emmanuele Bassi
c03720879e Merge branch 'fix-text-a11y-more' into 'main'
a11y: More text interface fixes

Closes #6951

See merge request GNOME/gtk!7638
2024-08-21 16:12:55 +00:00
Matthias Clasen
a62787ebb2 a11y: More text interface fixes
The old bytes-vs-chars problem exists in more places.

Fixes: #6951
2024-08-21 11:33:11 -04:00
Matthias Clasen
2a7541342c Merge branch 'migration-docs-fix' into 'main'
docs: Fix various minor typos and improve formatting in the 4-to-5 migration guide

See merge request GNOME/gtk!7637
2024-08-21 15:17:59 +00:00
Philip Withnall
f96d6cdb2b
docs: Improve code tagging and API cross-reference links in 4-to-5 guide
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-08-21 15:03:44 +01:00
Philip Withnall
3ea6ddd321
docs: Improve Unicode usage in 4-to-5 migration guide
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-08-21 13:10:29 +01:00
Philip Withnall
17f7d80fcf
docs: Fix various minor typos in the 4-to-5 migration guide
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-08-21 13:08:14 +01:00
Scrambled 777
e3437c748a Update Hindi translation 2024-08-21 08:57:29 +00:00
Benjamin Otte
f1d80727d0 Merge branch 'wip/otte/i-see-dead-textures' into 'main'
gpu: Be more aggressive about GC'ing dead textures

See merge request GNOME/gtk!7636
2024-08-21 08:18:53 +00:00
Benjamin Otte
c7fabe2897 gpu: Be more aggressive about GC'ing dead textures
When we encounter many dead textures, we want to GC. Textures can take
up fds (potentially even more than 1) and when we are not collecting
them quickly enough, we may run out of fds.

So GC when more then 50 dead textures exist.

An example for this happening is recent Mesa with llvmpipe udmabuf
support, which takes 2 fds per texture and the test in
testsuite/gdk/memorytexture that creates 800 textures of ~1 pixel each,
which it diligently releases but doesn't GC.

Related: #6917
2024-08-21 09:45:05 +02:00
Chun-wei Fan
cc1c3799b6 Merge branch 'wgl-report-damage' into 'main'
GdkWin32GLContextWGL: Add support for incremental rendering

See merge request GNOME/gtk!7418
2024-08-21 02:37:41 +00:00
Martin
a196bf1132 Update Slovenian translation 2024-08-20 04:54:07 +00:00
Matthias Clasen
4bcfeebdea Merge branch 'emoji-chooser-size' into 'main'
emojichooser: Resize according to screen height

See merge request GNOME/gtk!7631
2024-08-20 02:02:16 +00:00
Matthias Clasen
740965016f Merge branch 'matthiasc/for-main' into 'main'
Add a GDK_DISABLE env var

See merge request GNOME/gtk!7632
2024-08-20 01:58:54 +00:00
Matthias Clasen
39e6301f42 win32: Adapt to default flag changes
I hope this change does the right thing.
2024-08-19 21:37:49 -04:00
Matthias Clasen
fd02c885e9 docs: Remove outdated information
We no longer disable debug flags in non-debug builds.
2024-08-19 20:40:32 -04:00
Matthias Clasen
26a2966a7b gdk: Beef up gdk_parse_debug_var
Add a docstring for the variable itself, and print it as part
of the help message. Update all callers to provide a docstring.
2024-08-19 20:40:32 -04:00
Matthias Clasen
29cfcbdc97 wayland: Respect GDK_DISABLE=color-mgmt
If the color-mgmt feature is disabled, don't use the
xx-color-management-v4 protocol.
2024-08-19 20:40:32 -04:00
Matthias Clasen
de62ea96ab Add GDK_DISABLE=color-mgmt
This flag is meant to turn off color management features of GDK.
If this is set, all surfaces will report sRGB as their preferred
color state.
2024-08-19 20:40:32 -04:00
Matthias Clasen
2d230f79a6 Change the offload-disable flag
Move this from GSK_DEBUG=offload-disable to GDK_DISABLE=offload.
2024-08-19 20:40:32 -04:00
Matthias Clasen
cde094a0df Add a GDK_DISABLE env var
This is taking over the feature-disabling keys from GDK_DEBUG.
2024-08-19 20:40:32 -04:00
Benjamin Otte
2fb3dc8c90 Merge branch 'wip/otte/for-main' into 'main'
wayland: Create EGL window in make_current() if necessary

Closes #6930

See merge request GNOME/gtk!7633
2024-08-19 23:34:35 +00:00
Benjamin Otte
f6a8ba0ccb gpu: The colorstate op doesn't need a colorstates arg
It's using the same colorstate all the time: any premultiplied.

So just hardcode it.
2024-08-20 01:05:20 +02:00
Benjamin Otte
f650f96b69 egl: Don't bind to NULL surface unless surfaceless
We need to ensure that an EGL surface exists before we call
eglMakeCurrent() with it. Otherwise we might end up binding to
EGL_NO_SURFACE and then never revising that decision.
Which leads to not rendering to the backbuffer, but into the void.

Fixes X11 rendering being black

Fixes #6930
2024-08-20 01:05:20 +02:00
Benjamin Otte
c230546a2c wayland: Create EGL window in make_current() if necessary
We make_current() before begin_frame() so doing it only in begin_frame()
is too late.
2024-08-20 01:05:20 +02:00
Benjamin Otte
f3ac0535f8 gl: Use the shared GL context when creating GL textures
the non-shared context's surface must survive the lifetime of the
GL texture, and when the renderer gets unrealized the surface goes away,
but we cannot guarantee that all GL textures have been destroyed by
then.

So better use a context we know will survive becuase it isn't bound to a
surface.
2024-08-20 01:05:20 +02:00
Artur S0
7ce942d3fb Update Russian translation 2024-08-19 14:07:35 +00:00
Mat
56a8e947df emojichooser: Resize according to screen height
Since a4cc95b293, the emoji chooser
can fail to appear on smaller screens, depending on where its parent
widget is located. Stop requesting a fixed height to prevent this
issue.
2024-08-19 08:19:04 +03:00
Chun-wei Fan
f592a303e4 Merge branch 'vulkan-win32-fix-resize' into 'main'
gdksurface-win32.c: Call _gdk_surface_update_size() more (fix resizing on Vulkan on certain drivers)

Closes #6565

See merge request GNOME/gtk!7562
2024-08-19 03:53:29 +00:00
Chun-wei Fan
e14670d457 gdksurface-win32.c: Call _gdk_surface_update_size() more
The current resizing implementation in the GDK-Win32 backend is not
telling GDK early enough for Vulkan that a resize in the surface (i.e.
HWND) is done, so that GDK can re-create swapchain in time, which is
apparent on nVidia drivers (and AMD drivers that utilize the mailbox
presentation mode on Windows) when the HWND is being enlarged
interactively.

To work around this, bar a refactor in the Windows resizing/presentation
code, is to call _gdk_surface_update_size() when we really did resize
the HWND when we handle queued resizes via SetWindowsPos().

The existing call in gdksurface-win32.c in
_gdk_win32_surface_compute_size() remains required, otherwise the
surface won't display initially.

Thanks to Benjamin Otte for pointing this possibility out.
2024-08-19 11:25:50 +08:00
Matthias Clasen
0acf9caa8e Merge branch 'matthiasc/for-main' into 'main'
node-editor: Make Ctrl-Shift-V undoable

See merge request GNOME/gtk!7629
2024-08-19 02:20:52 +00:00
Matthias Clasen
22860389de node-editor: Make Ctrl-Shift-V undoable 2024-08-18 21:45:25 -04:00
Matthias Clasen
16e764b402 wayland: Use interface names defined by protocol
We don't need to hardcode all the interface names as string literals,
since they come as part of the wl_interface structs in the protocol
bindings we use.
2024-08-18 18:23:18 -04:00
Matthias Clasen
85862c4e22 Merge branch 'matthiasc/for-main' into 'main'
Document new inspector functionality

See merge request GNOME/gtk!7628
2024-08-18 21:37:55 +00:00
Matthias Clasen
eb764d43f8 Document new inspector functionality
Mention the new shortcuts for recording.
2024-08-18 17:14:28 -04:00