mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 14:51:15 +00:00
Internal cleanup in the GL renderer
Separate the image cache from the texture cache. The latter needs additional data in the key. The two have less in common that it seemed. This also fixes a small issue with `CachedImage::upload_to_gpu` that for SVGs would return a decoded (rendered) SVG image, instead of a texture. That was harmless because we always call `ensure_uploaded_to_gpu` later, but now we assert that the texture cache only holds textures, because clear() (former remove_textures()) just clears everything.
This commit is contained in:
parent
6bc69c2fe9
commit
2dae2a01d2
3 changed files with 71 additions and 25 deletions
|
@ -902,7 +902,7 @@ impl GLItemRenderer {
|
|||
let image = source_property.get();
|
||||
let image_inner = (&image).into();
|
||||
|
||||
ImageCacheKey::new(image_inner, Some(image_rendering))
|
||||
TextureCacheKey::new(image_inner, image_rendering)
|
||||
.and_then(|cache_key| {
|
||||
self.graphics_window
|
||||
.texture_cache
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue