Bug 1743632 [Linux] Use GL Fence in SharedSurfaceDMABUF

- Implement SharedSurface_DMABUF::WaitForBufferOwnership() by DMABufSurface::FenceWait().

Depends on D133901

Differential Revision: https://phabricator.services.mozilla.com/D133902
This commit is contained in:
stransky 2021-12-22 08:37:32 +00:00
Родитель af6f4752ae
Коммит 124f81008b
2 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -46,6 +46,8 @@ SharedSurface_DMABUF::~SharedSurface_DMABUF() {
void SharedSurface_DMABUF::ProducerReleaseImpl() { mSurface->FenceSet(); } void SharedSurface_DMABUF::ProducerReleaseImpl() { mSurface->FenceSet(); }
void SharedSurface_DMABUF::WaitForBufferOwnership() { mSurface->FenceWait(); }
Maybe<layers::SurfaceDescriptor> SharedSurface_DMABUF::ToSurfaceDescriptor() { Maybe<layers::SurfaceDescriptor> SharedSurface_DMABUF::ToSurfaceDescriptor() {
layers::SurfaceDescriptor desc; layers::SurfaceDescriptor desc;
if (!mSurface->Serialize(desc)) return {}; if (!mSurface->Serialize(desc)) return {};

Просмотреть файл

@ -43,6 +43,8 @@ class SharedSurface_DMABUF final : public SharedSurface {
virtual void ProducerReadReleaseImpl() override {} virtual void ProducerReadReleaseImpl() override {}
Maybe<layers::SurfaceDescriptor> ToSurfaceDescriptor() override; Maybe<layers::SurfaceDescriptor> ToSurfaceDescriptor() override;
void WaitForBufferOwnership() override;
}; };
class SurfaceFactory_DMABUF : public SurfaceFactory { class SurfaceFactory_DMABUF : public SurfaceFactory {