summaryrefslogtreecommitdiffstats
path: root/gfx/thebes
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:02:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:02:55 +0000
commit22e2874bf6412144ab4b51b95327306ef9609b2c (patch)
tree977413f3f953a8838b52b432554e53707cf27777 /gfx/thebes
parentReleasing progress-linux version 126.0-1~progress7.99u1. (diff)
downloadfirefox-22e2874bf6412144ab4b51b95327306ef9609b2c.tar.xz
firefox-22e2874bf6412144ab4b51b95327306ef9609b2c.zip
Merging upstream version 126.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/thebes')
-rw-r--r--gfx/thebes/DeviceManagerDx.cpp46
-rw-r--r--gfx/thebes/DeviceManagerDx.h1
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();