summaryrefslogtreecommitdiffstats
path: root/gfx/thebes/DeviceManagerDx.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
commitdef92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch)
tree2ef34b9ad8bb9a9220e05d60352558b15f513894 /gfx/thebes/DeviceManagerDx.h
parentAdding debian version 125.0.3-1. (diff)
downloadfirefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz
firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/thebes/DeviceManagerDx.h')
-rw-r--r--gfx/thebes/DeviceManagerDx.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/gfx/thebes/DeviceManagerDx.h b/gfx/thebes/DeviceManagerDx.h
index c6860c7ffa..1e4182ddec 100644
--- a/gfx/thebes/DeviceManagerDx.h
+++ b/gfx/thebes/DeviceManagerDx.h
@@ -6,6 +6,7 @@
#ifndef mozilla_gfx_thebes_DeviceManagerDx_h
#define mozilla_gfx_thebes_DeviceManagerDx_h
+#include <set>
#include <vector>
#include "gfxPlatform.h"
@@ -58,13 +59,18 @@ class DeviceManagerDx final {
static DeviceManagerDx* Get() { return sInstance; }
+ enum class DeviceFlag {
+ isHardwareWebRenderInUse,
+ disableDeviceReuse,
+ };
+ using DeviceFlagSet = EnumSet<DeviceFlag, uint8_t>;
RefPtr<ID3D11Device> GetCompositorDevice();
RefPtr<ID3D11Device> GetContentDevice();
RefPtr<ID3D11Device> GetCanvasDevice();
RefPtr<ID3D11Device> GetImageDevice();
RefPtr<IDCompositionDevice2> GetDirectCompositionDevice();
RefPtr<ID3D11Device> GetVRDevice();
- RefPtr<ID3D11Device> CreateDecoderDevice(bool aHardwareWebRender);
+ RefPtr<ID3D11Device> CreateDecoderDevice(DeviceFlagSet aFlags);
RefPtr<ID3D11Device> CreateMediaEngineDevice();
IDirectDraw7* GetDirectDraw();
@@ -91,7 +97,10 @@ class DeviceManagerDx final {
bool GetOutputFromMonitor(HMONITOR monitor, RefPtr<IDXGIOutput>* aOutOutput);
void PostUpdateMonitorInfo();
+ void UpdateMonitorInfo();
bool SystemHDREnabled();
+ bool WindowHDREnabled(HWND aWindow);
+ bool MonitorHDREnabled(HMONITOR aMonitor);
// Check if the current adapter supports hardware stretching
void CheckHardwareStretchingSupport(HwStretchingSupport& aRv);
@@ -177,7 +186,6 @@ class DeviceManagerDx final {
bool GetAnyDeviceRemovedReason(DeviceResetReason* aOutReason)
MOZ_REQUIRES(mDeviceLock);
- void UpdateMonitorInfo();
std::vector<DXGI_OUTPUT_DESC1> GetOutputDescs();
private:
@@ -193,6 +201,7 @@ class DeviceManagerDx final {
mutable mozilla::Mutex mDeviceLock;
nsTArray<D3D_FEATURE_LEVEL> mFeatureLevels MOZ_GUARDED_BY(mDeviceLock);
RefPtr<IDXGIAdapter1> mAdapter MOZ_GUARDED_BY(mDeviceLock);
+ RefPtr<IDXGIFactory1> mFactory MOZ_GUARDED_BY(mDeviceLock);
RefPtr<ID3D11Device> mCompositorDevice MOZ_GUARDED_BY(mDeviceLock);
RefPtr<ID3D11Device> mContentDevice MOZ_GUARDED_BY(mDeviceLock);
RefPtr<ID3D11Device> mCanvasDevice MOZ_GUARDED_BY(mDeviceLock);
@@ -208,6 +217,7 @@ class DeviceManagerDx final {
Maybe<DeviceResetReason> mDeviceResetReason MOZ_GUARDED_BY(mDeviceLock);
RefPtr<Runnable> mUpdateMonitorInfoRunnable MOZ_GUARDED_BY(mDeviceLock);
Maybe<bool> mSystemHdrEnabled MOZ_GUARDED_BY(mDeviceLock);
+ std::set<HMONITOR> mHdrMonitors MOZ_GUARDED_BY(mDeviceLock);
nsModuleHandle mDirectDrawDLL;
RefPtr<IDirectDraw7> mDirectDraw;