Commit Graph

76459 Commits

Author SHA1 Message Date
Matthias Clasen
847739aed7 Reduce pixbuf helpers
Concentrate pixbuf handling in gdkpixbufutils.c.
2023-05-16 21:56:22 -04:00
Matthias Clasen
4d66598f31 Merge branch 'matthiasc/for-main' into 'main'
gsk: Cosmetics

See merge request GNOME/gtk!5983
2023-05-17 00:58:48 +00:00
Matthias Clasen
2ec1bd7248 Merge branch 'gl-renderer-more-defensive' into 'main'
gsk: Stop setting uniforms when we are out of batches

See merge request GNOME/gtk!5981
2023-05-17 00:29:40 +00:00
Benjamin Otte
646d1a8923 Merge branch 'wip/otte/ci-emergency' into 'main'
CI: Actually build our code

See merge request GNOME/gtk!5980
2023-05-17 00:19:06 +00:00
Matthias Clasen
4a8a6e9f70 gsk: Don't build unused functions
The only caller is #if 0 ed, so don't build
these functions.
2023-05-16 20:13:57 -04:00
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
Olivier Crête
22cd3ea268 pathbar: Fail setting the path on cancellation
The cancellation path already clears the GCancellable, if we let it
continue, it causes a later assertion, so just exit early in this case
and hope a new path has been set.

Fixes: #5792
2023-05-17 01:10:23 +01:00
Matthias Clasen
71a231b71d gsk: Stop setting uniforms when we are out of batches
When the command queue is out of batches, there is
no point in doing further work like allocating uniforms.

This helps us avoid assertions in the uniform code
that we would hit when we run out of uniform space
too.
2023-05-16 20:03:19 -04:00
Benjamin Otte
112fe06323 glrenderer: Remove unused function
Thanks, macos CI.

(We should have a Fedora clang build.)
2023-05-17 01:52:42 +02:00
Benjamin Otte
8bcb918de5 tests: Remove some tests
They are failing to build because they use deprecated functions and
nobody thinks they're worth fixing.
2023-05-17 01:24:22 +02:00
Benjamin Otte
6f6293c38c CI: Actually build our code
Commit 3090795351 accidentally caused all
CI builds (or at least the ones with -Werror) to no longer build tests,
examples and demos, so none of them had made sure that they compile.
2023-05-17 00:56:23 +02: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