Hi!
We've had some issues with the texture cache in Skia for SkImages in React Native Skia and have some questions about this.
The problem arose when a user had a few too many jpeg images on screen at the same time, causing the cache to start invalidating before all images were rendered. When animating this caused the invalidation and re-uploading if textures to the GPU to happen on each frame - causing a bit of a performance issue.
We solved this specific issue by reducing the size and number of unique images, but would like to understand how we can improve this experience a bit.
After experimenting with using makeTextureImage we found that it was easy to solve this since we could control texture creation and bypass the cache. This gave us a few other issues that made us think it would be best to keep the current lazy and automatic texture upload through the cache.
To understand this we'd like to know why the current limit of around 200mb is set (same on all platforms it seems?) and if there would be any issues changing this (or even letting our users change it) - we believe it would be dependant on the GPU texture memory size? Which might not be available?
Thanks again for all your nice work!
Christian