Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8256321: Some "inactive" color profiles use the wrong profile class #1211

Closed
wants to merge 1 commit into from

Conversation

mrserb
Copy link
Member

@mrserb mrserb commented Nov 13, 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.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8256321: Some "inactive" color profiles use the wrong profile class

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/1211/head:pull/1211
$ git checkout pull/1211

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 13, 2020

👋 Welcome back serb! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 13, 2020

@mrserb The following labels will be automatically applied to this pull request:

  • 2d
  • awt

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added 2d awt labels Nov 13, 2020
@mrserb
Copy link
Member Author

mrserb commented Nov 13, 2020

/label remove awt

@openjdk openjdk bot removed the awt label Nov 13, 2020
@openjdk
Copy link

openjdk bot commented Nov 13, 2020

@mrserb
The awt label was successfully removed.

@mrserb mrserb marked this pull request as ready for review Nov 13, 2020
@openjdk openjdk bot added the rfr label Nov 13, 2020
@mlbridge
Copy link

mlbridge bot commented Nov 13, 2020

Webrevs

@victordyakov
Copy link

victordyakov commented Nov 17, 2020

@prsadhuk please review this fix

@prsadhuk
Copy link
Contributor

prsadhuk commented Nov 19, 2020

It will be good to know where, in spec or any link, it is mentioned to use CLASS_ABSTRACT/CLASS_COLORSPACECONVERSION instead of CLASS_DISPLAY?

@mrserb
Copy link
Member Author

mrserb commented Nov 19, 2020

It will be good to know where, in spec or any link, it is mentioned to use CLASS_ABSTRACT/CLASS_COLORSPACECONVERSION instead of CLASS_DISPLAY?

It is not specified, it is reflected the data used by our current icc profiles "CIEXYZ.pf" and "PYCC.pf" from the:
open/src/java.desktop/share/classes/sun/java2d/cmm/profiles/

@prsadhuk
Copy link
Contributor

prsadhuk commented Nov 23, 2020

I am not sure how to interpret this .pf file as this are binary file. Probably whoever generated this pf file can comment on this modification.

@mrserb
Copy link
Member Author

mrserb commented Nov 30, 2020

@prrace please take a look

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 28, 2020

@mrserb This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@mrserb
Copy link
Member Author

mrserb commented Dec 31, 2020

Any volunteers for a review?

prrace
prrace approved these changes Jan 4, 2021
@openjdk
Copy link

openjdk bot commented Jan 4, 2021

@mrserb This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8256321: Some "inactive" color profiles use the wrong profile class

Reviewed-by: prr

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 678 new commits pushed to the master branch:

  • e6f9926: 8257809: JNI warnings from Toolkit JPEG image decoding
  • 9d160aa: 8257815: Replace global log2 functions with efficient implementations
  • f80c63b: 8258490: Shenandoah: Full GC does not need to remark threads and drain SATB buffers
  • 7f04d23: 8258800: Deprecate -XX:+AlwaysLockClassLoader
  • d679caa: 8196466: javax/swing/JFileChooser/8062561/bug8062561.java fails
  • a2a3f4a: 8258924: javax/swing/JSplitPane/4201995/bug4201995.java fails in GTk L&F
  • f351e15: 8258382: Fix optimization-unstable code involving pointer overflow
  • 526c000: 8255729: com.sun.tools.javac.processing.JavacFiler.FilerOutputStream is inefficient
  • 497efef: 8225116: Test OwnedWindowsLeak.java intermittently fails
  • f5ee356: 8179503: Java should support GET OCSP calls
  • ... and 668 more: https://git.openjdk.java.net/jdk/compare/05b824567c346a7d136c01d23f56a908e7efc6d7...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Jan 4, 2021
@mrserb
Copy link
Member Author

mrserb commented Jan 5, 2021

/integrate

@openjdk openjdk bot closed this Jan 5, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Jan 5, 2021
@openjdk
Copy link

openjdk bot commented Jan 5, 2021

@mrserb Since your change was applied there have been 686 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

Pushed as commit a6c0881.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2d integrated
4 participants