[OpenJDK 2D-Dev] How are transformations done and some other questions
Jim.A.Graham at Sun.COM
Mon May 19 12:09:50 PDT 2008
And note that we aren't necessarily dealing with transforms in the
fastest way in all cases. Until recently we were focused mainly on
Swing performance and they mostly dealt with integer translations and
integer rendering requests. Nowadays as we focus the platform more on
rich clients and scene graphs we are starting to run into the
inefficiencies in the transformed shape rendering code.
We recently made some major enhancements to the OGL and D3D pipelines in
6u10 to dispatch transformed wide single lines, and filled and drawn
rectangles directly to a primitive in the RenderQueue and got a huge
performance boost. We'll have to port those changes (along with the D3D
pipeline) to JDK7 sometime soon (after we're done fixing bugs in 6u10)
and then we'd like to continue doing performance work to make
transformations of some other common shapes avoid a lot of the overhead
you are seeing here...
Clemens Eisserer wrote:
> Sorry, seems I've mixed some things up.
> After stepping through with a debugger things are much clearer now :)
> Sorry for the traffic, lg Clemens
> 2008/5/16 Clemens Eisserer <linuxhippy at gmail.com>:
>> 1.) I am currently investigating how AffineTransformations are done by
>> Java2D, and for the X11 Pipeline it seems for anything but
>> translations the PixelToShapeConverter is called and the general
>> path/fill algorythmns are used.
>> In the case of a simply Line, it is rotated and then sent to the
>> X11Renderer which continues processing as nothing would have
>> Does the OpenGL pipeline work the same way?
>> I saw that it registers some TransformBlits, so is the tranformation
>> of everything exctept images handled by Java2D?
>> I wonder because this would mean that for images I would have to
>> adjust the context to rotate, but for everything else I would have to
>> reset it.
>> Seems I mess things somehow up :-/
>> 2.) The X11-Pipeline does clipping itself (took me some time to
>> understand why the validation code always passed without re-seting the
>> current clip^^) for drawImage. Why was this done?
>> Thanks, lg Clemens
More information about the 2d-dev