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/gl/GLScreenBuffer.h | |
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/gl/GLScreenBuffer.h')
-rw-r--r-- | gfx/gl/GLScreenBuffer.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gfx/gl/GLScreenBuffer.h b/gfx/gl/GLScreenBuffer.h index d281249771..ace3145f7a 100644 --- a/gfx/gl/GLScreenBuffer.h +++ b/gfx/gl/GLScreenBuffer.h @@ -55,6 +55,7 @@ class SwapChain final { UniquePtr<SurfaceFactory> mFactory; private: + size_t mPoolLimit; std::queue<std::shared_ptr<SharedSurface>> mPool; std::shared_ptr<SharedSurface> mFrontBuffer; std::function<void()> mDestroyedCallback; @@ -69,6 +70,14 @@ class SwapChain final { SwapChain(); virtual ~SwapChain(); + void DisablePool() { + if (mPoolLimit) { + MOZ_ASSERT(mPool.empty()); + mPool = {}; + mPoolLimit = 0; + } + } + void ClearPool(); bool StoreRecycledSurface(const std::shared_ptr<SharedSurface>& surf); const auto& FrontBuffer() const { return mFrontBuffer; } |