blend2d icon indicating copy to clipboard operation
blend2d copied to clipboard

Gradient and pattern fills do not work when BLEND2D_NO_JIT is enabled

Open electroduck opened this issue 4 years ago • 1 comments

Please let me know if this issue has already been reported, it seems pretty serious so I'm surprised that I haven't seen anything about it.

Expected behavior: Enabling BLEND2D_NO_JIT at build time will result in all fills being performed normally, but at a lower speed.

expected

Actual behavior: If BLEND2D_NO_JIT is enabled at build time, attempting to perform gradient or pattern fills will instead result in solid fills of apparently random colors. In this example, the panel that is supposed to be filled with a stretched rubber duck (a pattern fill) is instead filled with red color, while the button that is supposed to be filled with a linear gradient is instead filled with blue color.

actual

How to test: When configuring Blend2D, add -DBLEND2D_NO_JIT=1 to the CMake command line. Then, compile and run any program that performs gradient or pattern fills. Observe the results of the fills.

I have found that this problem occurs on 32-bit Windows, 64-bit Windows, and WebAssembly. I do not know if it occurs on other platforms, but my guess is that it not OS-related. It makes Blend2D not an option in any situation where ASMJIT does not work, i.e. any architecture other than 32-bit or 64-bit x86.

electroduck avatar Mar 24 '21 20:03 electroduck

This feature is experimental and not fully finished.

It was added to test Blend2D on ARM. However, not all composition modes and fetchers are implemented without JIT.

kobalicek avatar Mar 24 '21 23:03 kobalicek

This is something that should work on the current master, can you verify?

kobalicek avatar Jun 16 '23 09:06 kobalicek

Closing the issue as gradients are now provided even without JIT.

kobalicek avatar Aug 08 '23 14:08 kobalicek