On Sun, 6 Sep 2026 01:43:58 GMT, John Hendrikx <[email protected]> wrote:
>> modules/javafx.graphics/src/main/java/com/sun/prism/sw/SWDrawingContext.java
>> line 1153:
>>
>>> 1151:
>>> 1152: if (stroke) {
>>> 1153: graphics.draw(strike.getOutline(run,
>>> BaseTransform.getTranslateInstance(runX, runY)));
>>
>> a wide stroke will go outside the min/max dirty bounds used later in L1167,
>> possibly corrupting the pixels.
>
> Although I think I actually fixed the original concern already with a
> previous commit (accounting for the stroke), I've refactored this to be
> simpler now.
>
> I now use the actual rendered pixels (via `SWGraphics`) to determine the
> dirty rect. A deeper investigation turns out that the system basically
> already knows this, and it is more accurate than the estimation code that I
> had before (ie. expand by stroke/miter/etc). It only required relatively
> minor changes, and removes a lot of "guess" code from `SWDrawingContext`.
>
> I've confirmed this also by supporting italic fonts in the font stubs (a
> simple guess there won't take overhang of glyphs into account). The test
> failed before and now passes.
Yes I think marlin renderer determined the appropriate shape's bounds in pixels
and subpixels...
See
https://github.com/openjdk/jfx/blob/6670f897b0614dfc6ae9f2b08162a56006870870/modules/javafx.graphics/src/main/java/com/sun/marlin/Renderer.java#L1426
It is trivial to share the info through jfx api...
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1969#discussion_r3943429280