Code review comment for lp://qastaging/~dandrader/qtmir/textureCleanUp-lp1499388

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

On 28/09/2015 09:21, Gerry Boland wrote:
> But instead of peeking for every frame to check if the MirSurface backing texture matches the one the textureProvider is holding though, wouldn't it just be easier to set the texture each and every frame?
It would make for less code and a smaller diff, but I think it would
also be less performant as you would be creating and destroying a shared
pointer all the time. Ie, apart from the first and last frames, you
would be needlessly creating a strong ref out of a weak ref just to
throw it away later on. Maybe this cost is negligible, but if we can
easily avoid it, why not?

I compressed this if{}else{} chain. It should look less cluttered now.

« Back to merge proposal