Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.
/ jdk22u Public archive

Commit

Permalink
8323210: Update the usage of cmsFLAGS_COPY_ALPHA
Browse files Browse the repository at this point in the history
Backport-of: aba19334eaeb46d37169cddeef929b13e050a60e
  • Loading branch information
mrserb committed Jan 16, 2024
1 parent 7b32b94 commit ed269bf
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

1 comment on commit ed269bf

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.