JDK-6633796 : SurfaceData should not initialize Ductus until needed
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6u10
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-11-26
  • Updated: 2011-02-11
  • Resolved: 2007-12-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u10 b09Fixed 7Resolved
Description
SurfaceData initializes number of pipes and loops but some of them might be not used at all.
This can be done more lazily.

In particular, Ductus library is initialized (triggered by initialization of AA loops) but 
many simple applets are not using AA loops.
Moreover, SwingSet on windows only needs loads Ductus library for 2 tabs 
(JColorChooser demo (animation of thick 2D shape) and progressbar demo (LoopPipe.getStrokeSpans() 
needs stroker from Ductus)).
I.e. for many java applications initialization of Ductus at startup seems to be unneeded.

Comments
SUGGESTED FIX http://sa.sfbay.sun.com/projects/java2d_data/6u10/6633796.0/
29-11-2007

EVALUATION Move set of AA-related static fields of SurfaceData and their initializers to inner class.
26-11-2007