8014241: Clean up unused JNI fields and methods in imageInitIDs.h
authorserb
Fri, 26 Jun 2015 12:38:39 +0300
changeset 31652 4f5a98844329
parent 31651 a5ef7e08147b
child 31653 d88ff422c7fb
8014241: Clean up unused JNI fields and methods in imageInitIDs.h Reviewed-by: azvegint, prr
jdk/make/mapfiles/libawt/mapfile-vers
jdk/make/mapfiles/libawt/mapfile-vers-linux
jdk/src/java.desktop/share/classes/java/awt/image/ComponentSampleModel.java
jdk/src/java.desktop/share/native/libawt/awt/image/imageInitIDs.c
jdk/src/java.desktop/share/native/libawt/awt/image/imageInitIDs.h
--- a/jdk/make/mapfiles/libawt/mapfile-vers	Thu Jun 25 15:16:55 2015 +0300
+++ b/jdk/make/mapfiles/libawt/mapfile-vers	Fri Jun 26 12:38:39 2015 +0300
@@ -37,7 +37,6 @@
 		Java_sun_awt_image_DataBufferNative_getElem;
 		Java_sun_awt_image_DataBufferNative_setElem;
 		Java_java_awt_image_ColorModel_initIDs;
-		Java_java_awt_image_ComponentSampleModel_initIDs;
 		Java_java_awt_image_IndexColorModel_initIDs;
 		Java_java_awt_image_Kernel_initIDs;
 		Java_java_awt_image_Raster_initIDs;
@@ -89,7 +88,6 @@
 		Java_java_awt_Choice_initIDs;
 		Java_java_awt_Dimension_initIDs;
 		Java_java_awt_event_MouseEvent_initIDs;
-		Java_java_awt_image_DataBufferInt_initIDs;
 		Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
 		Java_java_awt_Rectangle_initIDs;
 		Java_sun_awt_image_BufImgSurfaceData_initIDs;
--- a/jdk/make/mapfiles/libawt/mapfile-vers-linux	Thu Jun 25 15:16:55 2015 +0300
+++ b/jdk/make/mapfiles/libawt/mapfile-vers-linux	Fri Jun 26 12:38:39 2015 +0300
@@ -37,7 +37,6 @@
 		Java_sun_awt_image_DataBufferNative_getElem;
 		Java_sun_awt_image_DataBufferNative_setElem;
 		Java_java_awt_image_ColorModel_initIDs;
-		Java_java_awt_image_ComponentSampleModel_initIDs;
 		Java_java_awt_image_IndexColorModel_initIDs;
 		Java_java_awt_image_Kernel_initIDs;
 		Java_java_awt_image_Raster_initIDs;
@@ -89,7 +88,6 @@
 		Java_java_awt_Choice_initIDs;
 		Java_java_awt_Dimension_initIDs;
 		Java_java_awt_event_MouseEvent_initIDs;
-		Java_java_awt_image_DataBufferInt_initIDs;
 		Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
 		Java_java_awt_Rectangle_initIDs;
 		Java_sun_awt_image_BufImgSurfaceData_getSurfaceData;
--- a/jdk/src/java.desktop/share/classes/java/awt/image/ComponentSampleModel.java	Thu Jun 25 15:16:55 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/ComponentSampleModel.java	Fri Jun 26 12:38:39 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -104,12 +104,6 @@
      */
     protected int pixelStride;
 
-    static private native void initIDs();
-    static {
-        ColorModel.loadLibraries();
-        initIDs();
-    }
-
     /**
      * Constructs a ComponentSampleModel with the specified parameters.
      * The number of bands will be given by the length of the bandOffsets array.
--- a/jdk/src/java.desktop/share/native/libawt/awt/image/imageInitIDs.c	Thu Jun 25 15:16:55 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libawt/awt/image/imageInitIDs.c	Fri Jun 26 12:38:39 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -45,8 +45,6 @@
     CHECK_NULL(g_RasterWidthID    = (*env)->GetFieldID(env, cls, "width", "I"));
     CHECK_NULL(g_RasterHeightID   = (*env)->GetFieldID(env, cls, "height", "I"));
     CHECK_NULL(g_RasterNumBandsID = (*env)->GetFieldID(env, cls, "numBands", "I"));
-    CHECK_NULL(g_RasterGetDataMID = (*env)->GetMethodID(env, cls, "getDataElements",
-                                        "(IIIILjava/lang/Object;)Ljava/lang/Object;"));
     CHECK_NULL(g_RasterMinXID  = (*env)->GetFieldID(env, cls, "minX", "I"));
     CHECK_NULL(g_RasterMinYID  = (*env)->GetFieldID(env, cls, "minY", "I"));
     CHECK_NULL(g_RasterBaseOriginXID  = (*env)->GetFieldID(env, cls,
@@ -67,7 +65,6 @@
     CHECK_NULL(g_BCRdataID = (*env)->GetFieldID(env, cls, "data", "[B"));
     CHECK_NULL(g_BCRscanstrID = (*env)->GetFieldID(env, cls, "scanlineStride", "I"));
     CHECK_NULL(g_BCRpixstrID = (*env)->GetFieldID(env, cls, "pixelStride", "I"));
-    CHECK_NULL(g_BCRbandoffsID = (*env)->GetFieldID(env, cls, "bandOffset", "I"));
     CHECK_NULL(g_BCRdataOffsetsID = (*env)->GetFieldID(env, cls, "dataOffsets", "[I"));
     CHECK_NULL(g_BCRtypeID = (*env)->GetFieldID(env, cls, "type", "I"));
 }
@@ -86,7 +83,6 @@
     CHECK_NULL(g_SCRdataID = (*env)->GetFieldID(env, cls, "data", "[S"));
     CHECK_NULL(g_SCRscanstrID = (*env)->GetFieldID(env, cls, "scanlineStride", "I"));
     CHECK_NULL(g_SCRpixstrID = (*env)->GetFieldID(env, cls, "pixelStride", "I"));
-    CHECK_NULL(g_SCRbandoffsID = (*env)->GetFieldID(env, cls, "bandOffset", "I"));
     CHECK_NULL(g_SCRdataOffsetsID = (*env)->GetFieldID(env, cls, "dataOffsets", "[I"));
     CHECK_NULL(g_SCRtypeID = (*env)->GetFieldID(env, cls, "type", "I"));
 }
@@ -96,9 +92,6 @@
     CHECK_NULL(g_ICRscanstrID = (*env)->GetFieldID(env, cls, "scanlineStride", "I"));
     CHECK_NULL(g_ICRpixstrID = (*env)->GetFieldID(env, cls, "pixelStride", "I"));
     CHECK_NULL(g_ICRdataOffsetsID = (*env)->GetFieldID(env, cls, "dataOffsets", "[I"));
-    CHECK_NULL(g_ICRbandoffsID = (*env)->GetFieldID(env, cls, "bandOffset", "I"));
-    CHECK_NULL(g_ICRputDataMID  = (*env)->GetMethodID(env, cls, "setDataElements",
-                                     "(IIIILjava/lang/Object;)V"));
     CHECK_NULL(g_ICRtypeID = (*env)->GetFieldID(env, cls, "type", "I"));
 }
 
@@ -121,8 +114,6 @@
     CHECK_NULL(g_CMisAlphaPreID = (*env)->GetFieldID(env, cls, "isAlphaPremultiplied",
                                           "Z"));
     CHECK_NULL(g_CMtransparencyID = (*env)->GetFieldID(env, cls, "transparency", "I"));
-    CHECK_NULL(g_CMgetRGBMID      = (*env)->GetMethodID(env, cls, "getRGB",
-                                             "(Ljava/lang/Object;)I"));
     CHECK_NULL(g_CMcsTypeID       = (*env)->GetFieldID(env, cls, "colorSpaceType", "I"));
     CHECK_NULL(g_CMis_sRGBID      = (*env)->GetFieldID(env, cls, "is_sRGB", "Z"));
     CHECK_NULL(g_CMgetRGBdefaultMID   = (*env)->GetStaticMethodID(env, cls,
@@ -148,20 +139,8 @@
 }
 
 JNIEXPORT void JNICALL
-Java_java_awt_image_ComponentSampleModel_initIDs(JNIEnv *env, jclass cls) {
-    CHECK_NULL(g_CSMPixStrideID = (*env)->GetFieldID(env, cls, "pixelStride", "I"));
-    CHECK_NULL(g_CSMScanStrideID = (*env)->GetFieldID(env, cls, "scanlineStride", "I"));
-    CHECK_NULL(g_CSMBandOffsetsID = (*env)->GetFieldID(env, cls, "bandOffsets", "[I"));
-}
-
-JNIEXPORT void JNICALL
 Java_java_awt_image_Kernel_initIDs(JNIEnv *env, jclass cls) {
     CHECK_NULL(g_KernelWidthID   = (*env)->GetFieldID(env, cls, "width", "I"));
     CHECK_NULL(g_KernelHeightID  = (*env)->GetFieldID(env, cls, "height", "I"));
     CHECK_NULL(g_KernelDataID    = (*env)->GetFieldID(env, cls, "data", "[F"));
 }
-
-JNIEXPORT void JNICALL
-Java_java_awt_image_DataBufferInt_initIDs(JNIEnv *env, jclass cls) {
-    CHECK_NULL(g_DataBufferIntPdataID = (*env)->GetFieldID(env, cls, "pData", "J"));
-}
--- a/jdk/src/java.desktop/share/native/libawt/awt/image/imageInitIDs.h	Thu Jun 25 15:16:55 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libawt/awt/image/imageInitIDs.h	Fri Jun 26 12:38:39 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -42,7 +42,6 @@
 /* Raster ids */
 IMGEXTERN jfieldID g_RasterWidthID;
 IMGEXTERN jfieldID g_RasterHeightID;
-IMGEXTERN jfieldID g_RasterNumBandsID;
 IMGEXTERN jfieldID g_RasterBaseRasterID;
 IMGEXTERN jfieldID g_RasterMinXID;
 IMGEXTERN jfieldID g_RasterMinYID;
@@ -52,12 +51,10 @@
 IMGEXTERN jfieldID g_RasterDataBufferID;
 IMGEXTERN jfieldID g_RasterNumDataElementsID;
 IMGEXTERN jfieldID g_RasterNumBandsID;
-IMGEXTERN jmethodID g_RasterGetDataMID;
 
 IMGEXTERN jfieldID g_BCRdataID;
 IMGEXTERN jfieldID g_BCRscanstrID;
 IMGEXTERN jfieldID g_BCRpixstrID;
-IMGEXTERN jfieldID g_BCRbandoffsID;
 IMGEXTERN jfieldID g_BCRdataOffsetsID;
 IMGEXTERN jfieldID g_BCRtypeID;
 IMGEXTERN jfieldID g_BPRdataID;
@@ -68,16 +65,13 @@
 IMGEXTERN jfieldID g_SCRdataID;
 IMGEXTERN jfieldID g_SCRscanstrID;
 IMGEXTERN jfieldID g_SCRpixstrID;
-IMGEXTERN jfieldID g_SCRbandoffsID;
 IMGEXTERN jfieldID g_SCRdataOffsetsID;
 IMGEXTERN jfieldID g_SCRtypeID;
 IMGEXTERN jfieldID g_ICRdataID;
 IMGEXTERN jfieldID g_ICRscanstrID;
 IMGEXTERN jfieldID g_ICRpixstrID;
-IMGEXTERN jfieldID g_ICRbandoffsID;
 IMGEXTERN jfieldID g_ICRdataOffsetsID;
 IMGEXTERN jfieldID g_ICRtypeID;
-IMGEXTERN jmethodID g_ICRputDataMID;
 
 /* Color Model ids */
 IMGEXTERN jfieldID g_CMpDataID;
@@ -87,7 +81,6 @@
 IMGEXTERN jfieldID g_CMsuppAlphaID;
 IMGEXTERN jfieldID g_CMisAlphaPreID;
 IMGEXTERN jfieldID g_CMtransparencyID;
-IMGEXTERN jmethodID g_CMgetRGBMID;
 IMGEXTERN jfieldID g_CMcsTypeID;
 IMGEXTERN jfieldID g_CMis_sRGBID;
 IMGEXTERN jmethodID g_CMgetRGBdefaultMID;
@@ -108,19 +101,9 @@
 IMGEXTERN jfieldID g_SPPSMnBitsID;
 IMGEXTERN jfieldID g_SPPSMmaxBitID;
 
-/* Component Sample Model ids */
-IMGEXTERN jfieldID g_CSMPixStrideID;
-IMGEXTERN jfieldID g_CSMScanStrideID;
-IMGEXTERN jfieldID g_CSMBandOffsetsID;
-
 /* Kernel ids */
 IMGEXTERN jfieldID g_KernelWidthID;
 IMGEXTERN jfieldID g_KernelHeightID;
-IMGEXTERN jfieldID g_KernelXOriginID;
-IMGEXTERN jfieldID g_KernelYOriginD;
 IMGEXTERN jfieldID g_KernelDataID;
 
-/* DataBufferInt ids */
-IMGEXTERN jfieldID g_DataBufferIntPdataID;
-
 #endif /* IMAGEINITIDS_H */