Can we move the lines out of the ifs here?
more like:
```
if (i == activeTab)
    CurrentSurface = activeTabSurface
else
   CurrentSurface = inactiveTabSurface

currentSurface.setclip
currentSurface.set_dest
render_device->render(currentSurface);
```