I’ve an algorithm where I process a transform on a (memory) Image, and then draw this image to the graphics object.
Up to now, I wasn’t fighting too much about speed, but I’ve added visual feedback based on user mouse movement. I’ve added timing information on my transform algorithm (it takes 30 to 60 milliseconds, 40ms avg).
In the end of the transform, I have a repaint() call.
However, it is clear that I’m not seeing 25 frames per second. I’ve tried to change setBufferedToImage (but I haven’t really seen a difference) to false (as I’m just drawing my image), but it is clear that the paint routine is not called like it should (it is always delayed)
Is there a way I could force a repaint asyncronously (isn’t what repaint() is supposed to do ?) ?
How could I ensure my 25fps ?