firefox/mozilla-1619882-3.patch

52 lines
1.6 KiB
Diff
Raw Normal View History

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