[OpenJDK 2D-Dev] JDK-8068529 XSync when xrender is turned off
Jeroen
mljeroen+jdk at gmail.com
Thu Jan 22 06:43:04 UTC 2015
Hello,
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, but I don't have a openjdk account. Help at
openjdk suggested to post this here.
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.
*int xsync_counter = 0;*XImage* X11SD_GetSharedImage(X11SDOps *xsdo, jint
width, jint height,
jint maxWidth, jint maxHeight, jboolean
readBits)
{
XImage * retImage = NULL;
if (cachedXImage != NULL &&
X11SD_CachedXImageFits(width, height, maxWidth, maxHeight,
xsdo->depth, readBits)) {
/* sync so previous data gets flushed */
* xsync_counter++; printf("XSync %d in
X11SurfaceData.c:GetSharedImage\r\n", xsync_counter); fflush(stdout);*
XSync(awt_display, False);
retImage = cachedXImage;
cachedXImage = (XImage *)NULL;
} else if (width * height * xsdo->depth > 0x10000) {
retImage = X11SD_CreateSharedImage(xsdo, width, height);
}
return retImage;
}
This XSync call causes each paint to be displayed on the screen.
Regards,
Jeroen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20150122/b9ae3423/attachment.html>
More information about the 2d-dev
mailing list