Caciocavallo (was Re: <AWT Dev> Removing all methods that use the AWT peer types in JDK 9)
Roman Kennke
rkennke at redhat.com
Thu Feb 19 17:02:02 UTC 2015
Am Donnerstag, den 19.02.2015 um 16:49 +0000 schrieb Alan Bateman:
> On 19/02/2015 16:30, Roman Kennke wrote:
> > :
> > Hmm. I am not totally familiar, but from what I heard at FOSDEM from
> > Mark Reinhold, it is possible to export certain APIs *only to other
> > known modules*. This is similar in concept to C++ friends, except it
> > happens on a module basis instead of class basis. Which is fine. Could
> > somebody from jigsaw please comment on this, confirm or deny if I'm
> > wrong with my understanding?
> >
> > So suppose we'd have a Cacio module that is part of OpenJDK (doesn't
> > have to be part of any provided profile). Then the desktop module could
> > export the required APIs to Cacio, without exporting it to anyone else.
> > If I understand the modules stuff correctly.
>
> The JSR 376 group is currently discussing the draft requirements
> document, which has an item on this topic called "Qualified Exports":
> http://openjdk.java.net/projects/jigsaw/spec/reqs/01#qualified-exports
>
> You'll see a mention of the same concept in JEP 200 as it is very
> important to our JDK modularization effort.
>
> Do you publish the javadoc for your porting interface anywhere?
No, not yet.
> Does it
> require users of this porting interface to make direct use of sun.* types?
Currently, yes. If necessary, we may add some thin layer around those.
It would be cleaner anyway. The difficulty here is that we also need to
implement native interfaces in Java2D, namely SurfaceData.h.
However, this is not necessarily a showstopper. Currently, all 'users'
of this porting interface are part of Cacio itself, and it's not
expected/intended to change. I.e. what Cacio ultimately provides is a
JAR (and an .so in some cases) which can be plugged into OpenJDK at
runtime to get graphics work on, e.g. DirectFB, SDL, over the web or
even just a BufferedImage.
I guess the question then becomes: is it feasible and something that
anybody wants, to have other (than X11 and DirectX) graphics stacks as
part of OpenJDK (think embedded systems)? If yes, how/where to put them
and how to build them? This seems mostly a matter of implementing the
necessary magic in the build system and getting the module
inter-dependencies right. I would be willing to do that.
If not, do we want at least the porting layer of Cacio in OpenJDK? Then
the question about external code talking to internal interfaces is just
deferred to a lower layer.
Roman
More information about the jigsaw-dev
mailing list