CSS backdrop-filter lets you create a blur that looks like it isn’t applied on the elements themselves, but rather on top of the elements. This gives an appearance of a frosted glass.
Here’s the CSS code in action showing you before and after: Codepen link.
I’m not able to reproduce this effect.
I have some Skia references, here and here, but I’m unable to replicate it easily.
I’m facing two problems:
To create a frosted glass, I need a white rectangle of a very low opacity (0.01) with a blur applied. The problem is it doesn’t appear like what I see with backdrop-filter in the CSS code. This makes sense because a normal blur blurs the element itself while a backdrop-filter blurs elements behind it. But I’m not able to understand how I would replicate this effect.
Another problem is that while I discovered I could use Precompose node to blur the content, but I get a Layer back. I don’t know how would I take this layer and put it onto frosted glass rectangle.
PictureRecorder node exists but it doesn’t seem to work
Update: A Picture means something else in Skia. To display the picture back again from PictureRecorder, one needs to use ReplayPicture node. More info: 1, 2, 3, 4, 5, 6
I don’t want to use OffscreenCanvas as it’ll mess up the dimensions