On 4/1/14 3:09 AM, Laurent Bourgès wrote:
Phil,
In the following bug, you propose to remove the ServiceLoader in the
RenderingEngine class:
https://bugs.openjdk.java.net/browse/JDK-8038875
For now the jdk has only ductus and pisces engines but I am working on
marlin which is an improved pisces:
https://github.com/bourgesl/marlin-renderer
To use marlin I rely on this service loader... but maybe others too.
To use your own RenderingEngine, you will have to set the system
property -Dsun.java2d.renderer to the marlin implementation class in
addition to adding it a service configuration file, right?
Please keep at least the factory pattern to let users choose which
rendering engine to use at startup.
sun.java2d.pipe.RenderingEngine is not a supported API. With Jigsaw in
JDK 9, the access control rules will be extended to support
encapsulation and you won't be able to access the JDK internal APIs
(which is orthogonal to JDK-8039975.
PS: I still hope merging my changes from marlin into jdk9 pisces in
future to improve both performance & visual quality.
It looks like your ultimate goal is to merge your change to jdk9 and so
that won't become an issue to you.
Mandy