Canvas2D: Make image handling more robust


Image patterns were expecting that "pattern1 = createPattern(..)" was
followed by "setFillStyle(pattern1)". If there was extra patterns
created in different order, the images got mixed as they were just
queued in the buffer. Instead, we need to map images to patterns based
on the url & serialNumber. Also remove unused drawImage and addImage.

Add lancelot test for this.

Task-number: QTBUG-146874
Change-Id: Ieeb4db1d79518616651df343e9831a5eb86e40f0
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
commitf444afdf8961d8e43a4dfda4166bb06917c8dcd8
parent202370d1b77372b65d064f2b442dad5eabf88d94
authorKaj Grönholm <kaj.gronholm@qt.io>
committerKaj Grönholm <kaj.gronholm@qt.io>
commit timeThu, 28 May 2026 14:04:24 +0000