Commit Graph

76349 Commits

Author SHA1 Message Date
Matthias Clasen
0a9d25c9e8 gsk: Cosmetics
Get the context from the driver.
2023-05-16 20:13:57 -04:00
Matthias Clasen
188677724c Improve test coverage for property lookup models 2023-05-16 20:13:57 -04:00
Matthias Clasen
1b885cc317 Merge branch 'fix-gsk-assertions' into 'main'
gsk: Fix a crash

See merge request GNOME/gtk!5979
2023-05-16 22:20:51 +00:00
Matthias Clasen
9dd83ab354 gsk: Fix a crash
When we start ignoring batches, we must do it everywhere,
or we may run into assertions. This was triggered by an
enormous text node tree produced by tests/rendernode-create.
2023-05-16 17:33:21 -04:00
Matthias Clasen
0bbc6f8932 Merge branch 'ebassi/issue-5837' into 'main'
Fix various compiler warnings with GCC 13

Closes #5837

See merge request GNOME/gtk!5977
2023-05-16 21:28:29 +00:00
Emmanuele Bassi
1ad4c04b2a Replace deprecated CSS loading API
Use gtk_css_provider_load_from_string() when loading CSS from C
strings.
2023-05-16 16:59:05 -04:00
Emmanuele Bassi
0bbe68db0b Implement GtkSelectionModel for GtkNotebookPages
The documentation says that the model returned by
gtk_notebook_get_pages() implements the GtkSelectionModel interface, but
checking the history confirms this is a lie.

Instead of fixing the documentation, we can easily make it true, and
reduce the differences between GtkNotebook and GtkStack.

Fixes: #5837
2023-05-16 16:59:05 -04:00
Emmanuele Bassi
b2a3a5e226 Fix various compiler warnings with GCC 13
There are various null dereference warnings in GtkListItemManager that
make the build noisy.
2023-05-16 16:59:05 -04:00
Matthias Clasen
0434ad3bd9 Merge branch 'no-deprecations-in-demos' into 'main'
demos: Stop using deprecated api

See merge request GNOME/gtk!5978
2023-05-16 20:51:01 +00:00
Matthias Clasen
9d3046f187 Merge branch 'matthiasc/for-main' into 'main'
Matthiasc/for main

See merge request GNOME/gtk!5975
2023-05-16 20:42:27 +00:00
Matthias Clasen
6b2c088a29 demos: Stop using deprecated api
Use texture apis instead of pixbuf ones.
2023-05-16 16:25:59 -04:00
Matthias Clasen
4efc736a6e Merge branch 'wip/otte/for-main' into 'main'
gdk: Clamp frame region to surface size

Closes #5812

See merge request GNOME/gtk!5976
2023-05-16 17:25:17 +00:00
Benjamin Otte
2b0e3a5b1a nodeparser: Move an error check
By putting the check earlier, it will be emitted for the right token.
2023-05-16 18:53:53 +02:00
Benjamin Otte
bac41ce644 node-editor: Print default renderer in title
If there is a value passed to GSK_RENDERER, display it in the window
title.

This is mostly so that when I show off screenshots, people know what
renderer I'm using.
2023-05-16 18:53:53 +02:00
Benjamin Otte
2b0ad09423 vulkan: Make projection matrix match GL
Vulkan has a different initial coordinate system to GL.

GL:
(-1, 1, -1) +------+.
            |`.    | `.
            |  `·--|---·
            |   :  |   :
            +------+.  :
             `. :    `.:
               `·------· (1, -1, 1)

Vulkan:
(-1, -1, 0) +------+.
            |`.    | `.
            |  `·--|---·
            |   :  |   :
            +------+.  :
             `. :    `.:
               `·------· (1, 1, 1)

so adjust the near and far plane we pass to
graphene_matrix_init_ortho() to make it end up with the same
projection as the GL renderer.
2023-05-16 18:53:27 +02:00
Benjamin Otte
f5955feea1 testsuite: Add crossfade-clip-both-children test
This one tests a crossfade between two non-overlapping nodes with a clip
region that covers neither of the two nodes.

This tests that renderers can deal with clip regions that doesn't
overlap nodes in a situation where they will most likely want to create
an offscreen.
As offscreens are typically clipped to the clip region, this would cause
an empty offscreen and that can cause failures.
2023-05-16 18:53:27 +02:00
Benjamin Otte
853e8719c6 testsuite: Add clip-translate-offscreen test
This was an experiment where an offscreen was translated inside an
existing clip.

Because renderers try to limit offscreens to the clip rect, this is
interesting, because they might get the translation wrong.
2023-05-16 18:53:27 +02:00
Benjamin Otte
8d528350b9 rendernode: clip when drawing shadows
Ensures the shadow stays small.
2023-05-16 18:53:27 +02:00
Benjamin Otte
d51c92f54d build: Make shaders depend on their includes
This does not do any proper dependency tracking, it just makes every
shader depend on every include shader.

But that's good enough for now.
2023-05-16 18:53:27 +02:00
Benjamin Otte
b9bd7124c0 vulkan: Fix typo in clipping code 2023-05-16 18:53:27 +02:00
Benjamin Otte
14f67550d0 build: Add a new gcc 13 warning
We don't trigger it and it's a useful warning. So let's use it.
2023-05-16 18:53:27 +02:00
Benjamin Otte
ee6ef41e71 css: Remove crashy resource:// optimization
Using gdk_texture_new_from_resource() is not valid here because we are
not sure if the given resource is valid.

Plus, the previous optimization is no longer relevant, because we are
not using gdk_pixbuf_new_from_resource() anymore - which was what this
optimization was about before it was ported to GdkTexture.

Test attached.
2023-05-16 18:53:27 +02:00
Benjamin Otte
fde3d2cd50 testsuite: Add testcase for z clipping
the near and far clipping plane are at -10000 and 10000 respectively.
Test that the renderers respect that.
2023-05-16 18:53:27 +02:00
Benjamin Otte
099955b0c0 gridview: Add border-spacing where it was missed
We were computing column widths without taking border-spacing into
account, making them slightly too big.
2023-05-16 18:53:09 +02:00
Benjamin Otte
b530ade8c6 gdk: Clamp frame region to surface size
The region may be larger than the surface's size, but many rendering
APIs require the size to be clamped.

Fixes #5812
2023-05-16 18:53:09 +02:00
Matthias Clasen
3a9234dadc Cosmetics 2023-05-16 12:33:12 -04:00
Matthias Clasen
3e27232028 Improve test coverage for sorters 2023-05-16 12:33:12 -04:00
Matthias Clasen
c2676ad785 Improve test coverage for GtkPropertyLookupListModel 2023-05-16 12:33:12 -04:00
Matthias Clasen
4a1598dc2a Merge branch 'fix-property-lookup-model' into 'main'
Fix a few bugs in GtkPropertyLookupListModel

See merge request GNOME/gtk!5974
2023-05-16 16:31:35 +00:00
Matthias Clasen
5f70b00bea Fix a few bugs in GtkPropertyLookupListModel
Fix bugs in property types.
2023-05-16 12:00:08 -04:00
Matthias Clasen
3377460fb8 Merge branch 'matthiasc/for-main' into 'main'
gdk: Drop some unused private api

See merge request GNOME/gtk!5973
2023-05-16 12:48:40 +00:00
Matthias Clasen
05a0aca5ab Improve test coverage for GtkStringSorter 2023-05-15 23:21:06 -04:00
Matthias Clasen
9463e0f56c Only build iconcache validator if it is used 2023-05-15 23:06:07 -04:00
Matthias Clasen
1c308431a6 Drop unneeded exports from gdkpixbufutils.c 2023-05-15 23:05:52 -04:00
Matthias Clasen
fb996f6e6d Drop an unused include 2023-05-15 23:05:52 -04:00
Matthias Clasen
edfd37dfe2 docs: Mention pixbufs in the migration guide 2023-05-15 23:05:52 -04:00
Matthias Clasen
4bede73f62 Deprecate from-pixbuf apis for widgets
We want to drop GdkPixbuf from our apis.
These have easy replacements already, so
lets deprecate them.
2023-05-15 23:05:52 -04:00
Matthias Clasen
0b59290bad gdk: Drop some unused private api 2023-05-15 20:30:38 -04:00
Matthias Clasen
e8c7d0e5ec Merge branch 'wip/corey/filesystemmodel' into 'main'
filesystemmodel: Ignore changes on the parent directory

Closes #4233

See merge request GNOME/gtk!5970
2023-05-16 00:09:56 +00:00
Matthias Clasen
3fb06ca29d Merge branch 'matthiasc/for-main' into 'main'
tools: Cosmetics

See merge request GNOME/gtk!5972
2023-05-16 00:02:15 +00:00
Matthias Clasen
013401b594 Fix texture tests with GLES
No sync for you if you're using GLES.
2023-05-15 19:11:35 -04:00
Matthias Clasen
484c4bdf22 Merge branch 'deprecate-pixbuf-apis' into 'main'
gdk: Deprecated some pixbuf apis

See merge request GNOME/gtk!5971
2023-05-15 23:03:42 +00:00
Corey Berla
133231e12b filesystemmodel: Ignore changes on the parent directory
The filesystemmodel tracks changes and additions to child files
through G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED.  This event will also
occur if the parent directory is changed.  Since the parent directory
doesn't exist in the model, it creates a non-existent item.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4233
2023-05-15 15:50:40 -07:00
Corey Berla
ef2024736d filechooserwidget: Stop leaking file system models 2023-05-15 15:50:32 -07:00
Matthias Clasen
ed265f6a7e gdk: Deprecated some pixbuf apis
These are already documented as 'don't use
in new apis'. Lets make it official and
deprecate them properly.
2023-05-15 18:22:37 -04:00
Matthias Clasen
0152286fa0 Improve test coverage for GdkGLContext 2023-05-15 16:49:12 -04:00
Corey Berla
4ef560d3b8 .gitignore: Ignore .flatpak-builder directory 2023-05-15 13:08:56 -07:00
Matthias Clasen
343472931d Cosmetics
Linkify a reference.
2023-05-15 15:25:11 -04:00
Matthias Clasen
41b606b16d Add tests for GdkTextureDownloader 2023-05-15 15:24:56 -04:00
Matthias Clasen
f83c00c928 Test gltexture update functionality 2023-05-15 12:50:28 -04:00