diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
commit | a90a5cba08fdf6c0ceb95101c275108a152a3aed (patch) | |
tree | 532507288f3defd7f4dcf1af49698bcb76034855 /gfx/webrender_bindings/RenderThread.cpp | |
parent | Adding debian version 126.0.1-1. (diff) | |
download | firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/webrender_bindings/RenderThread.cpp')
-rw-r--r-- | gfx/webrender_bindings/RenderThread.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gfx/webrender_bindings/RenderThread.cpp b/gfx/webrender_bindings/RenderThread.cpp index e1a41ee225..cb496c8fc5 100644 --- a/gfx/webrender_bindings/RenderThread.cpp +++ b/gfx/webrender_bindings/RenderThread.cpp @@ -979,6 +979,21 @@ void RenderThread::RegisterExternalImage( mSyncObjectNeededRenderTextures.emplace(aExternalImageId, texture); } mRenderTextures.emplace(aExternalImageId, texture); + +#ifdef DEBUG + int32_t maxAllowedIncrease = + StaticPrefs::gfx_testing_assert_render_textures_increase(); + + if (maxAllowedIncrease <= 0) { + mRenderTexturesLastTime = -1; + } else { + if (mRenderTexturesLastTime < 0) { + mRenderTexturesLastTime = static_cast<int32_t>(mRenderTextures.size()); + } + MOZ_ASSERT((static_cast<int32_t>(mRenderTextures.size()) - + mRenderTexturesLastTime) < maxAllowedIncrease); + } +#endif } void RenderThread::UnregisterExternalImage( |