diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:02:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:02:01 +0000 |
commit | 088c0cefd0f8b5482cc227955cc3057d47ec24b6 (patch) | |
tree | 05f2021c7dd804334bcb781bb0c4881e971cd8fe /gfx | |
parent | Adding debian version 126.0-1. (diff) | |
download | firefox-088c0cefd0f8b5482cc227955cc3057d47ec24b6.tar.xz firefox-088c0cefd0f8b5482cc227955cc3057d47ec24b6.zip |
Merging upstream version 126.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx')
-rw-r--r-- | gfx/thebes/DeviceManagerDx.cpp | 46 | ||||
-rw-r--r-- | gfx/thebes/DeviceManagerDx.h | 1 |
2 files changed, 22 insertions, 25 deletions
diff --git a/gfx/thebes/DeviceManagerDx.cpp b/gfx/thebes/DeviceManagerDx.cpp index 7d00e5ac1d..3a531e92ae 100644 --- a/gfx/thebes/DeviceManagerDx.cpp +++ b/gfx/thebes/DeviceManagerDx.cpp @@ -1106,33 +1106,31 @@ RefPtr<ID3D11Device> DeviceManagerDx::CreateDecoderDevice( bool isAMD = mDeviceStatus->adapter().VendorId == 0x1002; bool reuseDevice = false; - if (!aFlags.contains(DeviceFlag::disableDeviceReuse)) { - if (gfxVars::ReuseDecoderDevice()) { - reuseDevice = true; - } else if (isAMD) { - reuseDevice = true; - gfxCriticalNoteOnce << "Always have to reuse decoder device on AMD"; - } + if (gfxVars::ReuseDecoderDevice()) { + reuseDevice = true; + } else if (isAMD) { + reuseDevice = true; + gfxCriticalNoteOnce << "Always have to reuse decoder device on AMD"; + } - if (reuseDevice) { - // Use mCompositorDevice for decoder device only for hardware WebRender. - if (aFlags.contains(DeviceFlag::isHardwareWebRenderInUse) && - mCompositorDevice && mCompositorDeviceSupportsVideo && - !mDecoderDevice) { - mDecoderDevice = mCompositorDevice; - - RefPtr<ID3D10Multithread> multi; - mDecoderDevice->QueryInterface(__uuidof(ID3D10Multithread), - getter_AddRefs(multi)); - if (multi) { - MOZ_ASSERT(multi->GetMultithreadProtected()); - } + if (reuseDevice) { + // Use mCompositorDevice for decoder device only for hardware WebRender. + if (aFlags.contains(DeviceFlag::isHardwareWebRenderInUse) && + mCompositorDevice && mCompositorDeviceSupportsVideo && + !mDecoderDevice) { + mDecoderDevice = mCompositorDevice; + + RefPtr<ID3D10Multithread> multi; + mDecoderDevice->QueryInterface(__uuidof(ID3D10Multithread), + getter_AddRefs(multi)); + if (multi) { + MOZ_ASSERT(multi->GetMultithreadProtected()); } + } - if (mDecoderDevice) { - RefPtr<ID3D11Device> dev = mDecoderDevice; - return dev.forget(); - } + if (mDecoderDevice) { + RefPtr<ID3D11Device> dev = mDecoderDevice; + return dev.forget(); } } diff --git a/gfx/thebes/DeviceManagerDx.h b/gfx/thebes/DeviceManagerDx.h index 1e4182ddec..ee44447d23 100644 --- a/gfx/thebes/DeviceManagerDx.h +++ b/gfx/thebes/DeviceManagerDx.h @@ -61,7 +61,6 @@ class DeviceManagerDx final { enum class DeviceFlag { isHardwareWebRenderInUse, - disableDeviceReuse, }; using DeviceFlagSet = EnumSet<DeviceFlag, uint8_t>; RefPtr<ID3D11Device> GetCompositorDevice(); |