1 /* 2 * Copyright (c) 2020 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef RTC_BASE_WIN_CREATE_DIRECT3D_DEVICE_H_ 12 #define RTC_BASE_WIN_CREATE_DIRECT3D_DEVICE_H_ 13 14 #include <windows.graphics.directX.direct3d11.h> 15 #include <windows.graphics.directX.direct3d11.interop.h> 16 #include <winerror.h> 17 #include <wrl/client.h> 18 19 namespace webrtc { 20 21 // Callers must check the return value of ResolveCoreWinRTDirect3DDelayload() 22 // before using CreateDirect3DDeviceFromDXGIDevice(). 23 bool ResolveCoreWinRTDirect3DDelayload(); 24 25 // Allows for the creating of Direct3D Devices from a DXGI device on versions 26 // of Windows greater than Win7. 27 HRESULT CreateDirect3DDeviceFromDXGIDevice( 28 IDXGIDevice* dxgi_device, 29 ABI::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice** 30 out_d3d11_device); 31 32 } // namespace webrtc 33 34 #endif // RTC_BASE_WIN_CREATE_DIRECT3D_DEVICE_H_ 35