improve RetinaAwareUIGraphicsBeginImageContext function