8305321: Remove unused exports in java.desktop

Reviewed-by: aivanov, prr
This commit is contained in:
Daniel Jeliński 2023-10-26 06:13:02 +00:00
parent 811b436e5d
commit 723db2dc86
17 changed files with 34 additions and 52 deletions

View File

@ -103,7 +103,7 @@ typedef struct GlyphInfo {
* FileFontStrike logic - presence of context is used as marker to * FileFontStrike logic - presence of context is used as marker to
* free the memory. * free the memory.
*/ */
JNIEXPORT int isNullScalerContext(void *context); int isNullScalerContext(void *context);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -82,10 +82,7 @@ typedef struct FontManagerNativeIDs {
glyphImages, glyphListUsePos, glyphListPos, lcdRGBOrder, lcdSubPixPos; glyphImages, glyphListUsePos, glyphListPos, lcdRGBOrder, lcdSubPixPos;
} FontManagerNativeIDs; } FontManagerNativeIDs;
/* Note: we share variable in the context of fontmanager lib
but we need access method to use it from separate rasterizer lib */
extern FontManagerNativeIDs sunFontIDs; extern FontManagerNativeIDs sunFontIDs;
JNIEXPORT FontManagerNativeIDs getSunFontIDs(JNIEnv* env);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -74,7 +74,6 @@ IMGEXTERN jfieldID g_ICRdataOffsetsID;
IMGEXTERN jfieldID g_ICRtypeID; IMGEXTERN jfieldID g_ICRtypeID;
/* Color Model ids */ /* Color Model ids */
JNIEXPORT
IMGEXTERN jfieldID g_CMnBitsID; IMGEXTERN jfieldID g_CMnBitsID;
IMGEXTERN jfieldID g_CMcspaceID; IMGEXTERN jfieldID g_CMcspaceID;
IMGEXTERN jfieldID g_CMnumComponentsID; IMGEXTERN jfieldID g_CMnumComponentsID;

View File

@ -139,13 +139,13 @@ SurfaceData_GetOps(JNIEnv *env, jobject sData)
return GetSDOps(env, sData, JNI_TRUE); return GetSDOps(env, sData, JNI_TRUE);
} }
JNIEXPORT SurfaceDataOps * JNICALL SurfaceDataOps *
SurfaceData_GetOpsNoSetup(JNIEnv *env, jobject sData) SurfaceData_GetOpsNoSetup(JNIEnv *env, jobject sData)
{ {
return GetSDOps(env, sData, JNI_FALSE); return GetSDOps(env, sData, JNI_FALSE);
} }
JNIEXPORT void JNICALL void
SurfaceData_SetOps(JNIEnv *env, jobject sData, SurfaceDataOps *ops) SurfaceData_SetOps(JNIEnv *env, jobject sData, SurfaceDataOps *ops)
{ {
if (JNU_GetLongFieldAsPtr(env, sData, pDataID) == NULL) { if (JNU_GetLongFieldAsPtr(env, sData, pDataID) == NULL) {

View File

@ -553,7 +553,7 @@ SurfaceData_GetOps(JNIEnv *env, jobject sData);
* Does the same as the above, but doesn't call Setup function * Does the same as the above, but doesn't call Setup function
* even if it's set. * even if it's set.
*/ */
JNIEXPORT SurfaceDataOps * JNICALL SurfaceDataOps *
SurfaceData_GetOpsNoSetup(JNIEnv *env, jobject sData); SurfaceData_GetOpsNoSetup(JNIEnv *env, jobject sData);
/* /*
@ -569,7 +569,7 @@ SurfaceData_GetOpsNoSetup(JNIEnv *env, jobject sData);
* is called since this function will not leave any outstanding * is called since this function will not leave any outstanding
* JNI Critical locks unreleased. * JNI Critical locks unreleased.
*/ */
JNIEXPORT void JNICALL void
SurfaceData_SetOps(JNIEnv *env, jobject sData, SurfaceDataOps *ops); SurfaceData_SetOps(JNIEnv *env, jobject sData, SurfaceDataOps *ops);
/* /*

View File

@ -31,6 +31,9 @@
static int j2dTraceLevel = J2D_TRACE_INVALID; static int j2dTraceLevel = J2D_TRACE_INVALID;
static FILE *j2dTraceFile = NULL; static FILE *j2dTraceFile = NULL;
static void
J2dTraceInit();
JNIEXPORT void JNICALL JNIEXPORT void JNICALL
J2dTraceImpl(int level, jboolean cr, const char *string, ...) J2dTraceImpl(int level, jboolean cr, const char *string, ...)
{ {
@ -72,7 +75,7 @@ J2dTraceImpl(int level, jboolean cr, const char *string, ...)
} }
} }
JNIEXPORT void JNICALL static void
J2dTraceInit() J2dTraceInit()
{ {
char *j2dTraceLevelString = getenv("J2D_TRACE_LEVEL"); char *j2dTraceLevelString = getenv("J2D_TRACE_LEVEL");

View File

@ -52,8 +52,6 @@ extern "C" {
JNIEXPORT void JNICALL JNIEXPORT void JNICALL
J2dTraceImpl(int level, jboolean cr, const char *string, ...); J2dTraceImpl(int level, jboolean cr, const char *string, ...);
JNIEXPORT void JNICALL
J2dTraceInit();
#ifndef DEBUG #ifndef DEBUG
#define J2dTrace(level, string) #define J2dTrace(level, string)

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -470,7 +470,7 @@ GrPrim_Sg2dGetCompInfo(JNIEnv *env, jobject sg2d,
(*env)->DeleteLocalRef(env, comp); (*env)->DeleteLocalRef(env, comp);
} }
JNIEXPORT jint JNICALL jint
GrPrim_CompGetXorColor(JNIEnv *env, jobject comp) GrPrim_CompGetXorColor(JNIEnv *env, jobject comp)
{ {
jobject color; jobject color;
@ -511,7 +511,7 @@ GrPrim_Sg2dGetLCDTextContrast(JNIEnv *env, jobject sg2d)
/* /*
* Helper function for CompositeTypes.Xor * Helper function for CompositeTypes.Xor
*/ */
JNIEXPORT void JNICALL static void JNICALL
GrPrim_CompGetXorInfo(JNIEnv *env, CompositeInfo *pCompInfo, jobject comp) GrPrim_CompGetXorInfo(JNIEnv *env, CompositeInfo *pCompInfo, jobject comp)
{ {
pCompInfo->rule = RULE_Xor; pCompInfo->rule = RULE_Xor;
@ -522,7 +522,7 @@ GrPrim_CompGetXorInfo(JNIEnv *env, CompositeInfo *pCompInfo, jobject comp)
/* /*
* Helper function for CompositeTypes.AnyAlpha * Helper function for CompositeTypes.AnyAlpha
*/ */
JNIEXPORT void JNICALL static void JNICALL
GrPrim_CompGetAlphaInfo(JNIEnv *env, CompositeInfo *pCompInfo, jobject comp) GrPrim_CompGetAlphaInfo(JNIEnv *env, CompositeInfo *pCompInfo, jobject comp)
{ {
pCompInfo->rule = pCompInfo->rule =
@ -531,7 +531,7 @@ GrPrim_CompGetAlphaInfo(JNIEnv *env, CompositeInfo *pCompInfo, jobject comp)
(*env)->GetFloatField(env, comp, extraAlphaID); (*env)->GetFloatField(env, comp, extraAlphaID);
} }
JNIEXPORT void JNICALL void
Transform_GetInfo(JNIEnv *env, jobject txform, TransformInfo *pTxInfo) Transform_GetInfo(JNIEnv *env, jobject txform, TransformInfo *pTxInfo)
{ {
pTxInfo->dxdx = (*env)->GetDoubleField(env, txform, m00ID); pTxInfo->dxdx = (*env)->GetDoubleField(env, txform, m00ID);
@ -542,7 +542,7 @@ Transform_GetInfo(JNIEnv *env, jobject txform, TransformInfo *pTxInfo)
pTxInfo->ty = (*env)->GetDoubleField(env, txform, m12ID); pTxInfo->ty = (*env)->GetDoubleField(env, txform, m12ID);
} }
JNIEXPORT void JNICALL void
Transform_transform(TransformInfo *pTxInfo, jdouble *pX, jdouble *pY) Transform_transform(TransformInfo *pTxInfo, jdouble *pX, jdouble *pY)
{ {
jdouble x = *pX; jdouble x = *pX;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -510,12 +510,8 @@ extern JNIEXPORT void JNICALL
GrPrim_Sg2dGetCompInfo(JNIEnv *env, jobject sg2d, GrPrim_Sg2dGetCompInfo(JNIEnv *env, jobject sg2d,
NativePrimitive *pPrim, NativePrimitive *pPrim,
CompositeInfo *pCompInfo); CompositeInfo *pCompInfo);
extern JNIEXPORT jint JNICALL extern jint
GrPrim_CompGetXorColor(JNIEnv *env, jobject comp); GrPrim_CompGetXorColor(JNIEnv *env, jobject comp);
extern JNIEXPORT void JNICALL
GrPrim_CompGetXorInfo(JNIEnv *env, CompositeInfo *pCompInfo, jobject comp);
extern JNIEXPORT void JNICALL
GrPrim_CompGetAlphaInfo(JNIEnv *env, CompositeInfo *pCompInfo, jobject comp);
extern JNIEXPORT void JNICALL extern JNIEXPORT void JNICALL
GrPrim_Sg2dGetClip(JNIEnv *env, jobject sg2d, GrPrim_Sg2dGetClip(JNIEnv *env, jobject sg2d,
@ -541,9 +537,9 @@ typedef struct {
jdouble ty; jdouble ty;
} TransformInfo; } TransformInfo;
extern JNIEXPORT void JNICALL extern void
Transform_GetInfo(JNIEnv *env, jobject txform, TransformInfo *pTxInfo); Transform_GetInfo(JNIEnv *env, jobject txform, TransformInfo *pTxInfo);
extern JNIEXPORT void JNICALL extern void
Transform_transform(TransformInfo *pTxInfo, jdouble *pX, jdouble *pY); Transform_transform(TransformInfo *pTxInfo, jdouble *pX, jdouble *pY);
void GrPrim_RefineBounds(SurfaceDataBounds *bounds, jint transX, jint transY, void GrPrim_RefineBounds(SurfaceDataBounds *bounds, jint transX, jint transY,

View File

@ -201,12 +201,6 @@ Java_sun_font_SunFontManager_initIDs
initFontIDs(env); initFontIDs(env);
} }
JNIEXPORT FontManagerNativeIDs getSunFontIDs(JNIEnv *env) {
initFontIDs(env);
return sunFontIDs;
}
/* /*
* Class: sun_font_StrikeCache * Class: sun_font_StrikeCache
* Method: freeIntPointer * Method: freeIntPointer

View File

@ -1230,8 +1230,6 @@ jobject awtJNI_GetColorModel(JNIEnv *env, AwtGraphicsConfigDataPtr aData)
} }
#endif /* !HEADLESS */ #endif /* !HEADLESS */
extern jfieldID colorValueID;
#ifndef HEADLESS #ifndef HEADLESS
void void
awt_allocate_systemrgbcolors (jint *rgbColors, int num_colors, awt_allocate_systemrgbcolors (jint *rgbColors, int num_colors,

View File

@ -291,7 +291,7 @@ Java_sun_java2d_x11_XSurfaceData_flushNativeSurface(JNIEnv *env, jobject xsd)
} }
JNIEXPORT X11SDOps * JNICALL X11SDOps *
X11SurfaceData_GetOps(JNIEnv *env, jobject sData) X11SurfaceData_GetOps(JNIEnv *env, jobject sData)
{ {
#ifdef HEADLESS #ifdef HEADLESS

View File

@ -163,5 +163,5 @@ jboolean XShared_initSurface(JNIEnv *env, X11SDOps *xsdo, jint depth, jint width
* is called since this function will not leave any outstanding * is called since this function will not leave any outstanding
* JNI Critical locks unreleased. * JNI Critical locks unreleased.
*/ */
JNIEXPORT X11SDOps * JNICALL X11SDOps *
X11SurfaceData_GetOps(JNIEnv *env, jobject sData); X11SurfaceData_GetOps(JNIEnv *env, jobject sData);

View File

@ -40,13 +40,10 @@
* which are used in the win32 awt. * which are used in the win32 awt.
*/ */
JNIEXPORT jfieldID colorValueID;
JNIEXPORT void JNICALL JNIEXPORT void JNICALL
Java_java_awt_Color_initIDs Java_java_awt_Color_initIDs
(JNIEnv *env, jclass clazz) (JNIEnv *env, jclass clazz)
{ {
colorValueID = (*env)->GetFieldID(env, clazz, "value", "I");
} }
JNIEXPORT void JNICALL JNIEXPORT void JNICALL

View File

@ -471,7 +471,7 @@ Java_sun_java2d_windows_GDIWindowSurfaceData_initOps(JNIEnv *env, jobject wsd,
wsdo->bmCopyToScreen = FALSE; wsdo->bmCopyToScreen = FALSE;
} }
JNIEXPORT GDIWinSDOps * JNICALL GDIWinSDOps *
GDIWindowSurfaceData_GetOps(JNIEnv *env, jobject sData) GDIWindowSurfaceData_GetOps(JNIEnv *env, jobject sData)
{ {
SurfaceDataOps *ops = SurfaceData_GetOps(env, sData); SurfaceDataOps *ops = SurfaceData_GetOps(env, sData);
@ -484,7 +484,7 @@ GDIWindowSurfaceData_GetOps(JNIEnv *env, jobject sData)
return (GDIWinSDOps *) ops; return (GDIWinSDOps *) ops;
} }
JNIEXPORT GDIWinSDOps * JNICALL GDIWinSDOps *
GDIWindowSurfaceData_GetOpsNoSetup(JNIEnv *env, jobject sData) GDIWindowSurfaceData_GetOpsNoSetup(JNIEnv *env, jobject sData)
{ {
// use the 'no setup' version of GetOps // use the 'no setup' version of GetOps
@ -492,7 +492,7 @@ GDIWindowSurfaceData_GetOpsNoSetup(JNIEnv *env, jobject sData)
return (GDIWinSDOps *) ops; return (GDIWinSDOps *) ops;
} }
JNIEXPORT AwtComponent * JNICALL AwtComponent *
GDIWindowSurfaceData_GetComp(JNIEnv *env, GDIWinSDOps *wsdo) GDIWindowSurfaceData_GetComp(JNIEnv *env, GDIWinSDOps *wsdo)
{ {
PDATA pData = NULL; PDATA pData = NULL;
@ -524,7 +524,7 @@ GDIWindowSurfaceData_GetComp(JNIEnv *env, GDIWinSDOps *wsdo)
return static_cast<AwtComponent*>(pData); return static_cast<AwtComponent*>(pData);
} }
JNIEXPORT HWND JNICALL HWND
GDIWindowSurfaceData_GetWindow(JNIEnv *env, GDIWinSDOps *wsdo) GDIWindowSurfaceData_GetWindow(JNIEnv *env, GDIWinSDOps *wsdo)
{ {
HWND window = wsdo->window; HWND window = wsdo->window;
@ -1019,7 +1019,7 @@ static HDC GDIWinSD_GetDC(JNIEnv *env, GDIWinSDOps *wsdo,
return env->ExceptionCheck() ? (HDC)NULL : info->hDC; return env->ExceptionCheck() ? (HDC)NULL : info->hDC;
} }
JNIEXPORT void JNICALL void
GDIWinSD_InitDC(JNIEnv *env, GDIWinSDOps *wsdo, ThreadGraphicsInfo *info, GDIWinSD_InitDC(JNIEnv *env, GDIWinSDOps *wsdo, ThreadGraphicsInfo *info,
jint type, jint *patrop, jint type, jint *patrop,
jobject clip, jobject comp, jint color) jobject clip, jobject comp, jint color)

View File

@ -236,21 +236,21 @@ typedef struct {
* is called since this function will not leave any outstanding * is called since this function will not leave any outstanding
* JNI Critical locks unreleased. * JNI Critical locks unreleased.
*/ */
JNIEXPORT GDIWinSDOps * JNICALL GDIWinSDOps *
GDIWindowSurfaceData_GetOps(JNIEnv *env, jobject sData); GDIWindowSurfaceData_GetOps(JNIEnv *env, jobject sData);
JNIEXPORT GDIWinSDOps * JNICALL GDIWinSDOps *
GDIWindowSurfaceData_GetOpsNoSetup(JNIEnv *env, jobject sData); GDIWindowSurfaceData_GetOpsNoSetup(JNIEnv *env, jobject sData);
JNIEXPORT HWND JNICALL HWND
GDIWindowSurfaceData_GetWindow(JNIEnv *env, GDIWinSDOps *wsdo); GDIWindowSurfaceData_GetWindow(JNIEnv *env, GDIWinSDOps *wsdo);
JNIEXPORT void JNICALL void
GDIWinSD_InitDC(JNIEnv *env, GDIWinSDOps *wsdo, ThreadGraphicsInfo *info, GDIWinSD_InitDC(JNIEnv *env, GDIWinSDOps *wsdo, ThreadGraphicsInfo *info,
jint type, jint *patrop, jint type, jint *patrop,
jobject clip, jobject comp, jint color); jobject clip, jobject comp, jint color);
JNIEXPORT AwtComponent * JNICALL AwtComponent *
GDIWindowSurfaceData_GetComp(JNIEnv *env, GDIWinSDOps *wsdo); GDIWindowSurfaceData_GetComp(JNIEnv *env, GDIWinSDOps *wsdo);
} /* extern "C" */ } /* extern "C" */

View File

@ -34,10 +34,10 @@ extern "C" {
typedef void (*mlib_start_timer)(int); typedef void (*mlib_start_timer)(int);
typedef void (*mlib_stop_timer)(int, int); typedef void (*mlib_stop_timer)(int, int);
JNIEXPORT mlib_status awt_getImagingLib(JNIEnv *env, mlibFnS_t *sMlibFns, mlib_status awt_getImagingLib(JNIEnv *env, mlibFnS_t *sMlibFns,
mlibSysFnS_t *sMlibSysFns); mlibSysFnS_t *sMlibSysFns);
JNIEXPORT mlib_start_timer awt_setMlibStartTimer(); mlib_start_timer awt_setMlibStartTimer();
JNIEXPORT mlib_stop_timer awt_setMlibStopTimer(); mlib_stop_timer awt_setMlibStopTimer();
#ifdef __cplusplus #ifdef __cplusplus
} /* end of extern "C" */ } /* end of extern "C" */