Matthias Clasen commented on merge request !10668 at GNOME / gtk
We unfortunately have some flaky tests in ci. Retrying usually gets them to pass
Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.
We unfortunately have some flaky tests in ci. Retrying usually gets them to pass
I don't understand the CI failure. Doesn't seem related to the patch here?
Marge Bot (aaf281e5) at 07 Nov 04:10 testsuite: Test that bicubic is a no-op for 1:1 ... and 30 more commits
This branch couldn't be merged: CI failed! See pipeline https://gitlab.gnome.org/GNOME/gtk/-/pipelines/1141754.
I still haven't figured out why the test failed on GL when it included transparency, but I now used a black background and it passes, so I'm happy.
Modifying the counter in the condition just smells, for my taste
I don't do that anymore (just like using signed integers) because I get things wrong in the loop and then I have to debug it later. And I haven't gotten my version wrong yet, so it wins just because of that, not ebcause I think it looks beautiful. It does look more beautiful than a while loop though IMO.
I usually do the more cumbersome for (unsigned int i = n; i > 0; i--) { /* use i - 1 */ } for a loop that runs from n - 1 to 0.
It's the best way I've found how to write it with an unsigned variable. Do you have an alternative you like better?
Benjamin Otte (0ca9bb8e) at 07 Nov 03:26 testsuite: Test that bicubic is a no-op for 1:1
Lines and text are the worst case scenario, but even for solid shapes or a large raster, the edges/corners of it are sharp under a blurred control. (notice the bottom tool bar)
firefox isn't the odd one out after all, i just tested things wrong. GTK, Firefox, and Chromium all behave the same way. thinking of opening a csswg-drafts issue. but in my humble opinion, GTK could possibly deviate from how the engines do it for cases like this.
correction: my test used opacity: 0.999 and firefox treats 0.99+ as opaque so no group formed. with opacity: 0.9 it leaks the same as chromium, so all 3 match the spec's wording. there are reports on both already (chromium 380416865, mozilla 2073435)
what's your take on it, @matthiasc ? browsers rarely hit this issue since the page root is usually opaque. but on a desktop environment, translucent toplevels aren't uncommon. would you take a deviation here? a composite node with source instead of source-over fixes it on all 3 renderers. we'd limit it to blur-like filters so backdrop-filter: opacity() doesn't punch holes in opaque windows ofc I feel like it might be worth pursuing since Gnome recently started supporting background effects,…
Everything this MR changes I think (I didn't try too hard to understand Claude's junk) is that the first rendering is always made to match Cairo and the 2nd rendering will always fail, when previously we had a canonical "correct" rendering. So if you do this: transform { transform: translate(100.01, 0); child: fill "f" { path: "M0 0 h 10 v 10 h-10 z"; } } "f"; The 2nd rectangle will be blurry, too.
Yes, you did that intentionally because you wanted to avoid cache blowups in animations, from your experience with fonts. That's why the function named determine_scale_and_subpixel_grid() exists. So what you are going to get is this: fill "f" { ... } transform { transform: translate(100.01, 0); child: "f"; } And those two should render the same with the GPU renderer and different with Cairo, because the GPU renderer only wants to fill 1 cache entry for both while the Cairo renderer redraws them…
Filter Effects 2 ends the operation with step 7: "Composite the contents of T' into element B's parent, using source-over compositing." Read literally, the original is still there underneath, so Chromium and GTK fit the wording and Firefox is the odd one out So is it really a bug? But it looks completely wrong..
same file: group-translucent.html left is firefox, right is chromium
Uh.. this doesn't look like a gtk only deviation, apparently chromium does this too? What the hell?
The argument is that we ignored the off-grid offset of the path bounds by using the snapped position as the origin of the grid. Thats this change: + gx = path_bounds.origin.x - bounds->origin.x; + gy = path_bounds.origin.y - bounds->origin.y; if (!gsk_rect_snap_to_grid_grow (&viewport, scale, - &GRAPHENE_POINT_INIT ((float) fx / (sx * subpixel_scale), - (float) fy / (sy * subpixel_scale)), + &GRAPHENE_POINT_INIT (gx, gy), &viewport)) The comparison with the cairo rendering proves that correct -…
The GPU renderer caches Cairo-rendered paths as masks. The cached image's pixel grid was misaligned with the output pixel grid when path bounds had fractional device-pixel positions, causing antialiasing differences versus direct Cairo rendering. Use the exact fractional offset between path_bounds.origin and the grid-snapped bounds origin as the grid_offset for snap_to_grid_grow. This value (path_bounds.origin - bounds->origin) captures the precise fractional device-pixel position including…
Something doesn't have the slightest idea what it's doing. This was deliberatey introduced in !8580 (merged) in the original commit. But even if this MR was meant to fix something about it: This is a static function and these are the only calls to it.
This path must not match the Cairo rendering or our code is wrong.
The GPU renderer caches Cairo-rendered paths as masks. The cached image's pixel grid was misaligned with the output pixel grid when path bounds had fractional device-pixel positions, causing antialiasing differences versus direct Cairo rendering. How?
ok checked a few more things. same 18 cells are wrong on vulkan, gl and cairo so it's not a single renderer. 4.24.1 renders pixel-identical to main at 6f3377c8, so it's not a recent regression either. seen on wayland under gnome shell and niri. if you have a window background in your gtk.css it'll override the one in the repro, run it with XDG_CONFIG_HOME=$(mktemp -d)
The GPU renderer caches Cairo-rendered paths as masks. The cached image's pixel grid was misaligned with the output pixel grid when path bounds had fractional device-pixel positions, causing antialiasing differences versus direct Cairo rendering. Use the exact fractional offset between path_bounds.origin and the grid-snapped bounds origin as the grid_offset for snap_to_grid_grow. This value (path_bounds.origin - bounds->origin) captures the precise fractional device-pixel position including…
I'm gonna add more context cuz I tried to pin point exactly in which cases the blur failed: puts the same bar over every combination of 5 window backgrounds, 5 layers between the window and the bar, and text on either the window or the layer, 50 cells in all. Each cell stands in for a window inside one transparent toplevel, and the bar uses blur(8px) to suit the cell size attached matrix.c it seems like the blur is most likely composited over the original backdrop instead of replacing it, so it…
Welp, I've been playing a lot with transparency and blur ever since Mutter introduced support for effects. One thing I noticed, illustrated below, is that a blur NEEDS something opaque sitting at the end of the stack, otherwise things look very wrong. Left: transparent window > text > blurred control. the text is legible and the yellow rectangle is slightly fuzzed Right: window is given a background-color. The above reproduction is in repro.c, attached below: repro.c cc repro.c -o repro…