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
* free the memory.
*/
JNIEXPORT int isNullScalerContext(void *context);
int isNullScalerContext(void *context);
#ifdef __cplusplus
}

View File

@ -82,10 +82,7 @@ typedef struct FontManagerNativeIDs {
glyphImages, glyphListUsePos, glyphListPos, lcdRGBOrder, lcdSubPixPos;
} 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;
JNIEXPORT FontManagerNativeIDs getSunFontIDs(JNIEnv* env);
#ifdef __cplusplus
}

View File

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

View File

@ -139,13 +139,13 @@ SurfaceData_GetOps(JNIEnv *env, jobject sData)
return GetSDOps(env, sData, JNI_TRUE);
}
JNIEXPORT SurfaceDataOps * JNICALL
SurfaceDataOps *
SurfaceData_GetOpsNoSetup(JNIEnv *env, jobject sData)
{
return GetSDOps(env, sData, JNI_FALSE);
}
JNIEXPORT void JNICALL
void
SurfaceData_SetOps(JNIEnv *env, jobject sData, SurfaceDataOps *ops)
{
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
* even if it's set.
*/
JNIEXPORT SurfaceDataOps * JNICALL
SurfaceDataOps *
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
* JNI Critical locks unreleased.
*/
JNIEXPORT void JNICALL
void
SurfaceData_SetOps(JNIEnv *env, jobject sData, SurfaceDataOps *ops);
/*

View File

@ -31,6 +31,9 @@
static int j2dTraceLevel = J2D_TRACE_INVALID;
static FILE *j2dTraceFile = NULL;
static void
J2dTraceInit();
JNIEXPORT void JNICALL
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()
{
char *j2dTraceLevelString = getenv("J2D_TRACE_LEVEL");

View File

@ -52,8 +52,6 @@ extern "C" {
JNIEXPORT void JNICALL
J2dTraceImpl(int level, jboolean cr, const char *string, ...);
JNIEXPORT void JNICALL
J2dTraceInit();
#ifndef DEBUG
#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.
*
* 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);
}
JNIEXPORT jint JNICALL
jint
GrPrim_CompGetXorColor(JNIEnv *env, jobject comp)
{
jobject color;
@ -511,7 +511,7 @@ GrPrim_Sg2dGetLCDTextContrast(JNIEnv *env, jobject sg2d)
/*
* Helper function for CompositeTypes.Xor
*/
JNIEXPORT void JNICALL
static void JNICALL
GrPrim_CompGetXorInfo(JNIEnv *env, CompositeInfo *pCompInfo, jobject comp)
{
pCompInfo->rule = RULE_Xor;
@ -522,7 +522,7 @@ GrPrim_CompGetXorInfo(JNIEnv *env, CompositeInfo *pCompInfo, jobject comp)
/*
* Helper function for CompositeTypes.AnyAlpha
*/
JNIEXPORT void JNICALL
static void JNICALL
GrPrim_CompGetAlphaInfo(JNIEnv *env, CompositeInfo *pCompInfo, jobject comp)
{
pCompInfo->rule =
@ -531,7 +531,7 @@ GrPrim_CompGetAlphaInfo(JNIEnv *env, CompositeInfo *pCompInfo, jobject comp)
(*env)->GetFloatField(env, comp, extraAlphaID);
}
JNIEXPORT void JNICALL
void
Transform_GetInfo(JNIEnv *env, jobject txform, TransformInfo *pTxInfo)
{
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);
}
JNIEXPORT void JNICALL
void
Transform_transform(TransformInfo *pTxInfo, jdouble *pX, jdouble *pY)
{
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.
*
* 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,
NativePrimitive *pPrim,
CompositeInfo *pCompInfo);
extern JNIEXPORT jint JNICALL
extern jint
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
GrPrim_Sg2dGetClip(JNIEnv *env, jobject sg2d,
@ -541,9 +537,9 @@ typedef struct {
jdouble ty;
} TransformInfo;
extern JNIEXPORT void JNICALL
extern void
Transform_GetInfo(JNIEnv *env, jobject txform, TransformInfo *pTxInfo);
extern JNIEXPORT void JNICALL
extern void
Transform_transform(TransformInfo *pTxInfo, jdouble *pX, jdouble *pY);
void GrPrim_RefineBounds(SurfaceDataBounds *bounds, jint transX, jint transY,

View File

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

View File

@ -1230,8 +1230,6 @@ jobject awtJNI_GetColorModel(JNIEnv *env, AwtGraphicsConfigDataPtr aData)
}
#endif /* !HEADLESS */
extern jfieldID colorValueID;
#ifndef HEADLESS
void
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)
{
#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
* JNI Critical locks unreleased.
*/
JNIEXPORT X11SDOps * JNICALL
X11SDOps *
X11SurfaceData_GetOps(JNIEnv *env, jobject sData);

View File

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

View File

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

View File

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

View File

@ -34,10 +34,10 @@ extern "C" {
typedef void (*mlib_start_timer)(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);
JNIEXPORT mlib_start_timer awt_setMlibStartTimer();
JNIEXPORT mlib_stop_timer awt_setMlibStopTimer();
mlib_start_timer awt_setMlibStartTimer();
mlib_stop_timer awt_setMlibStopTimer();
#ifdef __cplusplus
} /* end of extern "C" */