8011992: java/awt/image/mlib/MlibOpsTest.java failed since jdk7u25b05
Reviewed-by: vadim
This commit is contained in:
parent
aad93b5b31
commit
36ef0217a6
@ -1298,6 +1298,29 @@ Java_sun_awt_image_ImagingLib_lookupByteBI(JNIEnv *env, jobject thisLib,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nbands = setImageHints(env, srcImageP, dstImageP, FALSE, TRUE,
|
||||||
|
FALSE, &hint);
|
||||||
|
|
||||||
|
if (nbands < 1 || nbands > srcImageP->cmodel.numComponents) {
|
||||||
|
/* Can't handle any custom images */
|
||||||
|
awt_freeParsedImage(srcImageP, TRUE);
|
||||||
|
awt_freeParsedImage(dstImageP, TRUE);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make sure that color order can be used for
|
||||||
|
* re-ordering of lookup arrays.
|
||||||
|
*/
|
||||||
|
for (i = 0; i < nbands; i++) {
|
||||||
|
int idx = srcImageP->hints.colorOrder[i];
|
||||||
|
|
||||||
|
if (idx < 0 || idx >= nbands) {
|
||||||
|
awt_freeParsedImage(srcImageP, TRUE);
|
||||||
|
awt_freeParsedImage(dstImageP, TRUE);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
lut_nbands = (*env)->GetArrayLength(env, jtableArrays);
|
lut_nbands = (*env)->GetArrayLength(env, jtableArrays);
|
||||||
|
|
||||||
ncomponents = srcImageP->cmodel.isDefaultCompatCM
|
ncomponents = srcImageP->cmodel.isDefaultCompatCM
|
||||||
@ -1308,19 +1331,6 @@ Java_sun_awt_image_ImagingLib_lookupByteBI(JNIEnv *env, jobject thisLib,
|
|||||||
lut_nbands = ncomponents;
|
lut_nbands = ncomponents;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure that color order can be used for
|
|
||||||
* re-ordering of lookup arrays.
|
|
||||||
*/
|
|
||||||
for (i = 0; i < ncomponents; i++) {
|
|
||||||
int idx = srcImageP->hints.colorOrder[i];
|
|
||||||
|
|
||||||
if (idx < 0 || idx >= ncomponents) {
|
|
||||||
awt_freeParsedImage(srcImageP, TRUE);
|
|
||||||
awt_freeParsedImage(dstImageP, TRUE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tbl = NULL;
|
tbl = NULL;
|
||||||
if (SAFE_TO_ALLOC_2(ncomponents, sizeof(unsigned char *))) {
|
if (SAFE_TO_ALLOC_2(ncomponents, sizeof(unsigned char *))) {
|
||||||
tbl = (unsigned char **)
|
tbl = (unsigned char **)
|
||||||
@ -1363,17 +1373,6 @@ Java_sun_awt_image_ImagingLib_lookupByteBI(JNIEnv *env, jobject thisLib,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nbands = setImageHints(env, srcImageP, dstImageP, FALSE, TRUE,
|
|
||||||
FALSE, &hint);
|
|
||||||
if (nbands < 1) {
|
|
||||||
/* Can't handle any custom images */
|
|
||||||
free(tbl);
|
|
||||||
free(jtable);
|
|
||||||
awt_freeParsedImage(srcImageP, TRUE);
|
|
||||||
awt_freeParsedImage(dstImageP, TRUE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Allocate the arrays */
|
/* Allocate the arrays */
|
||||||
if (allocateArray(env, srcImageP, &src, &sdata, TRUE, FALSE, FALSE) < 0) {
|
if (allocateArray(env, srcImageP, &src, &sdata, TRUE, FALSE, FALSE) < 0) {
|
||||||
/* Must be some problem */
|
/* Must be some problem */
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 6556332
|
* @bug 6556332 8011992
|
||||||
* @summary Test verifies that on-demnad loading of medialib library does
|
* @summary Test verifies that on-demnad loading of medialib library does
|
||||||
* not break imageing ops based on this library.
|
* not break imageing ops based on this library.
|
||||||
* @run main MlibOpsTest
|
* @run main MlibOpsTest
|
||||||
|
Loading…
x
Reference in New Issue
Block a user