Commit 4d7b287d authored by Bill Carr's avatar Bill Carr Committed by Commit Bot

Mark Decode Swap Chain for Fullscreen Optimizations

Add the DXGI_SWAP_CHAIN_FLAG_FULLSCREEN_VIDEO flag to the decoder swap chain in swap_chain_presenter. This makes the decoder swap chain a candidate for full screen optimizations in DWM (so long as other full screen criteria are met). If the swap chain is not fullscreen there are no adverse effects of the flag being present.

Bug: 1027046
Change-Id: I413f84a050e45409c4e00e7f2f08fe5eeed7657f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2246978Reviewed-by: default avatarRafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: default avatarMaggie Chen <magchen@chromium.org>
Reviewed-by: default avatarSunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: William Carr <wicarr@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#778593}
parent 2a933b18
...@@ -587,7 +587,11 @@ bool SwapChainPresenter::PresentToDecodeSwapChain( ...@@ -587,7 +587,11 @@ bool SwapChainPresenter::PresentToDecodeSwapChain(
DCHECK(media_factory); DCHECK(media_factory);
DXGI_DECODE_SWAP_CHAIN_DESC desc = {}; DXGI_DECODE_SWAP_CHAIN_DESC desc = {};
desc.Flags = 0; // Set the DXGI_SWAP_CHAIN_FLAG_FULLSCREEN_VIDEO flag to mark this surface
// as a candidate for full screen video optimizations. If the surface
// does not qualify as fullscreen by DWM's logic then the flag will have
// no effects.
desc.Flags = DXGI_SWAP_CHAIN_FLAG_FULLSCREEN_VIDEO;
HRESULT hr = HRESULT hr =
media_factory->CreateDecodeSwapChainForCompositionSurfaceHandle( media_factory->CreateDecodeSwapChainForCompositionSurfaceHandle(
d3d11_device_.Get(), swap_chain_handle_.Get(), &desc, d3d11_device_.Get(), swap_chain_handle_.Get(), &desc,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment