--- old/src/java.desktop/share/classes/sun/java2d/marlin/RendererContext.java 2017-08-28 16:48:31.629663159 +0200 +++ new/src/java.desktop/share/classes/sun/java2d/marlin/RendererContext.java 2017-08-28 16:48:31.465663162 +0200 @@ -25,6 +25,7 @@ package sun.java2d.marlin; +import java.awt.Rectangle; import java.awt.geom.Path2D; import java.lang.ref.WeakReference; import java.util.concurrent.atomic.AtomicInteger; @@ -75,6 +76,12 @@ final MarlinCache cache; // flag indicating the shape is stroked (1) or filled (0) int stroking = 0; + // flag indicating to clip the shape + boolean doClip = false; + // flag indicating if the path is closed or not (in advance) to handle properly caps + boolean closedPath = false; + // clip rectangle (ymin, ymax, xmin, xmax): + final float[] clipRect = new float[4]; // Array caches: /* clean int[] cache (zero-filled) = 5 refs */ @@ -116,7 +123,7 @@ nPQPathIterator = new NormalizingPathIterator.NearestPixelQuarter(float6); // MarlinRenderingEngine.TransformingPathConsumer2D - transformerPC2D = new TransformingPathConsumer2D(); + transformerPC2D = new TransformingPathConsumer2D(this); // Renderer: cache = new MarlinCache(this); @@ -138,7 +145,10 @@ } stats.totalOffHeap = 0L; } - stroking = 0; + stroking = 0; + doClip = false; + closedPath = false; + // if context is maked as DIRTY: if (dirty) { // may happen if an exception if thrown in the pipeline processing: