Commit Graph

81234 Commits

Author SHA1 Message Date
Matthias Clasen
c9c0d444a2 cairo: Add gdk_cairo_set_source_color
This lets us set a GdkColor as a cairo source.
2024-08-05 11:11:14 -04:00
Matthias Clasen
13a8704f51 Add GdkColor
For now, this is all private api.

Parts of it will be opened up in 4.18.
2024-08-05 11:11:14 -04:00
Matthias Clasen
ffc89e40a0 colorstate: Add a color conversion function
Add a function for converting a single color from one
color state to another. This is a generalization of the
already existing function to convert a GdkRGBA to another
color state.
2024-08-04 14:21:15 -04:00
Matthias Clasen
12e0ec0b48 Add gtk_css_parser_has_percentage 2024-08-03 22:31:32 -04:00
Matthias Clasen
5574bf59f6 Disable blur-performance build
This is an old test that isn't very relevant anymore, and it has
some linking problems because it includes private headers that
have inlined functions.
2024-08-03 22:31:21 -04:00
Matthias Clasen
7ee27cc0ad Merge branch 'matthiasc/for-main' into 'main'
gpu: Rename function

See merge request GNOME/gtk!7548
2024-08-04 01:23:41 +00:00
Benjamin Otte
126d689086 gpu: Rename function
We want to reuse gsk_gpu_color_to_float() for use with GdkColor and this
function will be replaced. But until that's fully done, we need 2
different names.

So rename this one to something else
2024-08-03 20:59:40 -04:00
Matthias Clasen
3fca84f974 Merge branch 'matthiasc/for-main' into 'main'
Fix a copy-paste error

See merge request GNOME/gtk!7543
2024-08-02 13:45:40 +00:00
Matthias Clasen
2be48a8f86 Pass ccs to the cairo blur code
This is needed to set the color properly.
2024-08-02 09:13:41 -04:00
Matthias Clasen
389d246af8 Fix up the blur-performance test
Add a hack to work aroundt he fact that the blur performance test
includes private headers which inline accesses to non-exported
variables.
2024-08-02 09:12:37 -04:00
Matthias Clasen
9e0f41bd05 Fix a copy-paste error
We were using the wrong api to get the color of an outset shadow
node. This just worked by luck.
2024-08-02 09:00:51 -04:00
Matthias Clasen
564a237454 Merge branch 'matthiasc/for-main' into 'main'
Cosmetics: Remove a leftover line

See merge request GNOME/gtk!7540
2024-08-01 22:24:55 +00:00
Matthias Clasen
86b59ba643 Cosmetics: Remove a leftover line
This looks just like a copy-paste leftover. Suprisingly, it compiled
just fine and worked too.
2024-08-01 17:19:50 -04:00
Matthias Clasen
487e568722 Merge branch 'matthiasc/for-main' into 'main'
vulkan: Don't try srgb for the atlas

Closes #6887

See merge request GNOME/gtk!7539
2024-08-01 19:40:00 +00:00
Matthias Clasen
67080dab21 vulkan: Don't try srgb for the atlas
This makes the Emoji rendering come out wrong.

Fixes: #6887
2024-08-01 14:43:49 -04:00
Benjamin Otte
0809e6585d Merge branch 'wip/otte/for-main' into 'main'
vulkan: Add error checking in a place

See merge request GNOME/gtk!7538
2024-08-01 11:14:12 +00:00
Benjamin Otte
809b98c96e vulkan: Don't leak fds
It makes sense to close the fds before doing an early return.
D'oh.
2024-08-01 12:51:46 +02:00
Benjamin Otte
059af1365a vulkan: Add error checking in a place
Doesn't hurt to have, but I just added it while debugging something
unrelated.
2024-08-01 12:51:46 +02:00
Matthias Clasen
fbcffb36c8 Merge branch 'matthiasc/for-main' into 'main'
Drop debug code

See merge request GNOME/gtk!7536
2024-08-01 01:31:16 +00:00
Matthias Clasen
3af0cfb53b Drop debug code
The dmabuf download code for P010 had a hack left in it that
was preventing it from working.
2024-07-31 21:08:14 -04:00
Matthias Clasen
96422fcf52 Merge branch 'no-cursor-viewport' into 'main'
wayland: No viewporter for cursors

See merge request GNOME/gtk!7531
2024-07-31 20:23:34 +00:00
Matthias Clasen
2754f2be2d Merge branch 'test-cal-31' into 'main'
ci: avoid another date-dependent failure

See merge request GNOME/gtk!7535
2024-07-31 20:12:16 +00:00
Matthias Clasen
3d802177be wayland: No viewporter for cursors
The outlook for mutter supporting this in GNOME 47 are cloudy,
so lets flip the switch back. You can still set
USE_POINTER_VIEWPORT in the environment to try this code.
2024-07-31 07:44:48 -04:00
Matthias Clasen
a02d4ba2a1 Merge branch 'matthiasc/for-main' into 'main'
dmabuf: Fix the disjointness check

See merge request GNOME/gtk!7529
2024-07-31 05:04:02 +00:00
Matthias Clasen
249cf0833c dmabuf: Fix the disjointness check
We were checking the wrong fds here.

This came up while toying with udmabuf and creating multi-plane
NV12 buffers.
2024-07-30 23:44:07 -04:00
Jeremy Bícha
20b00d3947 ci: avoid another date-dependent failure
Set the day before setting the month to avoid
failure when running the test on the 31st day of a month
2024-07-30 15:50:12 -04:00
Matthias Clasen
269dcaaadf Post-release version bump 2024-07-30 15:14:25 -04:00
Matthias Clasen
322bbd2376 4.15.4 2024-07-30 12:50:22 -04:00
Benjamin Otte
52bec248ce Merge branch 'wip/otte/for-main' into 'main'
gpu: Fix shadows even more

See merge request GNOME/gtk!7527
2024-07-30 16:29:59 +00:00
Benjamin Otte
9f71528a05 gpu: Fix shadows even more
Math is hard.

But this time, it comes with a test!
2024-07-30 18:01:45 +02:00
Benjamin Otte
65e02a3bae Merge branch 'wip/otte/for-main' into 'main'
gpu: Fix shadows some more

Closes #6896

See merge request GNOME/gtk!7526
2024-07-30 14:48:34 +00:00
Benjamin Otte
defc4d335e gpu: Fix shadows some more
It turns out the "step" variable could up as 0 when p.y ~= 3.0 ||
p.y ~= r.y - 3.0
That was not enough to trigger it though because if "start" and "end"
were the same value, the "y <= end" check in the loop would immediately
terminate it.

However, if start + epsilon == end so that end != start but (end - start)
/ 7 == 0, then step would end up as 0 and the loop would never
terminate.

And if that happened, it would bring down GPUs.
So recode this whole machinery to make it impossible to infloop.

Fixes #6896
2024-07-30 16:09:38 +02:00
Benjamin Otte
bdcfcfa5b9 Merge branch 'wip/otte/for-main' into 'main'
gpu: Draw proper shadows again

Closes #6888

See merge request GNOME/gtk!7518
2024-07-30 00:19:37 +00:00
Benjamin Otte
4a94c91772 gpu: Don't blur tiny blur radii
We get those wrong, and there's not really a visual effect.

And since we do a check anyway, just disallow them and treat them as
unblurred.
2024-07-30 01:50:56 +02:00
Benjamin Otte
cc3ed89e34 gpu: Draw proper shadows again
The fix in commit 5e7f227d broke shadows while trying to make them
faster.
So use a better way to make them faster.

With the normalized blur radius, we can now conclude that all the values
too far from p.y will cause the gauss() call to return close to 0, so we
can skip any y value that is too far from p.y.

And that allows us to put an upper limit on the loop iterations.

Tests included

Fixes #6888
2024-07-30 01:50:56 +02:00
Benjamin Otte
87e8265a2d Merge branch 'wip/otte/colomplications' into 'main'
wayland: Do not use compositor-provided image descriptions

See merge request GNOME/gtk!7522
2024-07-29 17:56:41 +00:00
Matthias Clasen
9fd6d431e3 Merge branch 'fix-ephy-crash' into 'main'
subsurface: Avoid a crash

Closes #6891

See merge request GNOME/gtk!7521
2024-07-29 17:39:05 +00:00
Benjamin Otte
5059ae1d7b gpu: Simplify box-shadow shader
Instead of doing complicated math, normalize the values to a sigma
of 1.0, and then use that.
This should also be beneficial for shader performance, because 1.0 is a
constant and constant-elimination can kick in on the inlined functions.
2024-07-29 19:14:10 +02:00
Benjamin Otte
50bb42f0f3 gl: Don't crash on box shadows with negative scales
Some places didn't fabs() the scale values properly, leading to
assertions when offscreens with negative sizes were created.
2024-07-29 19:14:10 +02:00
Benjamin Otte
d71a7c901d wayland: Do not use compositor-provided image descriptions
When the compositor sends us an image description, we currently happily
reuse it.

However, those image descriptions may contain optional properties that
we do not handle - example: reference white level. So if we were to
reuse that image description, we would set a wrong reference white
level.

To avoid issues like that, never use compositor-provided image
descriptions.

However, query those image descriptions and map them to the closest
GdkColorState, so that we can quickly look up *our* version of that
image description and use that one.
2024-07-29 18:45:41 +02:00
Matthias Clasen
65f727731c subsurface: Avoid a crash
When finalizing a subsurface, we need to make sure it is removed
from the sibling lists in its parent, or bad things will happen.

This should crashes seen in Epiphany nightly.

Fixes: #6891
2024-07-29 11:54:10 -04:00
Matthias Clasen
ff60b19e4b Merge branch 'matthiasc/for-main' into 'main'
image-tool: Add an --undecorated option

See merge request GNOME/gtk!7520
2024-07-29 15:52:42 +00:00
Matthias Clasen
b8f12c5d28 cicp: Improve the docs
Fix some formatting issues, and document GdkCicpRange.
2024-07-29 11:17:13 -04:00
Matthias Clasen
bfb779ac2f gsk: Add missing cicp transfer functions
This was overlooked in 50ea9450ea.
2024-07-29 10:35:32 -04:00
Matthias Clasen
84c28d2efb image-tool: Add an --undecorated option
This is useful if you want to debug things and don't want to end
up in the decoration rendering code paths.
2024-07-29 08:13:21 -04:00
Matthias Clasen
06372c5f2a Merge branch 'matthiasc/for-main' into 'main'
Fix indirect color state conversions

See merge request GNOME/gtk!7519
2024-07-29 11:11:28 +00:00
Matthias Clasen
3d75292c4d Fix indirect color state conversions
convert_func2 is a 'from' conversion function, ie it expects to
be passed the target color state. This was wrong both in
gdk_memory_convert and gdk_memory_convert_color_state.
2024-07-28 23:40:59 -04:00
Matthias Clasen
541ffbe4b5 Merge branch 'matthiasc/for-main' into 'main'
gst: Fix a wrong unref function

See merge request GNOME/gtk!7517
2024-07-28 23:35:16 +00:00
Matthias Clasen
17524f2794 gst: Fix a wrong unref function
Use gdk_color_state_unref on a color state.
2024-07-28 19:09:05 -04:00
Matthias Clasen
1040d7c7e4 Merge branch 'matthiasc/for-main' into 'main'
cicp: Fill in some more transfer functions

See merge request GNOME/gtk!7515
2024-07-28 20:51:40 +00:00