d3d11window_win32: Let DXGI choose client area
authorSeungha Yang <seungha.yang@navercorp.com>
Sat, 25 Jan 2020 09:39:52 +0000 (18:39 +0900)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sun, 26 Jan 2020 12:13:24 +0000 (12:13 +0000)
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.

sys/d3d11/gstd3d11window.cpp
sys/d3d11/gstd3d11window_win32.cpp

index 9009165..c7e8e48 100644 (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);
index e9f6302..565dcb7 100644 (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;
 }