[OpenJDK 2D-Dev] Custom rendering engines in jk9
philip.race at oracle.com
Tue Apr 1 21:45:38 UTC 2014
Yes, we'll keep the system property (at least for JDK 9) that should support
Class.forName usage. In the JDK I expect well just look for ductus by name
then "pisces", all hard-coded, but the system property would be an
Its just using the ServiceLoader to then locate the class that is causing
extra work for jigsaw so we are removing it since its not a supported API.
So you may need to make a small change but perhaps even nothing ...
On 4/1/2014 2:14 PM, Mandy Chung wrote:
> On 4/1/14 3:09 AM, Laurent Bourgès wrote:
>> In the following bug, you propose to remove the ServiceLoader in the
>> RenderingEngine class:
>> For now the jdk has only ductus and pisces engines but I am working
>> on marlin which is an improved pisces:
>> 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.
More information about the 2d-dev