Implement half of renderThread().