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

8294488: Delete KCMS transforms wrappers #10459

Closed
wants to merge 4 commits into from

Conversation

mrserb
Copy link
Member

@mrserb mrserb commented Sep 28, 2022

This is a request to cleanup the shared code for the colors conversions. That code still uses some wrappers which can be simplified and/or deleted after KCMS removal. For example, each conversion from one color space to another creates 3 wrappers - for the first color profile, the second color profile, and one to combine the first two. But for the lcms library we only need the list of color profiles and rendering intent -> only one transform object can be used.

The new constructor for the LCMSTransform is added and now used everywhere:
LCMSTransform(int renderingIntent, ICC_Profile... profiles)
It will wrap the cmsCreateMultiprofileTransform function in LCMS library:

I tried to preserve the current behavior, and as a result, two "workarounds" are used for the next bugs.

  • JDK-8216369: after the cleanup it became obvious that we use a hardcoded value for the first rendering intent. There is a code to fetch the intent from the color profile but I postponed use it for now because some of our built-in profiles use different default intents.
  • JDK-8272860: the old code always fetched some information from the color profile header as result we cache the headers for any profiles we used. This cache workaround the JDK-8272860 while the direct access to the profile via LCMS library could fail. The new code intentionally caches the header.

Notes:

  • The old wrappers used a rendering intent for each intermediate transform, the LCMS use only one intent
  • The old wrappers could throw the cmm exception if the rendering intent was not supported. The LCMS ignores unsupported intents and uses some default
  • The old wrappers had a way to specify the input and output profiles, the LCMS library uses the first profile as input and the last profile as output. Those parameters are removed
  • If at some point the new CMS library will be added it will be easy to integrate it using XXCMS plugin, instead of using some specific library logic in the shared code

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10459/head:pull/10459
$ git checkout pull/10459

Update a local copy of the PR:
$ git checkout pull/10459
$ git pull https://git.openjdk.org/jdk pull/10459/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10459

View PR using the GUI difftool:
$ git pr show -t 10459

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10459.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 28, 2022

👋 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 Sep 28, 2022

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

  • client

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

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Sep 28, 2022
@mrserb mrserb marked this pull request as ready for review October 4, 2022 02:38
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 4, 2022
@mlbridge
Copy link

mlbridge bot commented Oct 4, 2022

Webrevs

@prrace
Copy link
Contributor

prrace commented Oct 7, 2022

It looks Ok. I ran all our automated tests and there was only one failure - of a closed (for no particular reason) jtreg test
that tests the pluggable interface. It will need to be problem listed until such time as it can be updated - or perhaps deleted.

@prrace
Copy link
Contributor

prrace commented Nov 1, 2022

I've prepared a closed PR which fixes the closed test to match this change
It needs to be pushed at the same time but it has yet to be reviewed.
Once it is approved we can co-ordinate pushing both at the same time.

@mrserb
Copy link
Member Author

mrserb commented Nov 1, 2022

Thank you! I'll do a /integrate defer to make a trick.

Copy link
Contributor

@prrace prrace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closed PR is approved. So if you do the /integrate defer trick I'll take care of the rest.

@openjdk
Copy link

openjdk bot commented Nov 3, 2022

@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:

8294488: Delete KCMS transforms wrappers

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 408 new commits pushed to the master branch:

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 Pull request is ready to be integrated label Nov 3, 2022
@mrserb
Copy link
Member Author

mrserb commented Nov 4, 2022

/integrate defer

@openjdk openjdk bot added the deferred label Nov 4, 2022
@openjdk
Copy link

openjdk bot commented Nov 4, 2022

@mrserb Integration of this pull request has been deferred and may be completed by any project committer using the /integrate pull request command.

@prrace
Copy link
Contributor

prrace commented Nov 4, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Nov 4, 2022

Going to push as commit d8573b2.
Since your change was applied there have been 423 commits pushed to the master branch:

  • f857f79: 8015739: Background of JInternalFrame is located out of JInternalFrame
  • b847fb6: 8296414: [BACKOUT] JDK-8295319: pending_cards_at_gc_start doesn't include cards in thread buffers
  • 5b7e706: 8295753: (fs) UnixPath::toRealPath does not return correct case when links not followed
  • 82f9819: 8294536: Update troff form of man page for new --spec-base-url option
  • b49bdae: 8294816: C2: Math.min/max vectorization miscompilation
  • c206f28: 8283101: serviceability/jvmti/thread/GetFrameCount/framecnt01/framecnt01.java failing #VirtualThread-Frozen: number of frames expected: 14, got: 9
  • 97c5a64: 8296287: Improve documentation for Types.directSupertypes()
  • f9c7cda: 8294109: JavaDoc search should search whole index
  • 5622b09: 8200337: Generalize see and link tags for user-defined anchors
  • 22347e4: 8277775: Fixup bugids in RemoveDropTargetCrashTest.java - add 4357905
  • ... and 413 more: https://git.openjdk.org/jdk/compare/090cdfc7a2e280c620a0926512fb67f0ce7f3c21...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 4, 2022
@openjdk openjdk bot closed this Nov 4, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review deferred labels Nov 4, 2022
@openjdk
Copy link

openjdk bot commented Nov 4, 2022

@prrace Pushed as commit d8573b2.

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

@mrserb mrserb deleted the tfmCleanup branch November 4, 2022 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants