United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6630475 Remove dependency between ColorModel/ColorSpace and cmm.dll
6630475 : Remove dependency between ColorModel/ColorSpace and cmm.dll

Details
Type:
Enhancement
Submit Date:
2007-11-15
Status:
Closed
Updated Date:
2010-04-04
Project Name:
JDK
Resolved Date:
2007-12-17
Component:
client-libs
OS:
generic
Sub-Component:
2d
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u10

Related Reports
Backport:

Sub Tasks

Description
While researching bundle dependencies for jkernel i found out that cmm.dll may be loaded 
due to access to its auxilary public static fields.

Here is related stack trace:

       at sun.awt.color.CMM.<clinit>(CMM.java:109)
       at java.awt.image.ColorModel.isLinearRGBspace(ColorModel.java:1685)
       at java.awt.image.DirectColorModel.<init>(DirectColorModel.java:221)
       at java.awt.image.BufferedImage.<init>(BufferedImage.java:328)
       at sun.java2d.loops.GraphicsPrimitive.convertFrom(GraphicsPrimitive.java:537)
       at sun.java2d.d3d.D3DGeneralBlit.Blit(D3DBlitLoops.java:712)
       at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:927)
       at sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:550)
       at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:73)
       at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:998)
       at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:178)
       at sun.java2d.SunGraphics2D.copyImage(SunGraphics2D.java:2918)
       at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3056)
       at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3010)
       at javax.swing.plaf.metal.MetalBumps.paintIcon(MetalBumps.java:123) 

ColorModel.isLinearRGBspace() has following code:

   static boolean isLinearRGBspace(ColorSpace cs) {
       // Note: CMM.LINEAR_RGBspace will be null if the linear
       // RGB space has not been created yet.
       return (cs == CMM.LINEAR_RGBspace);
   }

If none of CMM methods are used then cmm.dll should not be loaded.

                                    

Comments
SUGGESTED FIX

http://sa.sfbay.sun.com/projects/java2d_data/6u10/6630475.1
                                     
2007-11-26
EVALUATION

CMM class has 2 fields that are used as placeholders to share information between 
ColorModel and colorSpace classess. They are used in very few places of the code.
Access to these fields requires static initialization to be performed that loads dll. 

Porposed solution is to created nested public static class and move these variables 
there or move them to separate class.
                                     
2007-11-15



Hardware and Software, Engineered to Work Together