2024-07-17 02:40 AM
Hello,
I had a use case to add dynamic bitmaps in a project I joined, and I followed the documentation to make them work.
https://support.touchgfx.com/docs/development/ui-development/touchgfx-engine-features/dynamic-bitmaps
Surprisingly, I realized that the addresses of dynamic bitmaps are not as I would expect them. The code I added that called Bitmap::setCache seems to be ignored.
I dug into project internals and found that there is a call to registerBitmapDatabase during initialization, with cache parameter supplied, but there is not a lot about that function in the docs. Does this explain why my `setCache` was ignored?
Solved! Go to Solution.
2024-07-18 02:46 AM
Hello @MarPan ,
Yes, Bitmap::registerBitmapDatabase already contains setting cache region if it is provided to it, and cache memory can only be set once. Therefore, your call to setCache() will be ignored since the cache is already set.
I hope this answers your question!
2024-07-18 02:46 AM
Hello @MarPan ,
Yes, Bitmap::registerBitmapDatabase already contains setting cache region if it is provided to it, and cache memory can only be set once. Therefore, your call to setCache() will be ignored since the cache is already set.
I hope this answers your question!