viewport
The portion of the texture that the view uses to draw its content.
Declaration
var viewport: MTLViewport { get }Discussion
This retrieves the size of the view and its location within the texture. If the layer dedicates a separate texture to each view, the texture bounds and view bounds match. However, if the layer uses a shared or layered texture, the view’s location or other slice index might differ.