QCanvasPainter: Small fixes and optimizations


Do these improments:
- Cast rect arguments to float like the other path methods
- Track used texture ids in a QSet instead of a QList
- Avoid double hash lookups when fetching cached images
- Guard against null texture and empty source rect in drawImage
- Create the texture with the converted image size
- Use integer math in activeImageMemoryUsage()
- Prefer pre-increment in handleRemoveTextures()

Assisted-by: Claude Code
Pick-to: 6.12
Change-Id: I3a9b2cd368b44bd7304e2e4c22fd144f301f2fd3
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
Reviewed-by: Owais Akhtar <owais.akhtar@qt.io>
commit40dd704d9ac55a176c23e541cf49da6b10883b71
parent27e8f139468f28895cf42d6dc3c0b3b6374d4385
authorKaj Grönholm <kaj.gronholm@qt.io>
committerKaj Grönholm <kaj.gronholm@qt.io>
commit timeMon, 19 Oct 2026 10:46:06 +0000