[10] RFR 8188062: Use Marlin renderer in JavaFX BasicStroke

Laurent Bourgès bourges.laurent at gmail.com
Wed Oct 25 21:11:17 UTC 2017


Please review this simple patch that moves the
BasicStroke.createCenteredStrokedShape() implementation into ShapeUtil in
order to use Marlin instead of OpenPisces:

JBS: https://bugs.openjdk.java.net/browse/JDK-8188062
Webrev: http://cr.openjdk.java.net/~lbourges/marlinFX/marlinFX-8188062.0/

Changes:
- BasicStroke: fixed definition of CAP / JOIN constants +
createCenteredStrokedShape() calls ShapeUtil createCenteredStrokedShape()
(delegation)
- ShapeUtil.createCenteredStrokedShape() delegates to (D)MarlinRasterizer
(if enabled) or to OpenPisces (fallback)
- (D)MarlinRasterizer: applied the same approach as in Marlin2D
createStrokedShape() except I adopted the lineWidth trick as in OpenPisces
- (D)MarlinPrismUtils: some refactoring to let the new strokeTo() method
reuse the initPipeline() + simplified Path2D special handling
- (D)RendererContext / (D)TransformingPathConsumer2D: added cached Path2D
instance and Path2DWrapper (like in Marlin2D)


PS: Removing OpenPisces in the future will be easier as remaining
references are in ShapeUtil, OpenPiscesPrismUtils and few sw pipeline
classes. Use the following command to get usages:
find . -name "*.java" -exec grep -H "openpisces" {} \;)

Cheers,
Laurent


More information about the openjfx-dev mailing list