Re: Bad performance with Canvas and extensive clipping

2014-05-27 Thread Jim Graham
You may have been testing J2D in a pre-retina-aware VM vs. JavaFX which was retina aware a little earlier than J2D (due to JavaFX being on a slightly more liberal feature policy for new releases). I think J2D went retina-aware in 8.0, are you using 8.0 for those tests? The screenshot may be

Re: Bad performance with Canvas and extensive clipping

2014-05-27 Thread Jim Graham
Canvas is, essentially, a draw pixels mechanism. We have to bundle the requests into a command stream due to threading issues, but when the requests get to the render thread then they get turned into pixels so the command stream is a temporary intermediary. Some of the hw J2D pipelines also

Re: Bad performance with Canvas and extensive clipping

2014-05-27 Thread Tom Schindl
I'm on java8u5! Tom On 27.05.14 23:38, Jim Graham wrote: You may have been testing J2D in a pre-retina-aware VM vs. JavaFX which was retina aware a little earlier than J2D (due to JavaFX being on a slightly more liberal feature policy for new releases). I think J2D went retina-aware in 8.0,

Re: Bad performance with Canvas and extensive clipping

2014-05-27 Thread Tom Schindl
Is there anything I could do to help getting rectangular clipping into JavaFX - I tried to find my way through the sources but I'm not sure I have enough knowledge to provide a patch in this area. BTW it looks like I'm not alone with the clipping performance problem see

Re: Bad performance with Canvas and extensive clipping

2014-05-27 Thread Jim Graham
Hi Tom, There are 2 upgrades to consider. One involves new API, but is probably best in the long run. Without API, we'd have to detect if the path were rectangular in the processing of the CLIP command in NGCanvas.java. If the 4 coordinates are an axis aligned rectangle on integer

Re: Bad performance with Canvas and extensive clipping

2014-05-27 Thread Jim Graham
My apologies. If Swing was managing the back buffer for you then they would make it retina-aware for you on 8.0. If you are creating your own BufferedImage then it will not be retina-scaled unless you do that yourself. Right now we are working to get the Swing embedded in FX mechanisms to

Re: Bad performance with Canvas and extensive clipping

2014-05-24 Thread Tom Schindl
Hi, another big difference when using the a BufferedImage is to that the font rendering is catastrophic, hope to offend nobody. I'm not very good a AWT maybe I made a dumb mistake? See http://downloads.efxclipse.org/font_j2d_fx.png - the j2d font looks completely blurred in contrast to the sharp

Re: Bad performance with Canvas and extensive clipping

2014-05-23 Thread Jim Graham
Are you clipping to an arbitrary path in all cases or just a rectangle? Unfortunately we only offer the arbitrary clip-to-current-path method that isn't optimized for basic rectangular clipping and it implements soft clipping. There is an outstanding tweak that we added faster clipping

Re: Bad performance with Canvas and extensive clipping

2014-05-23 Thread Tom Schindl
Hi, As an experiment I've now written a SWT-GC implementation using a BufferedImage Graphics2D and transfering the pixels over to JavaFX and the performance is as it is with native SWT. I always thought Canvas works similar to Image and one only draws pixels - looks like that is not the case,