Skip to content

Commit

Permalink
8323210: Update the usage of cmsFLAGS_COPY_ALPHA
Browse files Browse the repository at this point in the history
Reviewed-by: prr
  • Loading branch information
mrserb committed Jan 9, 2024
1 parent f3be138 commit aba1933
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/java.desktop/share/native/liblcms/LCMS.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -177,8 +177,13 @@ JNIEXPORT jlong JNICALL Java_sun_java2d_cmm_lcms_LCMS_createNativeTransform
}
}

cmsUInt32Number dwFlags = 0;
if (T_EXTRA(inFormatter) > 0 && T_EXTRA(outFormatter) > 0) {
dwFlags |= cmsFLAGS_COPY_ALPHA;
}

sTrans = cmsCreateMultiprofileTransform(iccArray, j,
inFormatter, outFormatter, renderingIntent, cmsFLAGS_COPY_ALPHA);
inFormatter, outFormatter, renderingIntent, dwFlags);

(*env)->ReleaseLongArrayElements(env, profileIDs, ids, 0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

/*
* @test
* @bug 8012229 8300725 8279216
* @bug 8012229 8300725 8279216 8323210
* @summary one more test to check the alpha channel
*/
public final class ColCvtAlphaDifferentSrcDst {
Expand Down

7 comments on commit aba1933

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@mrserb
Copy link
Member Author

@mrserb mrserb commented on aba1933 Jan 9, 2024

Choose a reason for hiding this comment

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

/backport jdk21u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on aba1933 Jan 9, 2024

Choose a reason for hiding this comment

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

@mrserb Could not automatically backport aba19334 to openjdk/jdk21u-dev due to conflicts in the following files:

  • src/java.desktop/share/native/liblcms/LCMS.c

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk21u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk21u-dev.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b backport-mrserb-aba19334

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk.git aba19334eaeb46d37169cddeef929b13e050a60e

# Backport the commit
$ git cherry-pick --no-commit aba19334eaeb46d37169cddeef929b13e050a60e
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport aba19334eaeb46d37169cddeef929b13e050a60e'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk21u-dev with the title Backport aba19334eaeb46d37169cddeef929b13e050a60e.

@mrserb
Copy link
Member Author

@mrserb mrserb commented on aba1933 Jan 10, 2024

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on aba1933 Jan 10, 2024

Choose a reason for hiding this comment

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

@mrserb Could not automatically backport aba19334 to openjdk/jdk17u-dev due to conflicts in the following files:

  • src/java.desktop/share/native/liblcms/LCMS.c
  • test/jdk/sun/java2d/cmm/ColorConvertOp/ColCvtAlphaDifferentSrcDst.java

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk17u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk17u-dev.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b backport-mrserb-aba19334

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk.git aba19334eaeb46d37169cddeef929b13e050a60e

# Backport the commit
$ git cherry-pick --no-commit aba19334eaeb46d37169cddeef929b13e050a60e
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport aba19334eaeb46d37169cddeef929b13e050a60e'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk17u-dev with the title Backport aba19334eaeb46d37169cddeef929b13e050a60e.

@mrserb
Copy link
Member Author

@mrserb mrserb commented on aba1933 Jan 13, 2024

Choose a reason for hiding this comment

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

/backport jdk22u

@openjdk
Copy link

@openjdk openjdk bot commented on aba1933 Jan 13, 2024

Choose a reason for hiding this comment

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

@mrserb the backport was successfully created on the branch backport-mrserb-aba19334 in my personal fork of openjdk/jdk22u. To create a pull request with this backport targeting openjdk/jdk22u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit aba19334 from the openjdk/jdk repository.

The commit being backported was authored by Sergey Bylokhov on 9 Jan 2024 and was reviewed by Phil Race.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk22u:

$ git fetch https://github.com/openjdk-bots/jdk22u.git backport-mrserb-aba19334:backport-mrserb-aba19334
$ git checkout backport-mrserb-aba19334
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk22u.git backport-mrserb-aba19334

Please sign in to comment.