updated to use new backbuffer flag
removed unnecessary calls to setTransform()
removed unnecessary calls to save()/restore()