How to use filter on PGraphics in thread?