[Kde-games-devel] Proposing KGameRenderer

Parker Coates parker.coates at kdemail.net
Sat Jun 12 23:42:02 CEST 2010


On Sat, Jun 12, 2010 at 04:40, Ian Wadham wrote:
> On Saturday 12 June 2010 5:02:24 am Stefan Majewsky wrote:
>> my last mail to the restructuring thread included some (mild) complaints
>>  about the rendering code in most kdegames apps. I've decided to do
>>  something about it, considering especially that I have to port KDiamond's
>>  renderer singleton from KPixmapCache to KImageCache anyway.
>>
> BTW, why do you "have to port"?  I see that KPixmapCache is deprecated
> now, but retained for backward compatibility, and that most of the uses of
> it are in games, though there are some other uses in prestigious apps
> such as Amarok and Kalzium.  Should we all be porting?

There is no real "need" to port, but it would be recommended. The fact
that KPixmapCache is now deprecated means that it's less likely to see
maintenance in the future. KPixmapCache was replaced because of it's
crashiness and and certain false assumptions it makes internally. In
KDEGames the crashes have never been much of an issue for us as most
of the problems are related to concurrent access. Fortunately, users
tend not to have multiple copies of KGoldrunner running
simultaneously. :)

Michael Pyne (the author of the new caches) had been trying to patch
up KPixmapCache for a while, but just couldn't accomplish much within
the confines of the existing framework. He then attempted a complete
rewrite while maintaining full API compatibility, but even that became
to much of a burden. So while the new K*Cache classes aren't directly
compatible with KPixmapCache, it's more a case of them being what
KPixmapCache should have been in the first place.

Parker


More information about the kde-games-devel mailing list