mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1929185 - Reduce DMABufSurface::mSyncFd file descriptor usage r=stransky
ImportSurfaceDescriptor() does not need to clone file descriptor for DMABufSurface::mSyncFd. Differential Revision: https://phabricator.services.mozilla.com/D227920
This commit is contained in:
parent
64cd8432c0
commit
1cd2a4fe29
@ -644,13 +644,7 @@ bool DMABufSurfaceRGBA::ImportSurfaceDescriptor(
|
||||
}
|
||||
|
||||
if (desc.fence().Length() > 0) {
|
||||
auto fd = desc.fence()[0]->ClonePlatformHandle();
|
||||
if (!fd) {
|
||||
LOGDMABUF(
|
||||
(" failed to get GL fence file descriptor: %s", strerror(errno)));
|
||||
return false;
|
||||
}
|
||||
mSyncFd = new gfx::FileHandleWrapper(std::move(fd));
|
||||
mSyncFd = desc.fence()[0];
|
||||
}
|
||||
|
||||
if (desc.semaphoreFd()) {
|
||||
@ -1446,13 +1440,7 @@ bool DMABufSurfaceYUV::ImportSurfaceDescriptor(
|
||||
}
|
||||
|
||||
if (aDesc.fence().Length() > 0) {
|
||||
auto fd = aDesc.fence()[0]->ClonePlatformHandle();
|
||||
if (!fd) {
|
||||
LOGDMABUF(
|
||||
(" failed to get GL fence file descriptor: %s", strerror(errno)));
|
||||
return false;
|
||||
}
|
||||
mSyncFd = new gfx::FileHandleWrapper(std::move(fd));
|
||||
mSyncFd = aDesc.fence()[0];
|
||||
}
|
||||
|
||||
if (aDesc.refCount().Length() > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user