From e0250b9604b24f32d53b409d8c48d16faa2caebc Mon Sep 17 00:00:00 2001 From: James Ross-Gowan Date: Sat, 4 Feb 2017 19:16:02 +1100 Subject: vo_opengl: angle: rewrite with custom swap chain This replaces the old backend that exclusively used EGL windowing with one that can also use ANGLE's ability to render to directly to a texture. The advantage of this is that it allows mpv to create the swap chain itself and this allows mpv to use a flip-mode swap chain on a HWND (which avoids problems with DirectComposition) and to use a longer swap chain that has six backbuffers by default (which reportedly fixes problems with rendering 24fps video on 24Hz monitors.) Also, "screenshot window" should now work on DXGI 1.2 and up (Windows 8 and up.) --- osdep/windows_utils.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'osdep/windows_utils.c') diff --git a/osdep/windows_utils.c b/osdep/windows_utils.c index a1ea32191a..a60eba3d26 100644 --- a/osdep/windows_utils.c +++ b/osdep/windows_utils.c @@ -22,6 +22,7 @@ #include #include #include +#include #include "windows_utils.h" @@ -118,6 +119,13 @@ static char *hresult_to_str(const HRESULT hr) E(D3DERR_CANNOTPROTECTCONTENT) E(D3DERR_UNSUPPORTEDCRYPTO) E(D3DERR_PRESENT_STATISTICS_DISJOINT) + E(DXGI_ERROR_DEVICE_HUNG) + E(DXGI_ERROR_DEVICE_REMOVED) + E(DXGI_ERROR_DEVICE_RESET) + E(DXGI_ERROR_DRIVER_INTERNAL_ERROR) + E(DXGI_ERROR_INVALID_CALL) + E(DXGI_ERROR_WAS_STILL_DRAWING) + E(DXGI_STATUS_OCCLUDED) default: return ""; } -- cgit v1.2.3