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>