RFR: 8143849: Integrate Marlin renderer per JEP 265

Laurent Bourgès bourges.laurent at gmail.com
Thu Jan 30 21:48:04 UTC 2020


Andrew,

Thank you for pushing the patch.


Le jeu. 30 janv. 2020 à 07:09, Andrew John Hughes <gnu.andrew at redhat.com> a
écrit :

>
>
> On 23/01/2020 22:48, Laurent Bourgès wrote:
> > Please review this first patch to backport the Marlin renderer from jdk9.
> >
> > JBS: https://bugs.openjdk.java.net/browse/JDK-8143849
> > webrev:
> >
> http://cr.openjdk.java.net/~lbourges/marlin8u/marlin-8.01/m01.8143849.patch
> > unshuffled patch:
> > http://cr.openjdk.java.net/~lbourges/marlin8u/marlin-8.01/unshuffled/
> >
> > m01.8143849.patch + merge with marlin changes only from
> m01b.8149896.patch
> > (few lines), the bug 8149896 will not be backported later.
>
> I'd usually be against cherry-pick parts of other changes like this, but
> it seems self-contained enough here and effectively achieves something
> which should have been part of the original patch. I don't think it's
> too big a stumbling block if JDK-8149896 was to be backported, and that
> would likely need to be changed anyway, so as not to remove the actual
> constants from a stable release.
>

Yes it solves easily a conflict with jdk9 changes.


> >
> > Changes:
> > - FloatMath.java: removed powerOfTwoD(int n) as done in
> m01b.8149896.patch
> >
> > - MarlinCache.java & MarlinTileGenerator.java:
> > import jdk.internal.misc.Unsafe; => import sun.misc.Unsafe;
> >
> > - MarlinUtils:
> > import jdk.internal.misc.JavaLangAccess; => import
> sun.misc.JavaLangAccess;
> > import jdk.internal.misc.SharedSecrets; => import sun.misc.SharedSecrets;
> >
> > - OffHeapArray.java:
> > import sun.awt.util.ThreadGroupUtils; => import
> sun.misc.ThreadGroupUtils;
> > import jdk.internal.misc.Unsafe; => import sun.misc.Unsafe;
> >
> > - Renderer.java:
> > import jdk.internal.misc.Unsafe; => import sun.misc.Unsafe;
> >
> > 1 Line change from m01b.8149896.patch:
> > private static final double POWER_2_TO_32 = FloatMath.powerOfTwoD(32); =>
> > private static final double POWER_2_TO_32 = 0x1.0p32;
> >
>
> Package changes make sense and 0x1.0p32 usage is fine as above.
>
> > - RenderingEngine.java:
> > I skipped any change to the RenderingEngine class to not change the
> default
> > renderer in jdk 8u.
> > FYI I moved those changes in the following file, not to be integrated:
> >
> http://cr.openjdk.java.net/~lbourges/marlin8u/marlin-8.01/m01.8143849-RenderingEngine.patch
> >
> > - Add MarlinRenderingEngine in sun.java2d.pipe.RenderingEngine property
> > files
>
> Again, this seems sensible for a stable release. 8u lacks JDK-8038875
> (and rightly so), which removes the service loading from 9+, so the
> property file updates are appropriate and will allow users to flip
> between the two rendering engines, Pisces and Marlin.
>

I kept these changes apart if we want to enable Marlin by default in the
future (after a complete successful integration).


> I've built and pushed the change:
>
> https://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/rev/082118c36ad7
>
> I see you are a committer on 9+, so we should look at resolving that
> inconsistency and getting you made a committer on 8u too.
>

Thanks, that would be simpler and save time to 8u maintainers.

Cheers,
Laurent


> >
> > Best regards,
> > Laurent
> >
>
> [0] https://bugs.openjdk.java.net/browse/JDK-8038875
>
> Thanks,
> --
> Andrew :)
>
> Senior Free Java Software Engineer
> Red Hat, Inc. (http://www.redhat.com)
>
> PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
> Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222
> https://keybase.io/gnu_andrew
>
>


More information about the jdk8u-dev mailing list