Hi Jeroen, I'm the submitter of JDK-8068529 > <https://bugs.openjdk.java.net/browse/JDK-8068529> and I'd like to > respond to the comments of this bug >
Thanks for reporting this issue. > In reply to the comments of 2015-01-12: without xrender, XSync is indeed > called in X11SurfaceData.c, in function X11SD_GetSharedImage. If you change > the code to include a counter and a printf/fflush statement, you can see > that XSync is called each time the Java-method paint() is called. > This XSync call causes each paint to be displayed on the screen. > Great that you were able to find the spot where the sync happens, thanks! It seems it is what I suspected, an implementation artifact. However at least on my system I don't get a completly smooth animation even with the X11 pipeline - although it is a lot better than with the xrender pipeline. The D3D & OpenGL pipelines have some code to work around the issue by performing a sync for blits which are equal to the blits of Swing's backbuffer operations. However, I am not very satisfied with the D3d/OpenGL way. X is a network based system where sync/flush-operations are quite expensive and it would actually slow down every direct blit to screen. My plan was to introduce flush-points in AWT to get the content on screen where appropriate instead of guessing in the pipeline which operations could be backbuffer blits. However I am not even sure this is feasable, so it will take some time for to figure out a sane way. Best regards and thanks for your investigations, Clemens