Commit Graph

78771 Commits

Author SHA1 Message Date
Benjamin Otte
3167a5b4d6 testsuite: Rewrite the --repeat option
* Don't grow the size too much - clip the size to 1000x1000
 * Add an offset, so the repeating doesn't always start top left
2023-12-26 05:03:24 +01:00
Benjamin Otte
f5584b178d testsuite: Add a test for repeat node offscreen scaling
Ensure that the offscreens for repeat nodes pick the right xscale and
yscale so that they render pixel-aligned.
2023-12-26 05:03:24 +01:00
Benjamin Otte
332fd1b840 testsuite: Add a repeat testcase
This test tests multiple things:

1. That huge contents are properly clipped by repeat nodes, even if the
   repeat happens in the visible part
2. That repeating only horizontally or only vertically is done quickly
   via offscreens when lots of repeating is done
2023-12-26 05:03:23 +01:00
Benjamin Otte
5e85b1aa02 testsuite: Add a repeat test
Ensures that repeating actually causes repeating in the renderer by
repeating a 1x1 image a lot.
2023-12-26 05:03:23 +01:00
Benjamin Otte
7f7254f10b testsuite: Add a repeat test for child bounds
Test that if the child is a texture that extends the child bounds, that
extension does not get repeated when rendering.

This can easily happen when the child is not drawn as an offscreen, but
instead the texture cache is consulted and no check for matching size is
done.
2023-12-26 05:03:23 +01:00
Benjamin Otte
72c58ccd7d testsuite: Add another test
This test ensures that offscreens for cross-fade children are properly
clipped and that the renderers can deal with the two not overlapping.
2023-12-26 05:03:23 +01:00
Benjamin Otte
f574cc2936 testsuite: Add test for gradients
Test that it can do 64 color stops.

Should ensure that renderers either can do unlimited amounts or have
fallbacks in place.
2023-12-26 05:03:23 +01:00
Benjamin Otte
2b59c4cf16 testsuite: Test we don't crash with overly large nodes
... when these nodes are used as children of a complex transform nodes
and we lose the clip.
2023-12-26 05:03:23 +01:00
Benjamin Otte
72b35a32fd testsuite: Fix corner case when testing repeats
When we test repeat nodes, make sure we round the size of the original
node up to an integer.
The reference image for the node is a rounded up, so when we generate a
new reference image we cannot deal with anything else.

Fixes huge-width test with --repeat.
2023-12-26 05:03:23 +01:00
Benjamin Otte
97b78cede0 testsuite: Unify renderer exclusion naming
Instead of using "-3d" to exclude Cairo rendering, use "-no$renderer" to
allow excluding any renderer.
And because we use contains() for the check, we can exclude multiple
renderers by naming the test sth like "test-nogl-nocairo.node"
2023-12-26 05:03:23 +01:00
Benjamin Otte
653d1eec55 testsuite: Add a variant of an existing test
This variant ccreates a huge node in the clipped region and tests that
renderers properly clip it away.
2023-12-26 04:25:11 +01:00
Benjamin Otte
4cc2a660e3 testsuite: Add a render test for a recent segfault
Renderer tend to ignore the clip when offscreening the child of a blur
node. So make a test that oversizes that child.
2023-12-26 04:25:11 +01:00
Benjamin Otte
6ab6109149 rendernode: Redo repeat handling
The previous approach could lead to offscreens that were too large and
cause errors.
2023-12-25 19:12:57 +01:00
Matthias Clasen
e93acc5762 Merge branch 'fix-focus-events' into 'main'
main: Fix a corner case in crossing events

See merge request GNOME/gtk!6690
2023-12-23 19:23:54 +00:00
Matthias Clasen
290c02b123 window: Fix focus event generation
Sync the code in gtkwindow.c that generates focus change events
with the similar code in gtkmain.c that generates crossing events.

This fixes assertion failures that would trigger in nautilus when
opening a folder.
2023-12-23 13:00:29 -05:00
Matthias Clasen
64db415e67 main: Fix a corner case in crossing events
We don't want to set a misleading descendent in the case that
we don't have a shared ancestor at all (because the old and the
new targets are on different toplevels).
2023-12-23 13:00:29 -05:00
Matthias Clasen
ed7ff78a0d Merge branch 'enums-docs' into 'main'
docs: Improve docs for enums

See merge request GNOME/gtk!6609
2023-12-22 15:50:10 +00:00
Maximiliano Sandoval R.
e857f0a3af Add Since annotations to enums
Doing this in a way that is picked up by gobject-introspection
requires splitting off new enum members into separate doc
comments, which is a bit unfortunate.
2023-12-22 08:47:47 -05:00
Matthias Clasen
9e8adb9792 Merge branch 'wip/snwh/symbolic-assets-sync' into 'main'
gtk: Update symbolic icons with newer assets from Adwaita

See merge request GNOME/gtk!6686
2023-12-21 19:31:09 +00:00
Benjamin Otte
4e84312a5a Merge branch 'wip/otte/for-main' into 'main'
dmabuf: Let the EGL code initialize GL

See merge request GNOME/gtk!6685
2023-12-21 18:03:36 +00:00
Sam Hewitt
5d84b757e2 gtk: Update symbolic icons with newer assets from Adwaita 2023-12-21 14:11:21 -03:30
Benjamin Otte
c21ca4811e vulkan: Require Vulkan 1.3
Some dmabuf formats were added in Vulkan 1.3.

Note that this does not require the Vulkan drivers to be version 1.3 -
it just means compilation against libvulkan 1.3
2023-12-21 17:21:54 +01:00
Benjamin Otte
96152303a6 dmabuf: Let the EGL code initialize GL
The EGL downloader initialization already calls prepare_gl(), so no need
to call it in init_dmabuf_formats(), too.
2023-12-21 17:21:52 +01:00
Matthias Clasen
fe07337e02 Merge branch 'ebassi/scrolled-window-doc-fix' into 'main'
docs: Clarify behaviour of GtkScrolledWindow child accessors

See merge request GNOME/gtk!6683
2023-12-21 12:30:14 +00:00
Matthias Clasen
312c0f0b3b Merge branch 'fix-crossing-events' into 'main'
main: Fix crossing event setup

Closes #6279

See merge request GNOME/gtk!6684
2023-12-20 21:50:33 +00:00
Matthias Clasen
adc9cc568e main: Check crossing invariants on both legs
We were calling check_crossing_invariants for the ascending
part, but not for the descending part. Fix that.
2023-12-20 15:26:05 -05:00
Matthias Clasen
3e59b0b582 Fix a typo
This unfortunate typo made it so we never actually checked
the crossing invariants.
2023-12-20 15:26:05 -05:00
Matthias Clasen
6a5ee99c23 main: Fix crossing event setup
We were not determining the new descendent correctly. And since
our invariants check was ineffective, nobody noticed until now.

Fixes: #6279
2023-12-20 15:25:50 -05:00
Matthias Clasen
8fda63c85e Merge branch 'pragma-once-header-cleanup' into 'main'
media: Convert headers to #pragma once

See merge request GNOME/gtk!6682
2023-12-20 18:38:42 +00:00
Emmanuele Bassi
eccf0a6905 docs: Clarify behaviour of GtkScrolledWindow child accessors
Right now, it's mentioned only in the class description of
GtkScrolledWindow that the accessors of the child property don't
necessarily roundtrip.

Let's make it more clear by expanding the documentation of the setter,
getter, and property.

See: #6275
2023-12-20 17:50:30 +00:00
Matthias Clasen
cfa9dc6162 testsuite: Use #pragma once consistently 2023-12-20 10:55:14 -05:00
Matthias Clasen
9f068866e2 examples: Use #pragma once consistently
It is our current coding style.
2023-12-20 10:29:45 -05:00
Matthias Clasen
0d03e570b0 tests: Use #pragma once consistently
Its the current coding style.
2023-12-20 10:25:41 -05:00
Matthias Clasen
0dcf31292d icon-browser: Use #pragma once consistently
That is the current coding style.
2023-12-20 10:24:05 -05:00
Matthias Clasen
4ab18b6657 gtk4-demo: Use #pragma once consistently
This is our current coding style.
2023-12-20 09:55:11 -05:00
Matthias Clasen
957d96102a gtk: Use #pragma once consistently
One header snuck in missing it.
2023-12-20 09:52:04 -05:00
Matthias Clasen
d21a691f44 node-editor: Convert headers to #pragma once
That is our current coding style.
2023-12-20 09:51:19 -05:00
Matthias Clasen
ae5ea8e495 printing: Convert headers to #pragma once
That is our current coding style.
2023-12-20 09:44:29 -05:00
Matthias Clasen
bbabb1973c media: Convert headers to #pragma once
This is our current coding style.
2023-12-20 09:43:54 -05:00
Benjamin Otte
d2a85abf79 Merge branch 'wip/otte/dmabuf-refactoring' into 'main'
dmabuf refactoring

See merge request GNOME/gtk!6678
2023-12-20 10:25:29 +00:00
Benjamin Otte
74620ffc46 dmabufdownloader: Add a close() function
We need to unrealize renderers before unreffing them. This vfunc takes
care of that.
2023-12-20 10:59:25 +01:00
Benjamin Otte
ce04dfad41 renderer: Move function into only caller
The convert_texture() path only works for the GL renderer, the new
renderers potentially use dmabuf textures as result of render_texture(),
so they need to be smarter here.
2023-12-20 10:59:25 +01:00
Benjamin Otte
568eed9477 dmabuf: Turn the downloader into an interface
This way, we can move the actual downloader code into GSK - by just
implementing the interface in the GskGLRenderer.
2023-12-20 10:59:25 +01:00
Benjamin Otte
26561ab2e7 dmabuf: Refactor downloader vfuncs
This is in preparation for future commits. It also makes the API
clearer.
2023-12-20 01:51:46 +01:00
Benjamin Otte
26060b1be2 dmabuf: move DmabufTexture typedef
Preparation work.
2023-12-20 01:51:46 +01:00
Benjamin Otte
210c71b856 egl: Split out a function
This makes no sense by itself, but we want to create the EGLImage at
DmabufTexture construction so that we can actually reject dmabufs that
we can't create EGLImages for.

This will make it possible to bail when the stride limitation for AMD
GPUs hits.
2023-12-20 01:51:46 +01:00
Benjamin Otte
7206060450 dmabuf: Move thread marshalling into DmabufTexture
All downloaders are going to need this, it would make no sense if they
all need to duplicate that code.
2023-12-20 01:51:46 +01:00
Matthias Clasen
31cd2b19cd Merge branch 'macos-pre-10.13' into 'main'
gdk/macos: fix builds on macOS before 10.13

Closes #5738

See merge request GNOME/gtk!5813
2023-12-19 01:20:18 +00:00
Matthias Clasen
857de33937 Merge branch 'michaelweghorn/a11y_add_article_and_comment_roles' into 'main'
a11y: Add article and comment roles

See merge request GNOME/gtk!6646
2023-12-19 01:19:17 +00:00
Matthias Clasen
3d9d4031d6 Merge branch '0bsd-license' into 'main'
Add Zero-Clause BSD license

See merge request GNOME/gtk!6643
2023-12-19 01:12:38 +00:00