Commit Graph

81557 Commits

Author SHA1 Message Date
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
Matthias Clasen
6b57f596f7 Merge branch 'matthiasc/for-main' into 'main'
inspector: Add event traces

See merge request GNOME/gtk!7627
2024-08-18 21:00:01 +00:00
Matthias Clasen
cefaec5d6f node-editor: Add Ctrl-Shift-V
Make Ctrl-Shift-V trigger a 'paste-as-node' action which replaces
the current content with the render node in the clipboard.
2024-08-18 15:44:40 -04:00
Matthias Clasen
29b6eab0ea inspector: Add some shortcuts
While the inspector is open, look for some shortcuts:

Super-r to toggle recording
Super-c to take a screenshot

A screenshot here means just a single-frame recording.
For convenience, we put the recorded frame onto the
clipboard too.
2024-08-18 15:44:40 -04:00
Matthias Clasen
360674f523 inspector: Add a snapshot function
Add a function that records just a single frame, and puts it
on the clipboard.
2024-08-18 15:44:40 -04:00
Matthias Clasen
7900f91e46 widget: Record event traces
Use the newly introduced inspector api to add event traces.
2024-08-18 15:44:40 -04:00
Matthias Clasen
e4248503cf inspector: Add event traces
When recording events, make it possible to add 'traces' of the
events journey, and show those in the recorder.
2024-08-18 15:44:40 -04:00
Matthias Clasen
168bab34f7 inspector: Simplify
We can just put the render node on the clipboard directly, no
manual serialization required.
2024-08-18 15:44:40 -04:00
Matthias Clasen
46e7ea8c1e Fix a misleading comment 2024-08-18 15:44:40 -04:00
Matthias Clasen
1ce7de0fb8 Cosmetics 2024-08-18 10:44:38 -04:00
Matthias Clasen
d9a0f3cfe2 Merge branch 'matthiasc/for-main' into 'main'
node parser: Move parse_color even earlier

See merge request GNOME/gtk!7625
2024-08-17 23:35:44 +00:00
Matthias Clasen
200cec3321 inspector: Minor GdkRGBA -> GdkColor porting 2024-08-17 18:56:05 -04:00