Thanks!
--
best regards,
Anthony
On 8/28/2014 1:00 PM, Magnus Ihse Bursie wrote:
On 2014-08-27 12:57, Anthony Petrov wrote:
Hi Magnus,
Those look like reasonable suggestions. Could you please file separate
bugs for each of these issues? Also, please note that most of them
belong to 2D, not AWT (e.g. the font-, color-, d3d-, and
opengl-related files) even though they're compiled into the awt native
libraries.
I created JDK-8056209, JDK-8056210, JDK-8056212, JDK-8056213,
JDK-8056214, JDK-8056215, JDK-8056216 and JDK-8056217 for these. After
some consideration, I choose to put them on the infrastructure/build
category, since I believe the build part (changes to the makefiles)
requires most of the work (compared to e.g. removing a file), and that
we are probably more keen on having them solved :), but they need to be
resolved in cooperation with the 2D team.
The issue regarding the medialib directories was already reported in
JDK-8055190.
/Magnus
--
best regards,
Anthony
On 8/25/2014 1:14 PM, Magnus Ihse Bursie wrote:
On 2014-08-20 11:14, Magnus Ihse Bursie wrote:
On 2014-08-18 16:15, Anthony Petrov wrote:
So I'm not sure if the current set of AWT libraries could be
simplified any further.
Hope this helps.
Thank you for the clarification, it was very helpful!
While the set of AWT libraries probably cannot be simplified as you
say, my gut feeling is still that the current layout of files on disk
does not optimally match the actual libraries we build. Armed with the
help of your description, I'll look into them once again and see if I
can make that statement more concrete.
This is my suggestions based on what I found when trying to remove the
last unnecessary entanglement. Note that all paths are relative to the
java.desktop module, and that I have at this stage only looked at
compiled sources (*.c), not header files.
* The following files are in the windows directory tree, but are
explicitly excluded on Windows. Thus they will never be built, and
should be removed instead:
./windows/native/libawt/sun/java2d/d3d/D3DPipeline.cpp
./windows/native/libawt/sun/java2d/d3d/D3DShaderGen.c
./windows/native/libawt/sun/windows/WBufferStrategy.cpp
* The following file is in the share directory tree, but is only used on
Windows. It should be moved to the corresponding windows directory
instead:
./share/native/libawt/sun/java2d/ShaderList.c
* The following directory is in the unix directory tree, but is only
used on Solaris. It should be moved to the corresponding solaris
directory instead:
./unix/native/libawt/sun/java2d/loops
* The directory ./unix/native/common/sun/awt contains five more or less
unrelated .c files. Three of them are only used in libawt_xawt, and
should be moved there:
./unix/native/common/sun/awt/awt_Font.c
./unix/native/common/sun/awt/fontpath.c
./unix/native/common/sun/awt/X11Color.c
Of the remaining two CUPSfuncs.c seems correctly placed, since it is
shared between libawt_xawt and libawt_lwawt. However, I'm wondering
about initIDs.c. It is compiled in libawt as well as libawt_xawt, but
when I checked some random functions, they are exported (via the
mapfile) for libawt only. So I believe it is a mistake to include it in
libawt_xawt, and that it should be moved to the libawt directory. This
will need verification from someone on the AWT team.
* The directory ./unix/native/libjawt is included in libawt_xawt (and in
libjawt, of course). This seems suspicious to me. There is just a single
file with a single function, JAWT_GetAWT(), which is exported in libjawt
(via a mapfile), but not in libawt_xawt. I believe it is a mistake to
include it in libawt_xawt. This will need verification from someone on
the AWT team.
* All of the awt-related directories (libawt_* and common) include an
unnecessary extra layer, the "sun" directory. It is not needed anymore,
and just makes all paths extra long. I suggest that we remove that layer
and move everything up one step.
* The makefiles include too specific directories. Instead of including
e.g. ./*/native/common/sun/java2d/opengl and
./*/native/common/sun/java2d/x11, we should just include
./*/native/common/sun/java2d. This level corresponds to a logical
grouping of the source code, and not the directory structure in that
grouping.
* The file ./windows/native/common/awt_makecube.cpp is a bit strange. It
is not a shared file; instead it's a stand-alone binary with a main()
function. It is not compiled by any makefile targets. If this file is
actually used, I suggest moving it to a better location
(windows/native/launchers?), and starting to compile it with the build.
(Stuff that's not built regularly is doomed to bit rot.) It if is not
used, I suggest we remove it.
* And as I stated before, the medlialib directories are typically not
used by libawt and friends. It is used by libmlib_image and
libmlib_image_v, and should move away from the awt directory.
/Magnus