fætalize commented on issue #8524 at GNOME / gtk
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)
Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.
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…
This is a (partial) backport of !7931 (merged) to gtk3 It was obtained with git cherry-pick -Xrename-threshold=20% 8e15dcd5 It fixes clipboard pasting of some color-indexed bitmaps.
Marge Bot (634620f4) at 29 Oct 14:25 Merge branch 'pr/backport8e15dcd5' into 'gtk-3-24' ... and 1 more commit
The win32 keymap translates a (vk, modifiers, CapsLock) state to a keyval by reading the keyboard layout DLL tables itself. A systematic comparison with ToUnicodeEx() showed several places where it disagreed with Windows. This series fixes them. The comparison (a standalone test, not part of the series) asks both ToUnicodeEx() and gdk_display_translate_key() about every virtual key in every Shift/Ctrl/Alt combination with CapsLock off and on (16 states) on all 218 installed layouts, and sorts…
Marge Bot (7bda5c80) at 29 Oct 14:06 Merge branch 'win32-keyboard-layout-names' into 'main' ... and 4 more commits
Summary GdkWin32Keymap's per-layout display names, and the way it learns each installed layout's KLID, both treat a Win32 HKL as simpler to decode than it actually is. Three focused commits: Resolve the real per-layout display name (TSF profile -> registry -> locale fallback), cached once per layout instead of recomputed, instead of mis-using the KLID as an LCID. Cache two more descriptive fields (BCP-47 language tag, IME/TSF profile id) and log all of it under the existing GDK_DEBUG=input…
Thanks for the quick turnaround on this! Our app loads a lot of user icons via data-urls and each time they reload or open a new game file dozens (or however many icons are in their specific game file) of these textures leak 😅
Steps to reproduce Here's a small self contained repro: #include static const char png_base64[] = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/" "9hAAAAGUlEQVR4nGP4z8DwnxLMMGrAqAGjBgwXAwAwxP4QHCfkAAAAAABJRU5ErkJggg=="; static guint created, released; static void (*texture_constructed)(GObject *); static void texture_released(gpointer data, GObject *object) { ++released; } static void texture_constructed_override(GObject *object) { texture_constructed(object); ++created; g_object_weak_ref(object,…
Fixes #8516 (closed) Using the repro program from the issue before: luna@luna-pc:~/Documents/tmp/gtk$ ./_build/css_leak textures created=200 released=0 luna@luna-pc:~/Documents/tmp/gtk$ ./_build/css_leak direct textures created=200 released=200 after fix: [gtk] luna@luna-pc:~/Documents/tmp/gtk$ ./_build/css_leak textures created=200 released=200 [gtk] luna@luna-pc:~/Documents/tmp/gtk$ ./_build/css_leak direct textures created=200 released=200
Marge Bot (74ce9f54) at 29 Oct 13:41 Merge branch 'fix-css-texture-leak' into 'main' ... and 2 more commits
Fixes #8516 (closed) Using the repro program from the issue before: luna@luna-pc:~/Documents/tmp/gtk$ ./_build/css_leak textures created=200 released=0 luna@luna-pc:~/Documents/tmp/gtk$ ./_build/css_leak direct textures created=200 released=200 after fix: [gtk] luna@luna-pc:~/Documents/tmp/gtk$ ./_build/css_leak textures created=200 released=200 [gtk] luna@luna-pc:~/Documents/tmp/gtk$ ./_build/css_leak direct textures created=200 released=200