Fix frame cache operation


Batch renderer's frameCache had some problems to manage
its cache entries. So, LottieAnimation could not be controlled
when the frame jumped.
 - m_lastRenderedFrame remembers the last rendered frame number
and prevent from adding the frame already rendered.
 - pruneFrameCache should make at least 1 empty cache slot for
the next rendered frame if it is not in the cache. So, if it
could not delete any cache entry, it will delete one far from
currentFrame.

Fixes: QTBUG-97259
Pick-to: 6.5
Change-Id: I215f03a55c1538e4ebf8f75552e2652c9072eca9
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
commit00d57fd859b0361bc208d34e3c946fba810b2153
parent6f26bcd6f9a8c4f3099244108c5123955e294f45
authorInho Lee <inho.lee@qt.io>
committerInho Lee <inho.lee@qt.io>
commit timeMon, 27 Mar 2023 08:49:45 +0000