Commit Graph

77182 Commits

Author SHA1 Message Date
Matthias Clasen
6653f2b4c3 Merge branch 'fix-file-dialog-assert' into 'main'
filedialog: Don't assert too much

Closes #5975

See merge request GNOME/gtk!6207
2023-07-24 21:52:57 +00:00
Matthias Clasen
b00b0902ca Merge branch 'pgriffis/fix-no-introspection-build' into 'main'
build: Fix building with introspection disabled and testsuite enabled

See merge request GNOME/gtk!6210
2023-07-24 21:11:17 +00:00
Patrick Griffis
59941930f7 build: Fix building with introspection disabled and testsuite enabled
The headless tests are written in Python and need g-i.
2023-07-23 19:30:30 -05:00
Matthias Clasen
79721d64ad filedialog: Don't assert too much
The GtkFileDialog code was asserting that
we get exactly one file back. But the function
is nullable anyway, so lets just return NULL
if we don't have a file.

Fixes: #5975
2023-07-23 12:33:47 -04:00
Benjamin Otte
0b1bcf8bee Merge branch 'wip/otte/vulkan-for-main' into 'main'
tools: No need for --force when specifying filename

See merge request GNOME/gtk!6205
2023-07-22 21:48:29 +00:00
Matthias Clasen
477fb8fdfb Merge branch 'drop-touchscreen-debug' into 'main'
Drop GTK_DEBUG_TOUCHSCREEN

Closes #5893

See merge request GNOME/gtk!6204
2023-07-22 21:48:14 +00:00
Benjamin Otte
1bd820fc60 vulkan: Clean up renderpass/offscreen creation
Instead of scale and whatnot, pass:
1. The image size
2. The viewport to map to that image size
and compute everything else from there.

In particular, we set the Vulkan viewport to the image dimensions
instead of the viewport size.

All of this makes things a lot simpler while keeping the required
functionality.
2023-07-22 23:30:15 +02:00
Benjamin Otte
a4247f1358 vulkan: Plug a memleak
This one was introduced in 4d9e7d30b0.
2023-07-22 23:30:15 +02:00
Benjamin Otte
00b5df6b06 vulkan: Plug a memleak
This one was introduced in cd84f5a56e.
2023-07-22 23:30:15 +02:00
Benjamin Otte
1e75fc35c8 tools: No need for --force when specifying filename
If people specify the filename, they should know what they're doing.

If they don't, abort if the guessed filename already exists and insist
on the user explicitly giving it.
2023-07-22 23:30:15 +02:00
Matthias Clasen
0751f59ee8 Drop GTK_DEBUG_TOUCHSCREEN
This flag was never doing much, and is only raising
the wrong expectations. Remove it.

Fixes: #5893
2023-07-22 16:43:20 -04:00
Matthias Clasen
b5b797b0aa Merge branch 'textview-keynav-backspace' into 'main'
textview: Match entry behavior for backspace

Closes #3417

See merge request GNOME/gtk!6203
2023-07-22 15:45:42 +00:00
Matthias Clasen
ddfe9f15af Merge branch 'fix-issue-5965' into 'main'
gtktextview: return early when resetting gesture / event controller

Closes #5965

See merge request GNOME/gtk!6200
2023-07-22 13:51:32 +00:00
Matthias Clasen
9929726eb2 textview: Match entry behavior for backspace
As pointed out in #3417, there is a long-standing
difference in how GtkEntry and GtkTextView treat
Ctrl-Shift-Backspace (and other variations): GtkEntry
always operates on the selection first, if it exists.
GtkTextView only handled plain Backspace that way, and
ignores the selection for other variations.

There is no good reason for this difference, so just
remove it and make GtkTextView behave the same as
GtkEntry.

Fixes: #3417
2023-07-22 09:40:17 -04:00
Ekaterine Papava
1aa6e721ae Update Georgian translation 2023-07-22 13:24:50 +00:00
Ngọc Quân Trần
87d2ce1332 Update Vietnamese translation 2023-07-22 08:54:03 +00:00
Daniel Boles
6260a33e8e Merge branch 'dboles/PopoverMenu-png' into 'main'
Fix broken image menu.png in Gtk.PopoverMenu intro

See merge request GNOME/gtk!6187
2023-07-22 08:43:25 +00:00
Daniel Boles
2024913cc2 Merge branch 'dboles/for-main' into 'main'
tools: Replace references to GTK+ with GTK no plus

See merge request GNOME/gtk!6199
2023-07-22 08:43:06 +00:00
Ngọc Quân Trần
0978a794ac Update Vietnamese translation
(cherry picked from commit e944cd8916)
2023-07-22 08:16:29 +00:00
Benjamin Otte
da51c90d5c Merge branch 'wip/otte/vulkan-for-main' into 'main'
gsk: Add gskrectprivate.h

See merge request GNOME/gtk!6201
2023-07-22 02:43:11 +00:00
Benjamin Otte
b1b8a98568 gdk: Add function to query alpha format for depth
It's meant to be used in renderers.
2023-07-22 01:33:44 +02:00
Benjamin Otte
4a8122f685 gdk: Make A8 and A16 formats premultiplied
The relevant question here is about details, because we have to choose
if we declare alpha-only formats as having their (nonexistant) color
channels premultiplied or not, so that the code paths using them can do
the right thing.

Because we are premultiplied by default, it makes sense to treat alpha
like that, because then the alpha-only code doesn't need to do
workarounds for straight alpha.

Where this is relevant of course is when expanding the alpha channel
into color channels, where we want to end up with white.
So make sure we do color = alpha there instead of color = 1 like we did
before.
2023-07-22 01:33:44 +02:00
Benjamin Otte
7a58439977 memoryformat: Copy idea from tiff code
The static assertion makes sure that newer formats get added.
2023-07-22 01:33:44 +02:00
Benjamin Otte
27fbdcbecb gdk: Add A16_FLOAT and A32_FLOAT formats
We need them for mask-only textures.

For tiffs, we convert the formats to RGBA (the idea that tiff can save
everything needs to be buried I guess) as tiffs can't do alpha-only.
2023-07-22 01:33:44 +02:00
Benjamin Otte
5bd13ccf15 vulkan: Remove unused struct 2023-07-22 01:33:44 +02:00
Benjamin Otte
d30a9e7fa9 gsk: Add gskrectprivate.h
Add a bunch of inline functions for graphene_rectangle_t.

We use those quite extensively in tight loops so making them as fast as
possible via inlining has massive benefits.

The current render-heavy benchmark I am playing (th paris-30k in node-editor)
went from 49fps to 85fps on my AMD.
2023-07-22 01:33:44 +02:00
Benjamin Otte
6e75e26a0c vulkan: Add new error code 2023-07-22 01:33:44 +02:00
Efstathios Iosifidis
6562338502 Update Greek translation
(cherry picked from commit 9d633773b0)
2023-07-21 22:29:53 +00:00
Luca Bacci
5da01ec4af gtktextview: return early when resetting gesture / event controller
Fixes #5965
2023-07-21 15:33:45 +02:00
Daniel Boles
8da96b9353 tools: Replace references to GTK+ with GTK no plus 2023-07-21 12:05:25 +01:00
Matthias Clasen
e042db9348 Merge branch 'render-tool' into 'main'
Add gtk4-render-tool

See merge request GNOME/gtk!6197
2023-07-21 10:56:14 +00:00
Matthias Clasen
601011ccc0 Add a gtk4-rendernode-tool
This is meant to work with serialized render nodes.
2023-07-21 06:26:11 -04:00
Daniel Boles
5958abae1d Merge branch 'dboles/for-main' into 'main'
ShortcutController: Add links to docs, fix heading

See merge request GNOME/gtk!6198
2023-07-21 09:35:30 +00:00
Daniel Boles
a056063395 ShortcutController: Add links to docs, fix heading
to be "as GtkBuildable", not "as a GtkBuildable", as no other file uses
the latter.
2023-07-21 10:01:56 +01:00
Matthias Clasen
537669e2b0 Merge branch 'wip/kabus/calendar-select-signal' into 'main'
gtk/calendar: Avoid emision of day-selected signal from nav buttons

Closes #5769

See merge request GNOME/gtk!6196
2023-07-21 03:38:58 +00:00
Khalid Abu Shawarib
216a368f22 gtk/calendar: Avoid emision of day-selected signal from nav buttons 2023-07-21 03:38:58 +00:00
Matthias Clasen
fd4da47125 gdk: Drop unnecessary conditionals
We require GLib 2.76 now.
2023-07-20 15:18:13 -04:00
Matthias Clasen
411e0c5fbd tools: Use #pragma once
We are trying to be consistent about this.
2023-07-20 15:18:13 -04:00
Matthias Clasen
e523d3a50e tools: Drop unnecessary conditionals
We require GLib 2.76 now.
2023-07-20 15:18:13 -04:00
Matthias Clasen
99d6a15049 Merge branch 'gtk-fix-issue-4990' into 'main'
Add check for large compose files

Closes #4990

See merge request GNOME/gtk!6195
2023-07-20 17:39:06 +00:00
Matthias Clasen
7fb6c04e99 Make the new compose table test work
This just copies what we do already for other
tests that check parser failures.
2023-07-20 11:48:13 -04:00
Benjamin Otte
08fd9e1f2e Merge branch 'wip/otte/vulkan-for-main' into 'main'
vulkan: Various smallish things

See merge request GNOME/gtk!6193
2023-07-19 19:51:57 +00:00
Benjamin Otte
dd641867a2 vulkan: Be more careful with supported images
Now that we can upload all these fancy formats, we need to make sure
that we actually can.
2023-07-19 21:30:35 +02:00
Benjamin Otte
2cbe89de7d memoryformat: fast-path copies of the same format
Basically, memcpy() asap if possible.

This happens a lot in Vulkan, where we gdk_memory_conert() image
data from memory textures straight into the VulkanBuffer.

And usually we support the format.
2023-07-19 21:30:35 +02:00
Benjamin Otte
4d9e7d30b0 vulkan: Add premultiply step to texture upload
When a GdkMemoryFormat is not supported natively and there's
postprocessing required, add a way to mark a VulkanImage as such via the
new postprocess flags.

Also allow texting such iamges only with new_for_upload() and detect
when that is the case and then run a postprocessing step that converts
that image to a suitable format.
This is done with a new "convert" shader/op.

This now supports all formats natively, no conversions happen on the CPU
anymore (unless the GPU is old).
2023-07-19 21:30:35 +02:00
Benjamin Otte
65224f4533 vulkan: Change fallback formats
Always fall back to a format that isn't swizzled.

That way it can be used as a target format for rendering.
2023-07-19 21:30:35 +02:00
Benjamin Otte
cd84f5a56e vulkan: Split renderpass op into 2
Add an explicit begin() and an end() op. For now, this looks like
overkill, but it allows doing renderpasses with custom ops that are not
meant to render a rendernode.

Examples for this are pre/postprocessing passes or 2-pass blur.
2023-07-19 21:30:35 +02:00
Benjamin Otte
4311d17cb1 vulkan: Don't store the renderpass
It's only used when parsing.
2023-07-19 21:30:35 +02:00
Benjamin Otte
11a0646281 vulkan: Pass rectangles where no regions are used
The API was using regions because it always had. But all the code ever
did was get the extents of the region.

So simplify everything by using rectangles everywhere.
2023-07-19 21:30:35 +02:00
Benjamin Otte
492507af11 vulkan: Stop keeping the context around
These days, we can query it with gsk_vulkan_render_get_context().

Makes quite a few functions require one less argument.
And it also makes the GskVulkanRenderPass empty. Gotta figure out what
to do with it.
2023-07-19 21:30:35 +02:00