Benjamin Otte
d2f45dae96
vulkan: offscreens are used as color attachments
...
... so set the corresponding flag.
Also name the function "new_for_offscreen()" because thats what this
function is about, "texture" is ambiguous.
2023-06-04 19:42:00 +02:00
Benjamin Otte
0e31cf9542
vulkan: compute new modelview directly
...
no need to go through a GskTransform
2023-06-04 19:42:00 +02:00
Benjamin Otte
af901a10e3
vulkan: Make border shader handle fractional widths
...
We were rounding widths properly, make sure we always round up.
2023-06-04 19:42:00 +02:00
Benjamin Otte
3d1a607367
vulkan: Don't round corners when growing rounded rect
...
If the corner is set to 0, keep it there.
2023-06-04 19:42:00 +02:00
Benjamin Otte
1be21a33d9
vulkan: Rewrite rounded rectangle to use SDF distance
...
We can use this to properly compute distance in scaled situations.
We also now compute coverage with (imperfect) antialiasing.
2023-06-04 19:42:00 +02:00
Benjamin Otte
64bcdb713c
vulkan: Start rework on shaders to allow antialiased drawing
...
This introduces the rect object and adds a rect_distance() and
rect_coverage() function.
_distance() returns the signed distance tp the rectangle.
_coverage() returns the coverage of a pixel centered at that position.
Note that the pixel size is computed using dFdx/dFdy.
2023-06-04 19:42:00 +02:00
Benjamin Otte
4a868736f9
vulkan: Render whole texture
...
When the node bounds were a non-integer size, the texture would get
ceil()ed pixels, but various viewport or scissor computations might
floor() instead, leaving the right/bottom row of pixels untouched.
Make sure those functions ceil(), too.
2023-06-04 19:42:00 +02:00
Benjamin Otte
cfeaa0ac72
renderer: return_if_fail() if the given texture size is 0
...
All renderers SEGV currently when that happens.
2023-06-04 19:42:00 +02:00
Matthias Clasen
444d5fa500
Merge branch 'drop-x11-dnd-keynav' into 'main'
...
x11: Stop using passive grabs
See merge request GNOME/gtk!6055
2023-06-03 19:38:24 +00:00
Matthias Clasen
c380d17621
Revert "gdk/x11: Also grab keyboard during XDnD grabs"
...
This reverts commit ae94417f80
.
2023-06-03 12:25:25 -04:00
Matthias Clasen
686d18dfc2
x11: Stop using passive grabs
...
The keynav that this implements is half-broken under
xwayland anyway, and it confused and complicates things
on the compositor side.
2023-06-03 12:25:25 -04:00
Benjamin Otte
0a1702ae99
Merge branch 'wip/otte/fix-glx' into 'main'
...
glx: Trap errors inside loop
Closes #5857
See merge request GNOME/gtk!6056
2023-06-03 16:19:09 +00:00
Benjamin Otte
0016fea36b
glx: Trap errors inside loop
...
Instead of trapping errors for the whole loop trying to create GL
contexts, trap them once per GL context.
Apparently GLX does throw an error when a too high version is requested
and doesn't just return NULL and then that error lingers when we try
lower versions.
Fixes #5857
2023-06-03 18:03:56 +02:00
Matthias Clasen
7ef46293aa
Merge branch 'wip/antoniof/boxlayout-baseline-optional' into 'main'
...
boxlayout: Don't always reserve height for baseline alignment
Closes #5863
See merge request GNOME/gtk!6053
2023-06-03 11:01:40 +00:00
António Fernandes
6b59c138b2
boxlayout: Don't always reserve height for baseline alignment
...
Otherwise an horizontal box may have a larger minumum height than
any of its children even though non of them is baseline-aligned.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5863
2023-06-02 20:18:56 +01:00
Matthias Clasen
c8c895d160
Merge branch 'trap-bad-rr-errors' into 'main'
...
x11: Trap XRandr errors when getting outputs during init and update
See merge request GNOME/gtk!6046
2023-06-02 11:31:45 +00:00
Luca Bacci
acbd7f212e
Merge branch 'for-main' into 'main'
...
GdkWin32 Cleanup
See merge request GNOME/gtk!5714
2023-06-02 09:34:48 +00:00
Marco Trevisan (Treviño)
f2a2889153
x11: Trap XRandr errors when getting outputs during init and update
...
We may try to update the XRR outputs and Crtcs when they're changing in
the server, and so we may get BadRROutput that we're currently not
handling properly.
As per this, use traps and check whether we got errors, and if we did
let's ignore the current output.
It's not required to call init_randr13() again because if we got errors
it's very likely that there's a change coming that will be notified at
next iteration during which we'll repeat the init actions.
2023-06-02 00:30:14 +02:00
Matthias Clasen
a4ae215309
Merge branch 'sumibi-yakitori/fix-glcontext-macos' into 'main'
...
macOS: Fix problems with OpenGL context creation on macOS
Closes #5811
See merge request GNOME/gtk!6044
2023-06-01 20:58:22 +00:00
Daniel Boles
fa16ba12cf
Window: Copy caveats from :*visible to the setters
2023-06-01 20:31:22 +01:00
Daniel Boles
ec2421b187
Window: Fix wrong case in property attribute which
...
rendered the literal text `org.gtk.MEthod.set_property focus-visible`.
2023-06-01 20:26:57 +01:00
sumibi-yakitori
1fce2b1e06
Fix an issue where min_version
was not being used as the minimum version required by GTK
2023-06-01 23:05:44 +09:00
Matthias Clasen
38bf843de8
Merge branch 'wip/alice/muxer-fix' into 'main'
...
actionmuxer: Correctly notify actions after reparenting
Closes #5861
See merge request GNOME/gtk!6043
2023-06-01 10:54:33 +00:00
sumibi-yakitori
7b8a5235d4
Fix a bug in error checking conditions. This avoids unintentional Legacy
of the created OpenGL context
2023-06-01 16:46:24 +09:00
sumibi-yakitori
3c9b3ead6f
The GL version reported by epoxy seems to depend on the current GL context, so the GL context to create should be the one determined by gdk_gl_context_get_matching_version
2023-06-01 16:43:57 +09:00
Alice Mikhaylenko
1549ec5f9b
actionmuxer: Correctly notify actions after reparenting
...
When registering an observer, we send a notification and for that we need
to query the action's state and param type. When setting up a muxer parent,
same thing happens, except the action is queried on the parent instead.
This means that the muxer will notify observers about the parent's actions,
but not about its own.
Add a test to verify it works.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5861
2023-06-01 06:39:44 +04:00
Matthias Clasen
4339e8e464
Merge branch 'matthiasc/for-main' into 'main'
...
gsk: Support straight alpha textures
See merge request GNOME/gtk!6041
2023-05-31 19:14:07 +00:00
Matthias Clasen
39f4d5ccf7
gltexturebuilder: Update the docs
...
We do handle unpremultiplied alpha correctly (albeit
non-optimally) now.
2023-05-31 14:39:07 -04:00
Matthias Clasen
957fa87fce
gsk: Support straight alpha textures
...
This is not the optimal way of doing it: we're
reuploading the texture with client-side conversion.
But it fits nicely into our current handling of mipmaps.
We can do better once we use shaders for colorspace
conversions.
2023-05-31 14:37:33 -04:00
Matthias Clasen
e8bdd46d8d
Merge branch 'a11y-crash' into 'main'
...
label: Fix crashes when executing a11y actions
See merge request GNOME/gtk!6034
2023-05-31 12:27:49 +00:00
Erik Schilling
d03b27b441
label: Fix crashes when executing a11y actions
2023-05-31 12:27:48 +00:00
Matthias Clasen
f4cbe26af3
Merge branch 'more-texture-tests' into 'main'
...
testsuite: Add more download tests
See merge request GNOME/gtk!6038
2023-05-31 12:01:31 +00:00
Luca Bacci
24af4b48cc
GdkWin32: Remove unused functions
2023-05-31 12:15:57 +02:00
Luca Bacci
1c8caf745f
GdkWin32: Remove declarations of unused types from gdkprivate-win32.h
2023-05-31 12:15:57 +02:00
Luca Bacci
395d80f131
GdkWin32: Remove declarations of unexisting functions from gdkprivate-win32.h
2023-05-31 12:15:57 +02:00
Luca Bacci
74229572e7
GdkWin32: Remove defines for old MinGW headers
2023-05-31 12:15:57 +02:00
Luca Bacci
cbb3d3f177
GdkWin32: Remove _gdk_display_hdc global variable
2023-05-31 12:15:57 +02:00
Luca Bacci
8861d0eb53
GdkWin32: Turn a few functions to static
...
When used only in the source file they're defined in.
Also remove the corresponding declarations from
gdkrivate-win32.h.
2023-05-31 12:15:57 +02:00
Luca Bacci
a23bc894e9
GdkWin32: Remove unused debug functions
...
* _gdk_win32_print_paletteentries
* _gdk_win32_print_system_palette
* _gdk_win32_print_hpalette
* _gdk_win32_drag_protocol_to_string
* _gdk_win32_data_to_string
* _gdk_win32_gdkrectangle_to_string
* _gdk_win32_cairo_region_to_string
* _gdk_win32_surface_description
2023-05-31 12:15:57 +02:00
Luca Bacci
156e25b6aa
Update manifest XML for the GTK DLL
2023-05-31 12:15:49 +02:00
Matthias Clasen
96f6787a3e
testsuite: Add more download tests
...
Add some odd-sized texture sizes to the
download tests, to trigger alignment issues
in the various upload code paths. And add
a size that is bigger than the max-texture-size
we force in one of our test setups.
To compensate, reduce the number of
runs per size from 20 to 10.
2023-05-30 23:01:20 -04:00
Matthias Clasen
cc665f29ea
testsuite: Plug a memory leak
2023-05-30 22:37:03 -04:00
Matthias Clasen
8d2047c824
testsuite: Use proper alignment when uploading to GL
2023-05-30 22:36:41 -04:00
Matthias Clasen
a79da8b655
Improve test coverage for GdkGLTexture
2023-05-30 22:36:10 -04:00
Matthias Clasen
f29c7e76f5
gltexture: Use proper alignment for downloads
2023-05-30 22:35:45 -04:00
Matthias Clasen
29867e7ae1
NEWS: Updates
2023-05-30 20:21:13 -04:00
Matthias Clasen
876b439d4a
Merge branch 'matthiasc/conversion-tests' into 'main'
...
Texture format work
See merge request GNOME/gtk!6035
2023-05-31 00:13:51 +00:00
Matthias Clasen
4f6d7c69a1
gltexturebuilder: Document format expectations
...
Provide some details about storage and alpha handling.
2023-05-30 19:46:13 -04:00
Matthias Clasen
2bf2635635
testsuite: Exclude some formats on GLES
...
GLES < 3.2 has some problems with 16-bit formats,
so exclude these from our download tests.
2023-05-30 19:46:13 -04:00
Matthias Clasen
67ed09f5ae
testsuite: Add tests for native GL textures
...
Create GL textures in gray and GA formats
and check that we can download from them
successfully.
2023-05-30 19:46:13 -04:00