[OpenJDK 2D-Dev] RFR: 8256321: Some "inactive" color profiles use the wrong profile class

Sergey Bylokhov serb at openjdk.java.net
Fri Nov 13 23:07:08 UTC 2020


The implementation of ICC_Profile tries to defer loading the data of the color profile, and it uses some predefined values for some profile properties for the standard profiles like sRGB, PYCC, etc. If the application requests profile data then the ICC_Profile class activates the profile and uses properties from that data.

Deferring mechanism for all profiles was added in JDK-6793818, but unfortunately, the color profile class was hardcoded incorrectly "CLASS_DISPLAY" for all profiles. However, the "CIEXYZ.pf" and "PYCC.pf" profiles should use "CLASS_COLORSPACECONVERSION".

Later the color "profiles/xxx.pf" were replaced in the JDK, and the actual type of the "CIEXYZ.pf" was changed to the "CLASS_ABSTRACT", but the deferring mechanism still uses "CLASS_DISPLAY".

As a result of this bug, the color profile reports different values before/after activations.

-------------

Commit messages:
 - Initial fix

Changes: https://git.openjdk.java.net/jdk/pull/1211/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1211&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8256321
  Stats: 87 lines in 2 files changed: 85 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1211.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1211/head:pull/1211

PR: https://git.openjdk.java.net/jdk/pull/1211


More information about the 2d-dev mailing list