[OpenJDK Rasterizer] Marlin renderer contribution for review

Laurent Bourgès bourges.laurent at gmail.com
Thu Mar 12 22:19:47 UTC 2015


Dear Andrea, Clemens, Dalibor, Jim & Phil,


As discussed recently, I am glad to contribute the Marlin renderer to the
OpenJDK project as a new standalone Java2D rasterizer.


This work is derived from OpenJDK's pisces rasterizer started since march
2013 (OpenJDK 8) and evolved a lot to become more and more efficient into
my github repository:
https://github.com/bourgesl/marlin-renderer


I am the principal author of the code (OpenJDK's license = GPL2+CP) and got
help from Andréa Aimée.

Andrea Aimé contributed to on some marlin parts (CollinearSimpifier,
optional) and provided the initial MapBench tool, a generic java2d
benchmark based on serialized java2d command batches:
https://github.com/bourgesl/mapbench

This tool helped me a lot to run tons of benchmarks comparing rasterizers
on several GIS Map workloads, but also to test rendering regressions...

Andréa, could you confirm you want to contribute your marlin code to the
the OpenJDK project too and have signed an OCA ?


I made some code cleanup (line length ~ 80) but tried to keep it as close
as the latest and fastest Marlin release 0.5.6 (yesterday) using
sun.misc.Unsafe.


I tested it with a full jdk9 build using the MapBench tool: it is working
well except a bit slower than jdk8 (few percents). Maybe hotspot / JIT
changed a lot !

openjdk version "1.9.0-internal"
OpenJDK Runtime Environment (build
1.9.0-internal-bourgesl_2015_02_24_22_39-b00)
OpenJDK 64-Bit Server VM (build
1.9.0-internal-bourgesl_2015_02_24_22_39-b00, mixed mode)


To use it, just add the following argument:
java -Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine ...


If marlin is working, your should see the following lines in the standard
output:
INFO:
===============================================================================
INFO: Marlin software rasterizer           = ENABLED
INFO: Version                              = [marlin-0.5.6-Unsafe-OpenJDK]
INFO: sun.java2d.renderer                  =
sun.java2d.marlin.MarlinRenderingEngine
INFO: sun.java2d.renderer.useThreadLocal   = true
INFO: sun.java2d.renderer.useRef           = soft
INFO: sun.java2d.renderer.pixelsize        = 2048
INFO: sun.java2d.renderer.subPixel_log2_X  = 3
INFO: sun.java2d.renderer.subPixel_log2_Y  = 3
INFO: sun.java2d.renderer.tileSize_log2    = 5
INFO: sun.java2d.renderer.useFastMath      = true
INFO: sun.java2d.renderer.useSimplifier    = false
INFO: sun.java2d.renderer.doStats          = false
INFO: sun.java2d.renderer.doMonitors       = false
INFO: sun.java2d.renderer.doChecks         = false
INFO: sun.java2d.renderer.useJul           = false
INFO: sun.java2d.renderer.logCreateContext = false
INFO: sun.java2d.renderer.logUnsafeMalloc  = false
INFO:
===============================================================================
INFO: AAShapePipe: overriding JDK implementation: marlin-renderer TILE
patch enabled.

As you can see, Marlin has many tuning parameters but also debugging flags:
see https://github.com/bourgesl/marlin-renderer/wiki/Tuning-options


Here is the initial webrev:
http://cr.openjdk.java.net/~lbourges/marlin/marlin.0/

note: I included the AAShapePipe tile patch but it can be another one.


Thanks for your review & testing this patch,


PS: I plan to publish soon an up-to-date complete benchmark report
comparing ductus, pisces & marlin (JDK8) and also several marlin settings
(ThreadLocal vs ConcurrentLinkedQueue storage, with / without AAShapePipe
tile patch ...)


Laurent

-- 
Laurent Bourgès
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/graphics-rasterizer-dev/attachments/20150312/336de32d/attachment.html>


More information about the graphics-rasterizer-dev mailing list