Wallpaper Engine

Wallpaper Engine

Ver estadísticas:
Arthesian 21 ABR 2018 a las 2:02
[Developer CSS] Blur-filter performance weird results
Hi,

Some of my wallpapers use CSS filters on the canvas for additional effects on the music
( like : hilight, hue-shift, scale....and blur ).

Blur always used to work just as well as the others, even though I know blur is a CPU expensive operation, I'd always get 60+ fps.( I apply the blur filter every frame, with a different value based on the amount of 'bass' in the audio data received from Wallpaper Engine )

But since the new year ( around the time, no fixed date ), I have seen that the performance of the Blur() filter has changed. If blur effects of <1px are applied to the canvas ( filter: blur(0.12px); for example ), The framerate plummets to <30fps instantly. But as soon as the blur is more than 1px ( filter: blur(1.1px); filter: blur(10px); ) the framerate jumps back to 60+FPS.

Keep in mind that the code execution is still running at 60 ticks per second, and requests an animation frame 60 times a second. But the browser just won't render it :P -- probably because it's busy processing the filters.

I think that's weird, because I would assume that large blurs ( like 10px ) would require much more calculations than a real small blur ( like 0.2px ).

Since my knowledge of the internals of browser rendering is (very) limited, I cannot seem to find the cause for this issue. And I'm pretty sure that It didn't happen before ( let's say ~before 2018 ).

Did something change in the chromium renderer perhaps? or maybe some other filter options that I've added are conflicting with the blur() filter? Maybe some known fixes to smooth out the browser rendering? Or known bugs in the blur() filter?I really have no clue any more :P

Any insights would be appreciated, because for now the only thing I could do was remove the blur effect when it's below 1px, and only apply it when it reached the threshold of 1px, which would result in a smooth effect, but I can't help to think it's just something stupid I'm missing.....
Última edición por Arthesian; 21 ABR 2018 a las 2:07
< >
Mostrando 1-5 de 5 comentarios
Biohazard  [desarrollador] 21 ABR 2018 a las 3:45 
Unfortunately I don't know more about the internals of Chrome than you or most anyone else here. I looked in their bug tracker a few times in the past since whatever is going wrong here with Chromium is usually listed there too, perhaps you'll be able to find something there and share?

But the thing is, every time they fix one thing, they break two other things. So when I implement their fixes then you can bet that something else will break, it would be nice if Google would focus a bit more on pure fixing than adding new things that break old ones.

I haven't changed any command line options or other settings. Did you try deleting the 'wpcache' from the wallpaper_engine/ui folder? Perhaps Chromium has some old cached data there that conflicts with something. Right now I'm not manually deleting this because I'm kinda expecting Chromium to handle its cache right on its own, but who knows.

Edit: I only remembered Squee's VU Meter to have a blur option right now, I checked it there and it doesn't seem to cause a performance hit. Surprisingly it doesn't notably affect performance at all. I think the issue could be could be in relation to something else like certain other CSS options too.
Última edición por Biohazard; 21 ABR 2018 a las 3:57
Arthesian 22 ABR 2018 a las 12:45 
Thanks for your response. I will dig a bit deeper into the bugtracker of chromium then, and see if I can find any known issue....

It's really weird though....when I enable blur, the framerate immediately drops to ~20-30 fps, but as soon as the 'bass' kicks in, and the blur is 'more extreme', it becomes like silk smooth....

Also, I could reproduce the same issue with Squee's VU meter.

If I open the console ( remote debugger ), and set the Blur to 0.15px ( instead of the 1px which is the minimum value that could be set through the settings ), the framerate immediately drops to ~30 fps ( although the fps meter on screen still shows 60fps, but you can clearly see it isn't running at 60.... )

Obviously, his wallpaper is not affected, because he only uses integer values as settings :P thus the lowest value is 1.

But this seems to 'prove' ( of course this is a single test ), that it isn't purely my own wallpaper which suffers from this :P
Última edición por Arthesian; 22 ABR 2018 a las 12:52
Biohazard  [desarrollador] 22 ABR 2018 a las 13:25 
You could also try this in Chrome itself or the CEF sample application (WE uses 3.3325.1755.g7c74b17 right now) http://opensource.spotify.com/cefbuilds/index.html

I think it happens everywhere even in the latest Chrome build. If there is no bug report yet, perhaps you could make one so hopefully they're going to fix it?
Arthesian 22 ABR 2018 a las 13:30 
Tomorrow I will create a small stand alone test project, and I will report the issue to the chromium team.

Thank you for your time :)
Biohazard  [desarrollador] 22 ABR 2018 a las 13:34 
Sounds good. Also, my CPU usage spikes with blur < 1px, so Chromium is suddenly using the CPU for the blur for no reason instead of the GPU.

Which is similar to this so perhaps you could also reference it: https://bugs.chromium.org/p/chromium/issues/detail?id=726143&q=blur%20performance&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified (look at the date so yeah..... :/ )
< >
Mostrando 1-5 de 5 comentarios
Por página: 1530 50

Publicado el: 21 ABR 2018 a las 2:02
Mensajes: 5