| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Ensures the shadow stays small.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
... and use it in rendernodes.
Setting up textures for diffing is done via gdk_texture_set_diff() which
should only be used during texture construction.
Note that the pointers to next/previous are allowed to dangle if one of
the textures is finalized, but that's fine because we always check both
textures' links to each other before we consider the pointer valid.
|
|
|
|
|
| |
This will be needed most importantly for inverted textures,
like in GLArea.
|
|
|
|
| |
We should use && for booleans, not &=.
|
|
|
|
| |
We should use || for booleans, not |=.
|
|
|
|
| |
Simplify a function.
|
|
|
|
| |
Instead, use class_init functions.
|
|
|
|
| |
It's not used.
|
|
|
|
|
| |
Add some more details about filtering, to
clarify things a bit.
|
|
|
|
|
| |
This allows dropping or copy/pasting rendernodes into apps that accept
images.
|
|
|
|
|
|
|
|
| |
This allows dropping or copy/pasting rendernodes into apps that accept
SVGs.
Not sure how useful this is because we advertise text/plain from
rendernodes already and we prefer that.
|
|
|
|
|
|
|
|
| |
Scale nodes can use large scale factors and we don't want to create
insanely huge Cairo surfaces.
A subsequent commit will add the texture-scale-magnify-10000x
test which fails without this fix.
|
|
|
|
| |
Split out a function to make it more obvious what's going on.
|
|
|
|
|
|
|
|
|
| |
Cairo surfaces are created transparent.
And even if they weren't, overdrawing with transparency wouldn't erase
what's in the surface because it's a no-op.
It would require CAIRO_OPERATOR_CLEAR or CAIRO_OPERATOR_SOURCE.
|
| |
|
| |
|
|
|
|
|
|
| |
We were not handling the inverted-luminance
case the same way, and it caused a test to
fail. Yay for tests.
|
|
|
|
|
| |
Add a GskMaskMode enumeration and implement it
in the GL and cairo renderers.
|
|
|
|
|
|
|
|
|
| |
Add GskMaskNode, and support it in the render node
parser, in the inspector and in GtkSnapshot.
The rendering is just fallback for now.
Based on old work by Timm Bäder.
|
| |
|
|
|
|
| |
Instead of homegrown markup.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By dividing the blur radius to obtain the clip radius, we may end up
with halved values that result in an overshunk clip mask. Extend this
so that we ensure to cover the last pixel.
Fixes artifacts seen with the cairo renderer in X11 when resizing
windows horizontally, a black 1px high line would be seen in the
top of the window due to these outset bounds being used in clipping.
More mysteriously, also seems to fix resize lag in the GL renderer
(also X11), if e.g. the bottom-right corner of a window is resized
diagonally in bottom-left -> top-right direction, or
bottom-right -> top-left.
Related: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2175#note_1599335
|
|
|
|
|
|
| |
The outset border for all sides is ceil()ed, except for the top side.
Most often values are already nicely rounded here, but this seems an
oversight.
|
|
|
|
| |
clang gets wild ideas about negative radii otherwise.
|
|
|
|
| |
These were pointed out by codespell.
|
|
|
|
| |
The extra - does not add any value.
|
| |
|
|
|
|
|
| |
Like all the other constructors for nodes already do. Without this,
newly created rounded clip nodes are leaked in bindings.
|
|
|
|
|
|
| |
Collect information about whether to use offscreens
for opacity during node construction, so we don't
need to walk the tree repeatedly, later.
|
|
|
|
|
| |
This can be used to optimize some things in the
GL renderer.
|
|
|
|
|
|
|
| |
These were not quite right, and implied that args
may be NULL, when it really can't.
Fixes: #4739
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Limit the diff region to 30 rectangles (randomly chosen because it
looked big enough to not trigger by accident and small enough to not
cause performance issues).
If the diff region gets more complicated, we abort to the parent node
and use its bounds as the diff region instead and then continue diffing
the rest of the node tree.
Fixes: #4560
Fixes: #2396
|
|
|
|
|
| |
Now the vfuncs can decide they don't want to diff anymore, not just the
actual diff function.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add private api to find out if the content
of a render node should be considered 'deep'.
The information is collected at creation time,
so there is no tree-walking involved when we
are using this information in the renderer.
Currently, this comes down to whether there are
any texture nodes with high depth textures in the subtree.
In the future, we may want to allow marking gradient
nodes in this way as well.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This should not be necessary and only serves
to make the actual bugs harder to find.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
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.
|