[Kde-games-devel] Review Request: Make the default renderSize of KGameRendererClients empty.
Parker Coates
parker.coates at kdemail.net
Sun Sep 19 02:24:46 CEST 2010
> On 2010-09-18 20:54:00, Stefan Majewsky wrote:
> > Sounds sensible. Before you commit, could you please test for no crashes explicitly, e.g. by removing the relevant setRenderSize() calls in some game?
I commented out all the setRenderSize calls for at least a half dozen games. All of them ran fine, despite not showing anything.
Looking at the code, this makes sense because the first thing KGameRendererPrivate::requestPixmap() does is check for an empty size and immediately returns a null pixmap.
- Parker
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5380/#review7678
-----------------------------------------------------------
On 2010-09-18 20:22:58, Parker Coates wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5380/
> -----------------------------------------------------------
>
> (Updated 2010-09-18 20:22:58)
>
>
> Review request for KDE Games.
>
>
> Summary
> -------
>
> Currently, KGameRendererClients are created with a default renderSize of 3x3. This patch changes the default to an invalid size so that no rendering is done until a valid renderSize is given. This both saves some totally unnecessary rendering and is more likely to match the expectations of users of KGRC.
>
> I was just trying to fix a bug in KPat that I eventually tracked down to an unexpected item paint event happening with a 3x3 pixmap. The issue was intermittent due to a race condition between the KGameRenderer's threaded rendering and Qt's delayed painting making it tricky to track down. Anyway, once I found the source of the 3x3 size, the issue was easy enough to work around, but I'd rather not see other devs hit similar issues.
>
> Stefan, is this behaviour intentional? Is there any chance that this patch could cause breakages inside KGameRenderer?
>
>
> Diffs
> -----
>
> trunk/KDE/kdegames/libkdegames/kgamerendererclient.cpp 1176563
>
> Diff: http://svn.reviewboard.kde.org/r/5380/diff
>
>
> Testing
> -------
>
> Tried several of the games ported to KGR and saw no regressions. I doubt any one was depending on the default renderSize being non-empty.
>
>
> Thanks,
>
> Parker
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-games-devel/attachments/20100919/de5d81d4/attachment.htm
More information about the kde-games-devel
mailing list