chjj / compton

A compositor for X11.
Other
2.25k stars 500 forks source link

Range of blur in compton. #329

Open yagomont opened 8 years ago

yagomont commented 8 years ago

Hello, i'm having issues with blur-kernels in compton. I am using compton-convgen to make a 17x17 box blur kernel, in --dump-compton format, but when I put it on the config file, compton just spits out a

parse_matrix(): Matrix width/height too large.

Is there a way to bypass the limit? Or is it driver related (I'm using Open Source radeon driver, in a HD 6670 XFX)

glodfinch commented 8 years ago

Looks like a hard limit in the code to 16x16. Not sure why, perhaps someone else could elaborate.

Edit: You can find that at line 5066 in compton.c: if (wid > 16 || hei > 16) { printf_errf("(): Matrix width/height too large.");

Alanaktion commented 8 years ago

I had assumed this was because of a performance issue with the xrender backend, but it seems that the blur doesn't work on xrender anyway.

I tried compiling without the 16x16 check and running with a 25x25 gaussian blur on glx. Startup time is certainly higher with larger blurs, but the performance after startup doesn't really seem to change. I start to see performance issues around 27x27 on this machine. The 16x16 limit seems very arbitrary, but was probably a good limit based on hardware at the time it was written.

I'd love to see a different implementation of box blurs so they didn't require a complete Gaussian matrix, possibly speeding them up significantly, which would open other options like a 2-pass blur.