summaryrefslogtreecommitdiff
path: root/mozilla-1619882-3.patch
diff options
context:
space:
mode:
authorMartin Stransky <stransky@redhat.com>2020-05-25 14:38:58 +0200
committerMartin Stransky <stransky@redhat.com>2020-05-25 14:38:58 +0200
commit1f2660d56b4c27145382cdb856e0914371a5bf3a (patch)
tree292c5d71692ba5961506db5831fc3c11f819b1ce /mozilla-1619882-3.patch
parentAdd support for PipeWire 0.3 (diff)
downloadlibrewolf-fedora-ff-1f2660d56b4c27145382cdb856e0914371a5bf3a.tar.gz
librewolf-fedora-ff-1f2660d56b4c27145382cdb856e0914371a5bf3a.tar.bz2
librewolf-fedora-ff-1f2660d56b4c27145382cdb856e0914371a5bf3a.zip
Added fix for mozbz#1619882 - video flickering when va-api is used.
Diffstat (limited to 'mozilla-1619882-3.patch')
-rw-r--r--mozilla-1619882-3.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/mozilla-1619882-3.patch b/mozilla-1619882-3.patch
new file mode 100644
index 0000000..4233c31
--- /dev/null
+++ b/mozilla-1619882-3.patch
@@ -0,0 +1,51 @@
+diff --git a/gfx/layers/WaylandDMABUFSurfaceImage.h b/gfx/layers/WaylandDMABUFSurfaceImage.h
+--- a/gfx/layers/WaylandDMABUFSurfaceImage.h
++++ b/gfx/layers/WaylandDMABUFSurfaceImage.h
+@@ -13,29 +13,16 @@
+ #include "mozilla/layers/TextureClient.h"
+
+ namespace mozilla {
+-class VAAPIFrameHolder;
+-}
+-
+-namespace mozilla {
+ namespace layers {
+
+-typedef void (*AVFrameReleaseCallback)(VAAPIFrameHolder* aFrameHolder);
+-
+ class WaylandDMABUFSurfaceImage : public Image {
+ public:
+- explicit WaylandDMABUFSurfaceImage(WaylandDMABufSurface* aSurface,
+- AVFrameReleaseCallback aReleaseCallback,
+- VAAPIFrameHolder* aFrameHolder)
+- : Image(nullptr, ImageFormat::WAYLAND_DMABUF),
+- mSurface(aSurface),
+- mReleaseCallback(aReleaseCallback),
+- mFrameHolder(aFrameHolder) {}
++ explicit WaylandDMABUFSurfaceImage(WaylandDMABufSurface* aSurface)
++ : Image(nullptr, ImageFormat::WAYLAND_DMABUF), mSurface(aSurface) {
++ mSurface->GlobalRefAdd();
++ }
+
+- ~WaylandDMABUFSurfaceImage() {
+- if (mReleaseCallback) {
+- mReleaseCallback(mFrameHolder);
+- }
+- }
++ ~WaylandDMABUFSurfaceImage() { mSurface->GlobalRefRelease(); }
+
+ WaylandDMABufSurface* GetSurface() { return mSurface; }
+
+@@ -52,11 +39,6 @@
+ private:
+ RefPtr<WaylandDMABufSurface> mSurface;
+ RefPtr<TextureClient> mTextureClient;
+-
+- // When WaylandDMABUFSurfaceImage is created on top of ffmpeg frame located at
+- // GPU memory we need to keep it until painting of the frame is finished.
+- AVFrameReleaseCallback mReleaseCallback;
+- VAAPIFrameHolder* mFrameHolder;
+ };
+
+ } // namespace layers
+
bgstack15