Page 5 of 5

Re: Why was JPEG encoding/GIF decoding removed?

Posted: Thu Jul 21, 2016 9:21 pm
by slime
Someguynamedpie wrote:given the lack of JIT it'd be preferable to use the Lua C api instead.
Indeed. Some parts of love (for example ImageData methods) use the FFI when JIT compilation is available, and the Lua C API otherwise, partly since the FFI is so slow when it's not JIT-compiled.

Re: Why was JPEG encoding/GIF decoding removed?

Posted: Thu Jul 21, 2016 11:08 pm
by Someguynamedpie
slime wrote:
Someguynamedpie wrote:given the lack of JIT it'd be preferable to use the Lua C api instead.
Indeed. Some parts of love (for example ImageData methods) use the FFI when JIT compilation is available, and the Lua C API otherwise, partly since the FFI is so slow when it's not JIT-compiled.
Interesting; however, out of curiosity, why aren't anonymous FFI types used instead, to avoid namespace collisions? Also, I noticed that the SoundData does the same thing, but have always found it odd you can't bulk upload samples but instead have to loop through all the samples in your sound data, it might be worth allowing buffer uploads using FFI types as a lower level feature (given sample manipulation are already a pretty low level feature as it is) for expediency.