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 authored and pull[bot] committed Mar 13, 2024
1 parent 28ce75e commit 8325800
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

0 comments on commit 8325800

Please sign in to comment.