~vcs-imports/gtk/+git/gtk:glyph-cache-split

Last commit made on 2024-02-25
Get this branch:
git clone -b glyph-cache-split https://git.launchpad.net/~vcs-imports/gtk/+git/gtk

Branch merges

Branch information

Name:
glyph-cache-split
Repository:
lp:~vcs-imports/gtk/+git/gtk

Recent commits

c476c45... by Matthias Clasen <email address hidden>

gsk: Maintain clip info for glyph nodes

We can determine once whether we are contained, instead of doing
it again for every glyph.

The performance impact of this is hard to measure.

5d05270... by Matthias Clasen <email address hidden>

gsk: Don't add images needlessly

Most likely, the image for all glyphs will be the same atlas,
so check first before calling the add_image function, which
will loop over all images.

This matches what the pattern code does for glyph nodes.

The performance impact of this is hard to measure.

34fb85a... by Matthias Clasen <email address hidden>

gsk: Split the glyph cache

Do the glyph cache lookup in two steps: First find a cache for
the given font+scale, then look up the glyph+flags. Since
font+scale change much less frequently (in particular, they are
the same for all glyphs in a text node), it makes sense to keep
the result of the last lookup around and check if it still fits.

Here are changes in running widget-factory with no-vsync:

                                      before after
gsk_gpu_device_lookup_glyph_image 1.43% 1.02%
g_hash_table_lookup 0.76% 0.43%
gsk_gpu_cached_glyph_equal 0.28% 0.21%

05bc4a8... by Matthias Clasen <email address hidden>

gsk: Keep scaled fonts around

Create the scaled font on demand, only when we need to render a glyph,
and keep it around while processing the remaining glyphs in the text
node, rather than recreating it over and over.

93302cc... by Matthias Clasen <email address hidden>

gsk: Stop passing scale to glyph upload op

It is always 1.0 now, so there is no point. Instead of the scale,
print the font when doing verbose logging.

976f45e... by Matthias Clasen <email address hidden>

gsk: Use a scaled font for glyph rendering

This changes the approach we take to rendering glyphs in the
presence of a scale transform: Instead of scaling the extents
and rendering to an image surface with device scale, simply
create a scaled font and use it for extents and rendering.

This avoids clipping problems with scaling of extents in
the presence of hinting.

befccc9... by Matthias Clasen <email address hidden>

gsk: Add a way to get a scaled font

Add a function to change the size of a font while keeping everything
else the same. We use pango api for this if available.

ee5afdf... by Matthias Clasen <email address hidden>

Merge branch 'fix-inhibit-idle-warning' into 'main'

application: Prevent a warning

Closes #6470

See merge request GNOME/gtk!6942

49a6b5d... by RÅ«dolfs Mazurs

Update Latvian translation

dd7a0cb... by Matthias Clasen <email address hidden>

application: Prevent a warning

When we've handled a inhibit idle request via Wayland, there is
no need to call into the D-Bus inhibit api unless there's other
inhibit flags to handle.

Fixes: #6470