| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
transform: Add sections
See merge request GNOME/gtk!3974
|
| |
| |
| |
| |
| |
| |
| | |
This function decomposes a general 2D transform
into skew, scale, rotation and translation.
Tests included.
|
| |
| |
| |
| |
| |
| | |
Add gsk_transform_skew() to make our transform
api more complete wrt to what you would expect
for a graphics api.
|
| |
| |
| |
| | |
This makes the code easier to navigate (for me).
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 87af45403ace1047b91ddbab98d9d5a5e15b84eb.
I've found that this change is needed to ensure that the
bounding boxes of text nodes encompass all the glyphd drawing.
Without it, we overdraw the widget boundaries and cut off
glyphs.
|
|/
|
|
|
|
|
|
|
| |
We are rendering the glyphs on a larger surface,
and we should avoid introducing unnecessary
rounding errors here. Also, I've found that
we always need to enlarge the surface by one
pixels in each direction to avoid cutting off
the tops of large glyphs.
|
|
|
|
| |
The subpixel-positioned glyph extends on both sides.
|
|
|
|
|
| |
This should not be necessary and only serves
to make the actual bugs harder to find.
|
|
|
|
| |
Add an example for reconstructing transforms.
|
|
|
|
|
|
|
|
|
| |
For 2D transforms, we can read the scale
factors more directly off the matrix.
This should eventually be moved out into a
function to decompose a 2D transform into
scale + rotation + skew + translation.
|
|
|
|
|
|
| |
We can just use gdk_texture_new_from_bytes here now.
Update affected test output.
|
|
|
|
|
|
| |
Avoid cairo, and use our own api for saving png data.
Update affected test output.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We avoid an offscreen if we know the child node
can 'handle' the transform. Shadow nodes can if their
child node does - either the child node is a text node
in which case the shortcuts we take for shadow nodes
will work fine with the transform (we just render the
text node offset), or the child is not a text node,
in which case we render the shadow to an offscreen
anyway.
This change makes the label-shadows reftest pass with
the GL renderer, not by fixing the issue but by avoiding
it.
|
|
|
|
|
|
|
|
| |
For shadow nodes, we try pretty hard to avoid
rendering shadows, and and we have a shortcut
that just renders text offset, but we can try
harder to do nothing - if the text is offset
by zero, we don't need to draw it at all.
|
|
|
|
|
|
| |
The wrong index was used for offsetting the bottom border rect.
Test included.
|
|
|
|
|
|
|
|
| |
We need to use an offscreen whenever there is overlapping
children somewhere in the tree below, just checking the
direct child of the opacity node is not enough.
Fixes: #4261
|
|
|
|
|
| |
Just use a GL texture and gdk_texture_save_to_png,
it was made for this.
|
| |
|
| |
|
|
|
|
| |
And also mark gsk_rounded_rect_to_string as malloc.
|
| |
|
|
|
|
|
| |
If we can't handle the texture, always just download_texture() it,
that way we are sure it's a memory texture.
|
|
|
|
|
| |
Now gdk_memory_convert() converts to one of these conversions instead of
re(ab)using parts of the GdkMemoryFormat enum.
|
|\
| |
| |
| |
| | |
rendernode: Write the whole node
See merge request GNOME/gtk!3938
|
| |
| |
| |
| |
| | |
It turns out g_output_stream_write_bytes() does not write the bytes.
It should be renamed to g_output_stream_write_some_of_the_bytes() maybe.
|
|/
|
|
|
|
|
|
| |
We can't make the -4 versions inline, since
we use ifuncs for them, so make vectorized
versions.
Test included.
|
|
|
|
|
|
| |
Followup to b244f31337eea. Pango provides color glyph
information for us now, so we don't need to steal a
bit anymore.
|
|
|
|
| |
This reverts commit f1347f5841ea526c7016a8fbd329b45001812a23.
|
|
|
|
| |
This reverts commit 6599cb001fa184ed224c655519d659f168e9face.
|
|
|
|
| |
This reverts commit 299c7c35148e49369c151aa4eae6066d09e9d4b4.
|
|
|
|
|
| |
Use the font options from the text node when
looking up glyphs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cairo_t that we create to render glyphs for
the glyph cache needs to match the font options
that are supposedly governing how glyphs are
drawn.
Since we allow font options to be different per
widget in gtk, we need to have them at least at
the level of individual render nodes. Adding them
to the lookup key for the glyph cache has the
side effect of solving another problem: We are
not flushing the cache when font options change.
|
|
|
|
|
|
|
|
|
| |
Since font options affect how the glyphs get rendered,
we need to pass the font options down from the gtk level
to where the glyph cache is populated.
Add a new gsk_text_node_new_full api that takes a
cairo_font_options_t in addition to the other parameters.
|
|
|
|
|
|
| |
Pango now sets a bit in PangoGlyphVisAttr for
color glyphs, so we don't need to do that
ourselves anymore.
|
|
|
|
| |
This includes our own new mime type for render nodes, too.
|
|
|
|
|
|
| |
This is needed as GskRenderNode is its own fundamental type and has its
own GValue infrastructure. And I want to put render nodes into the
clipboard which uses GValues.
|
|
|
|
|
|
|
| |
This was showing up as big text selections going
missing sporadically.
Fixes: #4214
|
|
|
|
|
|
| |
ngl supports all the same platforms as gl
now, and has seen more improvements in the
last cycle.
|
|\
| |
| |
| |
| | |
ngl: Make current when unrealizing
See merge request GNOME/gtk!3835
|
| |
| |
| |
| |
| | |
The profiler (at least) discards GL objects and we want to discard them
on the right context.
|
|\ \
| | |
| | |
| | |
| | | |
Shrink shadow extents
See merge request GNOME/gtk!3825
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Long time ago, Cairo shadows in both GTK3 and 4 were drawn at a size about
twice their radius. Eventually this was fixed but the shadow extents are
still calculated for the previous size and appear unreasonably large: for
example, 141px for a 50px radius shadow. This can get very noticeable in
places such as invisible window frame which gets included into screenshots.
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3419 just divides the
radius by 2 when drawing a shadow with Cairo, do the same when calculating
extents.
See https://gitlab.gnome.org/GNOME/gtk/-/issues/3841
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
gsk: Make color glyphs
Closes #4141
See merge request GNOME/gtk!3812
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
harfbuzz has all the information we need, so we
can avoid poking directly at freetype apis. Also
drop the caching of color glyph information until
it turns out to be a problem.
|
| | |
| | |
| | |
| | |
| | |
| | | |
We don't really want to load the bitmaps every time
we create a render node, so do it once and cache the
information on the PangoFont.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Decide per-glyph whether we need color nor not.
Fixes: #4141
|
| |/
| |
| |
| |
| | |
Steal a bit from PangoGlyphVisAttr to mark glyphs
that have color.
|
|/
|
|
|
| |
We can just use cairo directly here,
and cut out some layers of pango in the middle.
|
|
|
|
|
| |
Use the macro we already have to check that colors
are fully transparent.
|