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.
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.