Call viewport only if needed.