Commit Graph

80724 Commits

Author SHA1 Message Date
Benjamin Otte
148d7bcc25 gpu: Don't remove gc timeout unless cache is empty
If the cache isn't empty, we want to rerun the GC.
2024-07-03 19:55:18 +02:00
Benjamin Otte
71161b6352 gpu: Split cache and device
This is for 3 reasons:

1. Separation of concerns
   The device is meant to manage the Vulkan/GL device and check stuff
   like image sizes.
   Caching is not part of that.

2. Refcounting
   Images etc want to reference the device, but the cache wants to
   reference images. If the cache is the device, that's a refcycle.

3. Flexibility
   It's now easier to implement >1 cache, say one per depth or one per
   color state.
2024-07-03 19:55:15 +02:00
Benjamin Otte
dd33a2f280 rendernode: Make sure depth variable has enough bits
This will be relevant when we add new values to it.
2024-07-03 19:55:15 +02:00
Benjamin Otte
3539128d42 memoryformat: Split out a function
It's used in many places and attaching a name to what it does is useful.
2024-07-03 04:16:56 +02:00
Matthias Clasen
372c68a1c9 Merge branch 'matthiasc/for-main' into 'main'
gsk: Avoid a crash

See merge request GNOME/gtk!7408
2024-07-02 20:19:47 +00:00
Matthias Clasen
f9856d547f gsk: Avoid a crash
The subsurface in subsurface nodes can be NULL, so check before
poking at it.
2024-07-02 15:52:51 -04:00
Matthias Clasen
d0d8f6b5ee Merge branch 'popover-layout-check-fix' into 'main'
popover: Fix invalid width/height check in layout

Closes #6826

See merge request GNOME/gtk!7405
2024-07-02 03:02:18 +00:00
Matthias Clasen
28c91bf767 Merge branch 'ci-catch-segfaults' into 'main'
testsuite: Use catch as testwrapper

See merge request GNOME/gtk!7406
2024-07-02 02:59:46 +00:00
Matthias Clasen
a8bfe4e6f2 Merge branch 'popover-critical-fix' into 'main'
popover: Take shadow size into account in measure

Closes #5782 and #6796

See merge request GNOME/gtk!7403
2024-07-02 02:39:21 +00:00
Matthias Clasen
1f076432db ci: Use catch to capture stacktraces
For now, just try this out for the release build. If it works,
we can add it to the other jobs too.
2024-07-01 22:29:36 -04:00
Matthias Clasen
b6e79a7234 testsuite: Use catch as testwrapper
If we find a binary named catch, use it as test wrapper. This
will be used to capture stacktraces for crashes in ci.
2024-07-01 22:29:36 -04:00
Matthijs Velsink
68b05cadd8 popover: Fix invalid width/height check in layout
Commit a4cc95b2 introduced a check in layout() that closes the popover
if the width or height is smaller than the minimum width or height,
respectively. However, that was using gtk_widget_get_preferred_size(),
which finds out the minimum height for the minimum width and vice versa,
but not the minimum height for the layout width and vice versa. So,
certain popovers were not showing, even though they would not have
generated a critical to begin with.

To fix this, we copy the logic from gtk_widget_allocate() that generates
the criticals, and use that to check if we have a good width/height for
the popover native or not.

Closes #6826
2024-07-02 03:54:08 +02:00
Matthijs Velsink
93c5fb0b31 popover: Take shadow size into account in measure
Commit b9487997 introduced shadows for GtkPopover. These are correctly
subtracted while allocating the child widget, but the child is not
measured with those shadows subtracted (as is correctly done for the
arrow). This can give criticals, for example with some wrapping labels.

To fix this, we subtract the shadow size from the `for_size` before
passing it to the measure() of the child widget.

Closes #5782
Fixes #6796
2024-07-02 02:50:29 +02:00
Benjamin Otte
cfdbf95cb6 Merge branch 'wip/otte/for-main' into 'main'
gdk: Add GDK_N_DEPTHS to the enum

See merge request GNOME/gtk!7402
2024-07-02 00:33:21 +00:00
Benjamin Otte
b80e33b209 testsuite: Add tests for empty mask children
The compare tests use an empty container node, but running them with
--replay ends up with empty nodes in snapshots due to how containers are
replayed.

Related: !7396
Related: #6761
2024-07-02 02:04:06 +02:00
Benjamin Otte
9f7254a2d0 gl: Fix wrong drawing of mask node corner case
An empty mask with inverted-alpha means the source is visible.
2024-07-02 02:04:06 +02:00
Benjamin Otte
00e59c385e snapshot: no inverted-alpha mask means everything visible
That's what inverted does to us.

Related: !7396
Related: #6761
2024-07-01 20:30:25 +02:00
Benjamin Otte
43c2b53811 rendernode: Remove default empty draw function
No node ever wants to draw nothing. So make sure code crashes if the
draw func is not set instead of silently drawing nothing.
2024-07-01 20:30:25 +02:00
Benjamin Otte
c645acc214 memoryformat: Use the correct type
Our color values are float[4], so make them float[4].
2024-07-01 20:07:22 +02:00
Benjamin Otte
33d87bc22e gdk: Add GDK_N_DEPTHS to the enum
We are indexing arrays by the number of depths, and when adding depths
we don't want to forget to grow those arrays.
2024-07-01 20:07:22 +02:00
Matthias Clasen
a35f9102f2 Merge branch 'aspectframe_doc_fix_css_name' into 'main'
aspectframe: fix CSS name in docs

See merge request GNOME/gtk!7400
2024-06-30 12:57:46 +00:00
Matthias Clasen
525d773a30 Merge branch 'matthiasc/for-main' into 'main'
Matthiasc/for main

See merge request GNOME/gtk!7399
2024-06-30 12:54:15 +00:00
g.willems
d22812ae35 aspectframe: fix CSS name in docs 2024-06-30 14:06:31 +02:00
Matthias Clasen
1dc70ebb07 Post-release version bump 2024-06-29 21:45:28 -04:00
Matthias Clasen
297e4f6134 4.15.3 2024-06-29 21:24:51 -04:00
Matthias Clasen
4e73297cb8 Merge branch 'matthiasc/for-main' into 'main'
ci: Build demos and man pages for docs

See merge request GNOME/gtk!7398
2024-06-29 23:16:04 +00:00
Matthias Clasen
8fe16190b9 ci: Build demos and man pages for docs
That way, we should get all the man pages online.
2024-06-29 18:48:15 -04:00
Matthias Clasen
047ab10a5c Merge branch 'matthiasc/for-main' into 'main'
css: Update flags for array values properly

Closes #6814

See merge request GNOME/gtk!7397
2024-06-29 19:33:29 +00:00
Matthias Clasen
3c8e9231ea css: Fix up incomplete resolve plumbing
I didn't quite get it right for all our image subtypes at first.

Fixes: #6814
2024-06-29 15:07:22 -04:00
Matthias Clasen
cb9c57f223 css: Update flags for array values properly
When computing or resolving array values, update the
is_computed and contains_current_color flags as needed.
2024-06-29 15:05:36 -04:00
Matthias Clasen
253e8f0d64 Merge branch 'docs-gtk-fix' into 'main'
Fix docstring errors in GTK

See merge request GNOME/gtk!7300
2024-06-29 15:23:30 +00:00
Emmanuele Bassi
4aee2c3c41 Merge branch 'amolenaar/macos-keybindings' into 'main'
macOS: Add native keyboard shortcuts

Closes #3421

See merge request GNOME/gtk!7260
2024-06-29 14:24:47 +00:00
Matthias Clasen
2641aad318 Merge branch 'matthiasc/for-main' into 'main'
snapshot: Don't crash and don't leak

See merge request GNOME/gtk!7396
2024-06-29 14:18:25 +00:00
Matthias Clasen
346fcdb405 snapshot: Don't crash and don't leak
We were trying to handle a NULL mask child, unsuccessfully.

Pointed out by Niels De Graef.
2024-06-29 09:31:21 -04:00
Maximiliano Sandoval
9564e4c178
gtkprinter: Add docs for GtkPrintBackend 2024-06-29 15:14:33 +02:00
Maximiliano Sandoval
50dd958890
gdktoplevel: Document toplevel_titlebar_gesture 2024-06-29 15:14:33 +02:00
Maximiliano Sandoval
9126bf2c9d
docs: gsk: Add docstring for BroadwayRenderer 2024-06-29 15:14:33 +02:00
Maximiliano Sandoval
a692f0cb07
docs: Add gi-docgen check to tests
Can be called via:

    meson test --suite docs
2024-06-29 15:14:33 +02:00
Maximiliano Sandoval
2bbfa92504
docs: Skip checking deprecated classes in gtk4 2024-06-29 15:14:33 +02:00
Maximiliano Sandoval
0e74355782
gdk: docs: Do not check KEY_* symbols
Documenting them is overkill.
2024-06-29 15:14:33 +02:00
Maximiliano Sandoval
be137358f1
gdktypes: Hide DECLARE_INTERNAL_TYPE docs
This is private API.
2024-06-29 15:14:32 +02:00
Maximiliano Sandoval
d9564df6a7
gtk: docs: Ignore gtk-private-changed signal 2024-06-29 15:14:32 +02:00
Maximiliano Sandoval
3f9ad44948
gsk: docs: Ignore INCLUDE_WARNING macro
This is private.
2024-06-29 15:14:32 +02:00
Maximiliano Sandoval
c73ff197e0
gsk: meson: Document renderers
These contain docstrings.
2024-06-29 15:14:32 +02:00
Maximiliano Sandoval
1ad1a13085
gtktestatcontext: Document assertion_meesage_role
This, and many methods in this file, lands in GIR and should be documented.
2024-06-29 15:14:32 +02:00
Maximiliano Sandoval
50e3a37b7a
gtk: meson: Add files with public API correctly
Example symbols documented in these files are:

- gtk_snapshot_append_layout
- gtk_accessible_state_init_value
- gtk_text_mark_set_visible
2024-06-29 15:14:31 +02:00
Matthias Clasen
7d3970546c Merge branch 'fix_help_text' into 'main'
a11y: Fix the help text property bridging to ATSPI

See merge request GNOME/gtk!7348
2024-06-29 13:01:09 +00:00
Matthias Clasen
3d739c6a15 Merge branch 'matthiasc/for-main' into 'main'
rendernode: Set proper values for fill and stroke nodes

See merge request GNOME/gtk!7394
2024-06-29 12:55:21 +00:00
Benjamin Otte
16692f9f5e vulkan: Remove unused function 2024-06-29 07:14:03 -04:00
Benjamin Otte
4f453ab521 vulkan: Rename variable
It's not a format.
2024-06-29 07:13:54 -04:00