theuni/xbmc — comment on commit 2daa4f49bc92bb44f954f9444d7f62d0967b26d0
File:  line 0
By topfs2:

Well this is back to the discussion on IRC again, just because you mark it doesn't mean you draw 3 times (especially true with noflip). So with your change here you will see that in frame 1 30% changed -> render 100%, frame 2 some other 20% changed -> render 100%, frame 3 some 10% change -> render 100%. If you remove this change you'd see frame 1 30% change -> render 100%, frame 2 at most 50% changed (with accumulation) -> 100% render, frame 3 at most 60% (accumulative) -> render 100%. even if you add in frames in between all these with no content and using noflip it will be the same amount of rendering. The tracking is to solve the problem when your flipping constantly and not when your using no flip.

Example 2. Frame 1 30% changed, -> render 100% Frame 2 and 3 0% changed, on these with a constantly flipping we _NEED_ to render 100% 3 times so that the rotating buffers are in sync. With this patch your messing that part up.

So all in all you add code which _might_ save a few cpu cycles (hundred operations probably) only when noflip is available. This can be saved differently and in a more generic way if needed. The better choice IMO is to remove regions when they have been solved and push that solved region instead, that will take down operations from hundreds to a few which would make it almost the same optimization as this but with a much clearer code (and beneficial to flip constantly also).