summaryrefslogtreecommitdiffstats
path: root/glutin
diff options
context:
space:
mode:
authorLibravatar Liam Murphy <liampm32@gmail.com>2021-03-21 14:36:06 +1100
committerLibravatar Liam Murphy <liampm32@gmail.com>2021-03-21 14:36:06 +1100
commit1d85b6e887761ae885bec3f0b5405bf902ef8b64 (patch)
tree5a1595e91a8f7f9c3fff91b0a1d5528249abef04 /glutin
parent0333a8daff6db989adc6035a4c09df171a86f6fe (diff)
downloadiced-1d85b6e887761ae885bec3f0b5405bf902ef8b64.tar.gz
iced-1d85b6e887761ae885bec3f0b5405bf902ef8b64.tar.bz2
iced-1d85b6e887761ae885bec3f0b5405bf902ef8b64.zip
feat(web): Support in-memory image data
I had to create two methods which basically do the same thing, `from_memory` and `from_slice`, but `from_memory` takes ownership of the bytes to be compatible with `iced_native`. Also, `Data` is incompatible, because if I stored the bytes in `Data` and created a new object URL every render, it would have caused a memory leak because bumpalo doesn't call destructors and there'd be no way to call URL.revokeObjectUrl on it. It's also more efficient this way.
Diffstat (limited to 'glutin')
0 files changed, 0 insertions, 0 deletions