d3d11window_win32: Let DXGI choose client area

Don't specify the resolution of backbuffer. Then dxgi will let us know the
actual client area. When upstream resolution is chagned, updating the size
of backbuffer without the consideration for client size would cause mismatch
between them.
This commit is contained in:
Seungha Yang 2020-01-25 18:39:52 +09:00 committed by GStreamer Merge Bot
parent d393232bc2
commit e97ef8a562
2 changed files with 2 additions and 2 deletions

View file

@ -306,7 +306,6 @@ gst_d3d11_window_on_resize (GstD3D11Window * window, guint width, guint height)
window->rtv = NULL;
}
/* Set zero width and height here. dxgi will decide client area by itself */
swap_chain->GetDesc (&swap_desc);
hr = swap_chain->ResizeBuffers (0, width, height, DXGI_FORMAT_UNKNOWN,
swap_desc.Flags);

View file

@ -790,7 +790,8 @@ gst_d3d11_window_win32_create_swap_chain (GstD3D11Window * window,
*swap_chain = new_swapchain;
gst_d3d11_window_on_resize (window, width, height);
/* Set zero width and height here. dxgi will decide client area by itself */
gst_d3d11_window_on_resize (window, 0, 0);
return TRUE;
}