Closed janus2 closed 6 years ago
Very nice!
The filtering algo of ShowImage seems to be much more optimized though. I barely see CPU usage there compared to stuttering window resizing with TAResizer.
I dimly remember stippi describing how neat it is to have worker threads applying a filter which can be interrupted when the data changes (i.e. a new resize event arrives in our case). I assume it's not trivial, though... :)
If it can't be optimized further, maybe the filtering should be done on mouse-up after all and the resizing of the window done non-filtered.
I'd like to eliminate the "Show grip" checkbox. Feels like a too tiny option to waste space on. Idea: only show the big resize grip if the mouse is over that corner of the window. If possible...
As I can see the code of ShowImage is the same of TAResizer
The scaling code... The drawing code is not optimized, without the smooth scaling the resizing is still very expensive on my machine.
Maybe the CPU gets hammered, because every resizing event triggers a filtering and those queue up? ShowImge only resizes when a button is pressed and therefore doesn't has to filter continuously.
This is a WIP please do not merge.
What do you think @humdingerb?