summaryrefslogtreecommitdiffstats
path: root/gfx/layers/RemoteTextureMap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/layers/RemoteTextureMap.cpp')
-rw-r--r--gfx/layers/RemoteTextureMap.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/gfx/layers/RemoteTextureMap.cpp b/gfx/layers/RemoteTextureMap.cpp
index 3fe3b13deb..95db676651 100644
--- a/gfx/layers/RemoteTextureMap.cpp
+++ b/gfx/layers/RemoteTextureMap.cpp
@@ -19,6 +19,7 @@
#include "mozilla/layers/RemoteTextureHostWrapper.h"
#include "mozilla/layers/TextureClientSharedSurface.h"
#include "mozilla/layers/WebRenderTextureHost.h"
+#include "mozilla/StaticPrefs_gfx.h"
#include "mozilla/StaticPrefs_webgl.h"
#include "mozilla/webgpu/ExternalTexture.h"
#include "mozilla/webrender/RenderThread.h"
@@ -334,7 +335,9 @@ bool RemoteTextureMap::RecycleTexture(
// Recycle texture data
recycled.mTextureData = std::move(aHolder.mTextureData);
}
- aRecycleBin->mRecycledTextures.push_back(std::move(recycled));
+ if (!StaticPrefs::gfx_remote_texture_recycle_disabled()) {
+ aRecycleBin->mRecycledTextures.push_back(std::move(recycled));
+ }
return true;
}