slint/internal/compiler/generator
Simon Hausmann ef5377baea Fix the image cache with rust generated code and debug builds
We use `const` for the embedded data, which doesn't guarantee a fixed location in memory.

For the image cache when embedding (encoded) image data, we rely on a fixed address.

I observed that in debug builds of the slide puzzle, the embedded data is not always
reported to be at the same address, presumably due to inlining. This makes
the theme switching a bit slower and the cache less efficient.

This patch fixes that by using static instead of const, to guarantee a fixed location in memory.

(This was not observed in release builds, but in theory it could happen there as well?)
2022-08-17 09:43:33 +02:00
..
cpp.rs Move the fonts out of the Backend trait (#1438) 2022-07-26 16:45:54 +02:00
rust.rs Fix the image cache with rust generated code and debug builds 2022-08-17 09:43:33 +02:00