Open darksworm opened 4 years ago
somehow caching the images in pixmaps makes it worse.
Possible solution: Image loading on a different thread
Something keeps track of which images are on screen & where. On changes, enqueue images which have to be redrawn, cancel queued images which are no longer relevant.
Can we assure that canceled images won't be drawn?
I've successfully created a mess.... But also made it so that the drawNextShape
does not alter the shape -> we don't need it to return anything -> its easier to run async.
Surprise, surprise - imlib2 isn't thread safe, so loading the images asynchronously won't work. We need a new lib for image loading.
Could libpng be our saviour? Its thread-safe, well documented & supported, but limits us to only .png images and might be a hassle to implement?
TBH I kind of don't give a fuck about other image formats, PNG is king in my world.
So if its not too cancerous to implement, I think its time to go with libpng.
Looks like png++ might make using libpng less painful.
Could we keep the emojis on off-screen pixmaps and just copy them over when required?