On Wed, 11 Oct 2023 17:48:28 GMT, Daniel Jeliński <[email protected]> wrote:
>> src/java.desktop/share/native/libawt/java2d/SurfaceData.h line 557:
>>
>>> 555: */
>>> 556: SurfaceDataOps *
>>> 557: SurfaceData_GetOpsNoSetup(JNIEnv *env, jobject sData);
>>
>> ~~It seems to me none of the functions in `SurfaceData.h` should be
>> exported. They all end up in `awt.dll` / `libawt.so`. I can't see any of
>> these functions are accessed from other DLLs.~~
>>
>> ~~Would you like to create a separate task for removing exports from
>> `SurfaceData` functions?~~
>>
>> Some are used from `fontmanager.dll`. But not as many as we export.
>>
>> Potentially all symbols exported from `awt.dll` except from `Java*` can be
>> hidden…
>> I found that `Disposer_AddRecord` and `J2dTraceImpl` are used from
>> `lcms.dll`.
>
> Keep in mind that on Linux libawt is split into libawt, libawt_headless and
> libawt_xawt, and the export/import dependencies are different.
I totally understand this. However, Windows specific symbols:
9 8 000380A0 GDIWinSD_InitDC
10 9 000385F0 GDIWindowSurfaceData_GetComp
11 A 000386C0 GDIWindowSurfaceData_GetOps
12 B 000386D0 GDIWindowSurfaceData_GetOpsNoSetup
13 C 000386E0 GDIWindowSurfaceData_GetWindow
and others are still exported from `awt.dll`, I believe these can be made
private.
Yet I agree we need to be careful not to hide something that's used from other
libraries.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13261#discussion_r1356588203