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 Feb 1, 2023
1 parent 24fc57e commit d506cdc
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 @@ -1153,6 +1153,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 @@ -551,7 +551,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_isCoreWindowSwapChain)
{
Expand Down

0 comments on commit d506cdc

Please sign in to comment.