Review request for JDK-8170140: rendering anomaly with MarlinFX renderer

Laurent Bourgès bourges.laurent at
Wed Nov 23 22:16:42 UTC 2016

Jim & Kevin,

Please review the marlin-FX webrev:

Ths bug fix seems very simple in MaskMarlinAlphaConsumer:

+        // ensure last block flag = 0 to process final block:+
blkFlags[blkE] = 0;

But it is less easy to explain:
In Renderer, the block flags are set by:
blkFlags[(pix_xmax + 1)  >> _BLK_SIZE_LG] = 1

I recently added +1 that can lead to flag an extra block when pix_xmax is
at a block boundary (32 pixels).

pix_xmax = x1 >> _SUBPIXEL_LG_POSITIONS_X
x1 <= bboxx1 = bbox_spmaxX = pmaxX << SUBPIXEL_LG_POSITIONS_X

So pix_xmax is at most equals to pmaxX = bboxX1 = getOutpixMaxX()

The added line in MaskMarlinAlphaConsumer ensures that the
setAndClearRelativeAlphas() always process the loop that clears and copies
the last block of pixels:
blkFlags[blkE] = 0 is equivalent to blkFlags[(bboxX1 + 1)  >> _BLK_SIZE_LG]
= 0

This is quite difficult to explain but it is now correct.

I added a test in System tests as it was not working in
tests (Exception in Application constructor)

PS: This bug may be the cause of RegionBackgroundFillUITest failures:


More information about the openjfx-dev mailing list