On Sun, 6 Sep 2026 08:32:16 GMT, Laurent Bourgès <[email protected]> wrote:

>> 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...

See 
https://github.com/openjdk/jfx/blob/6670f897b0614dfc6ae9f2b08162a56006870870/modules/javafx.graphics/src/main/java/com/sun/prism/impl/shape/DMarlinRasterizer.java#L92

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1969#discussion_r3943475625

Reply via email to