blob: 4233c31ce8d4edcc30d429084cd2d67543382ecd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
|