Marlin renderer patches for jdk8u integration
Laurent Bourgès
bourges.laurent at gmail.com
Fri Nov 22 20:14:57 UTC 2019
Hi David,
I tested on my windows 10 machine but the given MarlinTest looks the same
either with Pisces or with latest Marlin 0.9.4 (github).
I enabled tracing with -Dsun.java2d.trace=log
-Dsun.java2d.renderer.trace=true but it shows no call to the Marlin
renderer, only:
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.232-b09, mixed mode)
sun.java2d.pisces.PiscesRenderingEngine.getMinimumAAPenSize()
D3DFillRect
D3DFillRect
echo "Original"
java -Dsun.java2d.trace=log -Dsun.java2d.renderer.trace=true -cp .
MarlinTest 11
echo "Marlin 0.9.4"
REM -Dsun.java2d.dpiaware=false
java -Dsun.java2d.trace=log -Dsun.java2d.renderer.trace=true
-Xbootclasspath/a:./marlin-0.9.4.2-Unsafe.jar
-Xbootclasspath/p:./:marlin-0.9.4.2-Unsafe-sun-java2d.jar
-Dsun.java2d.renderer=org.marlin.pisces.DMarlinRenderingEngine -cp .
MarlinTest 11
It seems Choice widgets are adjusted to the available window height, so it
fills the space accordingly.
According to me, it is not related to the Marlin renderer by this patch.
PS: If anybody else has another opinion or test case, it would be great.
Regards,
Laurent
Le jeu. 14 nov. 2019 à 13:54, Laurent Bourgès <bourges.laurent at gmail.com> a
écrit :
> Hi David,
>
> Thanks for testing the Marlin renderer patches, it looks quite good.
>
> Sorry for my late response, I expected to test myself on a windows
> machine, but still not.
>
> I wonder why the 1px difference on windows awt widgets has not been yet
> reported.
> Phil or Sergey, are you aware of such issue ? How are awt widgets rendered
> ? How can the java2d renderer interfere in such way ?
> Is it related to fractional scaling factors ?
>
> I will try using awt/2d debug settings to get more details...
>
> Laurent
>
> Le ven. 8 nov. 2019 à 02:32, David Alvarez <alvdavi at amazon.com> a écrit :
>
>> Hi,
>>
>> We’ve run the TCK with Marlin enabled, certification passes. So far so
>> good.
>>
>> Then, in some of our additional testing we noticed small differences in
>> the rendering of some components.
>>
>> The simplest example we’ve been able to find is the java.awt.Choice in
>> Windows 10. When using a JDK with the patches applied, this component
>> will be rendered with one extra height pixel.
>>
>> I've uploaded some images for comparison. Here[1] is how the component
>> is displayed using 8u232, and here[2], how it looks when using a version
>> of 8u232 that contains your patches. The difference is noticeable when
>> we put the components side by side[3], more so if we zoom in[4].
>>
>> This can also cause a one-pixel overlap when these components are
>> rendered on a vertical box layout[5].
>>
>> The behavior persisted even when changing the rendering engine back to
>> Pisces, so it seems it is caused by changes outside Marlin, most likely
>> on AAShapePipeline.
>>
>> The new behavior is consistent with JDK11, but it still worries me a
>> little. Any idea why this is happening? If you want, I can provide you
>> with a sample program and compared images.
>>
>> For reference, I've also updated the code used during the images[6]
>>
>> --
>> David Alvarez
>>
>> [1] http://cr.openjdk.java.net/~alvdavi/emails/marlin/vanilla.png
>> [2] http://cr.openjdk.java.net/~alvdavi/emails/marlin/marlin.png
>> [3] http://cr.openjdk.java.net/~alvdavi/emails/marlin/comparison.png
>> [4] http://cr.openjdk.java.net/~alvdavi/emails/marlin/detail.png
>> [5] http://cr.openjdk.java.net/~alvdavi/emails/marlin/multiple.png
>> [6] http://cr.openjdk.java.net/~alvdavi/emails/marlin/MarlinTest.java
>>
>>
>>
>> On 2019-11-05 02:40, Laurent Bourgès wrote:
>> > Hi Paul
>> >
>> > Le lun. 4 nov. 2019 à 20:30, Hohensee, Paul <hohensee at amazon.com
>> > <mailto:hohensee at amazon.com>> a écrit :
>> >
>> > Also, we (Amazon) would like the Marlin renderer enabled by default,
>> > just as it is for Zulu. It's been well-tested starting in 9, plus I
>> > doubt it'll get much, if any, use in u242 if we e.g. disable it for
>> > u242 and then enable it for u252.
>> >
>> > Please put the patches on cr.openjdk.java.net
>> > <http://cr.openjdk.java.net> so we can go through a normal review
>> > process.
>> >
>> >
>> > I uploaded all patch files (m01 to m21):
>> > http://cr.openjdk.java.net/~lbourges/marlin-jdk8/marlin-jdk8.0/
>> >
>> > Laurent
>>
>>
More information about the jdk8u-dev
mailing list