Skip to content

Commit

Permalink
Provide DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING for CanvasSwapChain when c…
Browse files Browse the repository at this point in the history
…reating or resizing for supporting VRR
  • Loading branch information
Dev-Taehui committed Oct 16, 2023
1 parent 52ed3c6 commit 0261fbd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions winrt/lib/drawing/CanvasDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,7 @@ namespace ABI { namespace Microsoft { namespace Graphics { namespace Canvas
swapChainDesc.Scaling = DXGI_SCALING_STRETCH;
swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
swapChainDesc.AlphaMode = ToDxgiAlphaMode(alphaMode);
swapChainDesc.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING;

ComPtr<IDXGISwapChain1> swapChain;
ThrowIfCreateSurfaceFailed(
Expand Down
2 changes: 1 addition & 1 deletion winrt/lib/drawing/CanvasSwapChain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ namespace ABI { namespace Microsoft { namespace Graphics { namespace Canvas
widthInPixels,
heightInPixels,
static_cast<DXGI_FORMAT>(newFormat),
0));
DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING));

if (!m_isTransformMatrixSupported)
{
Expand Down

0 comments on commit 0261fbd

Please sign in to comment.