Commit Graph

77249 Commits

Author SHA1 Message Date
Benjamin Otte
51a1adf312 spline: Use Skia's tolerance checks
This avoids measuring being too far off (it's still off, but it's less
than a percent now.
2023-07-31 16:51:04 +02:00
Benjamin Otte
d84132824f testsuite: Add tests for gsk_path_measure_add_segment() 2023-07-31 16:51:03 +02:00
Benjamin Otte
ffecc89352 gtk-demo: Add a text-on-path demo 2023-07-31 16:51:03 +02:00
Benjamin Otte
77518895ea demos: Add a simple demo filling a path 2023-07-31 16:51:03 +02:00
Benjamin Otte
9685a47693 path: Add gsk_path_measure_get_point()
Allows querying the coordinates and direction of any specific point on a
path.
2023-07-31 16:51:03 +02:00
Matthias Clasen
7f9825919c path: Add gsk_path_add_circle()
Adds a circle contour, too.
2023-07-31 16:51:03 +02:00
Benjamin Otte
2795fc53c1 pathmeasure: Implement support for beziers
Instead of treating bezier curves as lines, we properly decompose them
into line segments now so that we can treat those as lines.
2023-07-31 16:51:03 +02:00
Benjamin Otte
20ba4a225c path: Implement gsk_path_to_cairo() using foreach() 2023-07-31 16:51:03 +02:00
Benjamin Otte
eadbfc3433 path: Add gsk_path_foreach() 2023-07-31 16:51:03 +02:00
Benjamin Otte
b8ee48de63 path: Collect flags
We don't need them yet, but maybe later.
2023-07-31 16:51:03 +02:00
Benjamin Otte
25a5a8a85d testsuite: Add path tests 2023-07-31 16:51:03 +02:00
Benjamin Otte
5e1170bdb2 pathmeasure: Add gsk_path_measure_add_segment()
This allows chunking paths, weeee.
2023-07-31 16:51:03 +02:00
Benjamin Otte
f6bf74e2c9 path: Add gsk_path_builder_add_path() 2023-07-31 16:51:03 +02:00
Benjamin Otte
fa51c2eb0e gsk: Add GskPathMeasure
An object to do measuring operations on paths - determining their
length, cutting off subpaths, things like that.
2023-07-31 16:51:03 +02:00
Benjamin Otte
d34f1bbd6c path: Change data structure for standard path
Instead of the Cairo method and imitating cairo_path_data_t, use the
Skia method and keep points and operations separate.

That way we get a points array that includes the starting point -
because it's always the end point of the previous operation.
2023-07-31 16:51:03 +02:00
Benjamin Otte
8fd55e9f89 snapshot: Add gtk_snapshot_push_stroke() 2023-07-31 16:51:03 +02:00
Benjamin Otte
be4beeb8f2 gsk: Add GskStrokeNode 2023-07-31 16:51:03 +02:00
Benjamin Otte
09288f621a gsk: Add GskStroke
It's unused in this commit. This just prepares the new object.
2023-07-31 16:51:03 +02:00
Benjamin Otte
3ec3727575 snapshot: Add gtk_snapshot_push_fill() 2023-07-31 16:51:03 +02:00
Benjamin Otte
77e58d4463 rendernode: Implement fast-path for solid fills
They happen so often that it's worth avoiding the clip + paint path
there.
2023-07-31 16:51:03 +02:00
Benjamin Otte
bb58b504a6 gsk: Add GskFillNode
Take a rendernode as source and a GskPath and fill the region in the
path just like cairo_fill() would.
2023-07-31 16:51:03 +02:00
Benjamin Otte
f6bb568e91 gsk: Add GskPath 2023-07-31 16:51:03 +02:00
Benjamin Otte
efbb3ab535 xxx: benchmarking 2023-07-31 16:51:03 +02:00
Benjamin Otte
e00e6f3d5d vulkan: Clear Cairo surfaces on upload
The memory isn't guaranteed to be all zeroes and we don't want glitches.
2023-07-31 16:51:03 +02:00
Benjamin Otte
e98ae233fc vulkan: Fix a memleak 2023-07-31 16:51:03 +02:00
Benjamin Otte
2ad11e12d4 vulkan: Plug a memleak
Yay, we no longer leak swapchain images
2023-07-31 16:51:03 +02:00
Benjamin Otte
3f16f7e0d4 rendernode-tool: Add another magic format
Make .svg use the Cairo renderer to save to an SVG file.

It's useful when comparing rendering behavior and times with
web browsers (as long as one is aware that browsers build a full
DOM tree out of those SVGs).
2023-07-31 16:51:03 +02:00
Benjamin Otte
166777dd55 rendernode-tool: Move code
No functional changes yet.
2023-07-31 16:51:03 +02:00
Benjamin Otte
c8f385e3bc vulkancontext: Do proper refcounting
- fix a memleak
- call unref() instead of new()
- remove idle handler on dispose

What was I doing when I wrote the pipeline cache code?
2023-07-31 16:51:03 +02:00
Benjamin Otte
89b4f12b38 vulkan: Plug a memleak 2023-07-31 16:51:03 +02:00
Benjamin Otte
ae509406f1 memorytexture: Add a check
Sophie Herold was running into this problem while coding, so let's help
people by catching it early.
2023-07-31 16:51:03 +02:00
Benjamin Otte
1aa7f18b23 vulkan: Remove unused variable
It's only used when printing debug stuff. Debug stuff is not that
important.
2023-07-31 16:51:03 +02:00
Benjamin Otte
cf39c80fe2 docs: Update for recent rendernode-tool changes 2023-07-31 16:51:03 +02:00
Matthias Clasen
9685030632 Merge branch 'gtk-wip/inactive-state' into 'main'
gtk: Add suspended window state

See merge request GNOME/gtk!6221
2023-07-30 11:39:49 +00:00
Matthias Clasen
327c93066d build: Don't require bleeding-edge wayland-protocols
The 1.32 wayland-protocols release is not in distribution
builds yet, so a hard dependency on it is not helpful.
2023-07-30 11:40:09 +03:00
Jonas Ådahl
7f946eff01 gtk: Add suspended window state
This is implemented using a new xdg_toplevel `suspended` state, and is
meant for allowing applications to know when they can stop doing
unnecessary work and thus save power.

In the other backends, the `suspended` state is set at the same time as
`minimized` as it's the closest there is to traditional windowing
systems.
2023-07-30 11:40:09 +03:00
Benjamin Otte
03a8b9cf17 Merge branch 'no-list-items' into 'main'
listitemmanager: Handle null roots in get_nearest_tile

Closes #5970

See merge request GNOME/gtk!6220
2023-07-29 23:15:13 +00:00
tszymanski
657c018242 listitemmanager: Handle null roots in get_nearest_tile
Rubberbanding still fails with "No item" warnings, but it no longer
crashes.

Closes #5970
2023-07-28 19:12:46 -07:00
Danial Behzadi
83db8e41a6 Update Persian translation 2023-07-29 01:58:52 +00:00
Yuri Chornoivan
57e7112781 Update Ukrainian translation 2023-07-28 17:32:38 +00:00
Yuri Chornoivan
96f92ee207 Update Ukrainian translation 2023-07-28 17:31:22 +00:00
Matthias Clasen
5c8bd49383 Merge branch 'matthiasc/for-main' into 'main'
glyph cache: Add debug output

See merge request GNOME/gtk!6163
2023-07-28 08:51:14 +00:00
Matthias Clasen
e82bdd8c0d Merge branch 'dboles/issue5946' into 'main'
MenuSectionBox: use-markup on labels of submenus

Closes #5946

See merge request GNOME/gtk!6209
2023-07-28 08:47:33 +00:00
Yosef Or Boczko
72f52751c2 Update Hebrew translation 2023-07-28 07:13:47 +00:00
Matthias Clasen
98269a29b1 Merge branch 'fix-issue-5775-gtk4' into 'main'
GtkApplicationImplDBus: Cancel DBus method calls on shutdown

Closes #5775

See merge request GNOME/gtk!6181
2023-07-28 07:11:52 +00:00
Matthias Clasen
8bb968bc01 Merge branch 'dboles/range_highlight_with_page_size' into 'main'
Range: Fix hilight not drawn to value if page-size

Closes #5976

See merge request GNOME/gtk!6206
2023-07-28 06:13:27 +00:00
Matthias Clasen
c61313cbfe build: Check for objcopy options
Check that objcopy understands the --set-section-alignment
option that we are now using.
2023-07-28 09:06:14 +03:00
Matthias Clasen
96145ae8ed tools: Update the docs
Mention that the render command can produce png or tiff
images.
2023-07-28 09:06:14 +03:00
Benjamin Otte
1f848bf9fd rendernode-tool: Save to tiff
If the save filename ends in .tiff, save to tiff instead.

For now this is a sneaky autodetect feature, not sure if/how to make it
more explicit.
2023-07-28 09:06:14 +03:00
Matthias Clasen
7a8a27bd60 ci: Mark the clipboard test as flaky
Lets give up on trying to run this successfully
in ci. More green in more places!
2023-07-28 09:06:14 +03:00