1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_gfx_thebes_D3D11Checks_h
7 #define mozilla_gfx_thebes_D3D11Checks_h
9 #include "mozilla/EnumSet.h"
10 #include "mozilla/EnumTypeTraits.h"
14 struct DXGI_ADAPTER_DESC
;
20 enum class VideoFormatOption
{
25 using VideoFormatOptionSet
= EnumSet
<VideoFormatOption
>;
27 static bool DoesRenderTargetViewNeedRecreating(ID3D11Device
* aDevice
);
28 static bool DoesDeviceWork();
29 static bool DoesTextureSharingWork(ID3D11Device
* device
);
30 static bool DoesAlphaTextureSharingWork(ID3D11Device
* device
);
31 static void WarnOnAdapterMismatch(ID3D11Device
* device
);
32 static bool GetDxgiDesc(ID3D11Device
* device
, DXGI_ADAPTER_DESC
* out
);
33 static bool DoesRemotePresentWork(IDXGIAdapter
* adapter
);
34 static VideoFormatOptionSet
FormatOptions(ID3D11Device
* device
);
39 // Used for IPDL serialization.
40 // The 'value' have to be the biggest enum from D3D11Checks::Option.
42 struct MaxEnumValue
<::mozilla::gfx::D3D11Checks::VideoFormatOption
> {
43 static constexpr unsigned int value
=
44 static_cast<unsigned int>(gfx::D3D11Checks::VideoFormatOption::P016
);
47 } // namespace mozilla
49 #endif // mozilla_gfx_thebes_D3D11Checks_h