United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6480051 GraphicsExpose events generated by X11 Pixmap Blits
JDK-6480051 : GraphicsExpose events generated by X11 Pixmap Blits

Details
Type:
Bug
Submit Date:
2006-10-10
Status:
Closed
Updated Date:
2011-05-18
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
client-libs
OS:
solaris
Sub-Component:
2d
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:

Related Reports
Backport:

Sub Tasks

Description
In doing some remote X11 testing over a DSL line (6megabit down, 600kilobit up)
I noticed that benchmarks which render lots of managed images would complete all
of the blits and then spend several seconds after the last blit transferring
network traffic before a Toolkit.sync() would finish.

This traffic appears to be X11 NoExpose events being returned to the client
for each such Blit.

                                    

Comments
EVALUATION

In looking at our usage of X11 GCs it looks like we rely on the default setting
of the GraphicsExposures attribute which defaults to True.  With that setting
any XCopyArea request will result in an event sent back to the client, even if
there were no conditions that should result in an exposure (in that case a
special NoExpose event is generated so that clients can associate a 1:1 mapping
between XCopyArea requests and the associated events that they generate).

While the XCopyArea that is used during scrolling operations (i.e. the ones that
come from a Graphics.copyArea() method call) should result in exposure events so
that damage handling due to obscured scroll and copyarea operations will
operate properly, the XCopyArea calls used to perform Pixmap blits for managed
and accelerated images do not need these events and so should be executed with
the GraphicsExposures turned off.
                                     
2006-10-10
EVALUATION

Setting GraphicsExposures to False has a significant impact on performance over
a low bandwidth connection (even DSL at 6 Megabit down, 600 Kilobit up).

Raw blitting benchmarks improved by as much as 2 to 2.5 times and some Swing
widgets were perhaps 20% faster (Swing does a lot more work than just blitting
images).

As always, your mileage may vary depending on the speed of your connection
(both upload and download) and how intensely the application relies on blitting
managed or volatile images.
                                     
2006-10-10



Hardware and Software, Engineered to Work Together