Review request for JDK-8170140: rendering anomaly with MarlinFX renderer
Laurent Bourgès
bourges.laurent at gmail.com
Wed Nov 23 22:16:42 UTC 2016
Jim & Kevin,
Please review the marlin-FX webrev:
http://cr.openjdk.java.net/~lbourges/marlinFX/marlinFX-8170140.0/
JBS: https://bugs.openjdk.java.net/browse/JDK-8170140
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 javafx.graphics
tests (Exception in Application constructor)
PS: This bug may be the cause of RegionBackgroundFillUITest failures:
https://bugs.openjdk.java.net/browse/JDK-8170026
Regards,
Laurent
More information about the openjfx-dev
mailing list