CanvasSwapChainSourceSize Property |
Namespace: Microsoft.Graphics.Canvas
This property can be used to optimize rendering by only drawing to part of the swap chain, then scaling up that region to fill the same area that would normally have been covered by the entire swap chain. Because fewer pixels need to be written, this can reduce GPU rendering cost. The source size can be efficiently changed before every present, dynamically adjusting resolution to match the current rendering workload.
The source size must be less than or equal to the size of the swap chain. When set to a smaller value, only the top left subregion of the swap chain will be displayed. Setting this property is functionally equivalent to using ResizeBuffers followed by TransformMatrix with a scale of originalSize / newSize, but changing the SourceSize is much more efficient than ResizeBuffers when you want to adjust resolution on the fly.
The source size property only affects how the swap chain is displayed. You must separately use other drawing APIs to restrict your rendering to the specified top left region of the swap chain.
The size is specified in device independent pixels (DIPs).