On Sun, 27 Sep 2026 18:47:22 GMT, Christopher Schnick <[email protected]> 
wrote:

> It seems like long ago there were tiny rendering differences encountered 
> between the sw and hardware renderer when rendering rounded edges. Instead of 
> fixing the root cause, a workaround was added to just render the affected 
> edges using a manual sw renderer approach. It seems like everyong forgot, and 
> this workaround is still here. As a result, any region with uniform corner 
> radius 0 < r <= 4 is rendered using a software renderering approach right now.
> 
> Maybe the issue has been fixed somehow, the linked issue is very unspecific. 
> Even if not, and there are differences between the renderers, they don't 
> warrant this performance slowdown. I can't see a difference so far with this 
> workaround disabled.
> 
> You can see this case being logged when being run with 
> `-Djavafx.pulseLogger=true`. According to the counters at the end of a render 
> pass, around 10% of nodes were rendered using this ineffecient approach in 
> our application.
> 
> This case still happens for non-uniform corner radius values, but that is 
> somewhat expected.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

The original rendering differences are still there. It's actually more 
pronounced on Windows than macOS. I've attached a version of the screenshot 
from the original bug report. On Windows the pixel at the center of the circle 
has an RGB value of 75, 73, 180 with the software renderer. With the hardware 
renderer the value is 130, 125, 125. On macOS the difference is smaller (the 
bad pixel is 91, 92, 173). Visually this means the hardware rendering draws the 
corner more squarely and with a notch.

But does it matter? It only makes a visual difference on low-resolution screens 
and what that means today is very different from when the original bug was 
filed. I had to jump through some hoops to get such a small corner on Windows.

<img width="705" height="416" alt="hardware-vs-software" 
src="https://github.com/user-attachments/assets/e24cbcfc-daac-4b38-a06c-21effd5af3e7";
 />

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

PR Comment: https://git.openjdk.org/jfx/pull/2329#issuecomment-5894939165

Reply via email to