MCPcopy Create free account
hub / github.com/Aleksoid1978/VideoRenderer / UpdateStatsPresent

Method UpdateStatsPresent

Source/DX11VideoProcessor.cpp:4176–4211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4174}
4175
4176void CDX11VideoProcessor::UpdateStatsPresent()
4177{
4178 DXGI_SWAP_CHAIN_DESC1 swapchain_desc;
4179 if (m_pDXGISwapChain1 && S_OK == m_pDXGISwapChain1->GetDesc1(&swapchain_desc)) {
4180 m_strStatsPresent.assign(L"\nPresentation : ");
4181 switch (swapchain_desc.SwapEffect) {
4182 case DXGI_SWAP_EFFECT_DISCARD:
4183 m_strStatsPresent.append(L"Discard");
4184 break;
4185 case DXGI_SWAP_EFFECT_SEQUENTIAL:
4186 m_strStatsPresent.append(L"Sequential");
4187 break;
4188 case DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL:
4189 m_strStatsPresent.append(L"Flip sequential");
4190 break;
4191 case DXGI_SWAP_EFFECT_FLIP_DISCARD:
4192 m_strStatsPresent.append(L"Flip discard");
4193 break;
4194 }
4195 m_strStatsPresent.append(L", ");
4196 m_strStatsPresent.append(DXGIFormatToString(swapchain_desc.Format));
4197
4198 if ((m_bVBlankBeforePresent && m_pDXGIOutput) || m_bAdjustPresentTime) {
4199 m_strStatsPresent.append(L"\nFrame sync :");
4200 if (m_bVBlankBeforePresent && m_pDXGIOutput) {
4201 m_strStatsPresent.append(L" wait VBlank");
4202 }
4203 if (m_bAdjustPresentTime) {
4204 if (m_strStatsPresent.back() != ':') {
4205 m_strStatsPresent += ',';
4206 }
4207 m_strStatsPresent.append(L" adjust present time");
4208 }
4209 }
4210 }
4211}
4212
4213void CDX11VideoProcessor::UpdateStatsStatic()
4214{

Callers

nothing calls this directly

Calls 1

DXGIFormatToStringFunction · 0.85

Tested by

no test coverage detected