зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1807942 [Linux] Don't use dmabuf surface if ExportDMABUFImageMESA() fails to export dmabuf file descriptors r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D169315
This commit is contained in:
Родитель
ea17a88f1e
Коммит
498077e020
|
@ -474,6 +474,17 @@ bool DMABufSurfaceRGBA::Create(mozilla::gl::GLContext* aGLContext,
|
|||
return false;
|
||||
}
|
||||
|
||||
// A broken driver can return dmabuf without valid file descriptors
|
||||
// which leads to fails later so quit now.
|
||||
for (int i = 0; i < mBufferPlaneCount; i++) {
|
||||
if (mDmabufFds[i] < 0) {
|
||||
LOGDMABUF(
|
||||
(" ExportDMABUFImageMESA failed, mDmabufFds[%d] is invalid, quit",
|
||||
i));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
LOGDMABUF((" imported size %d x %d format %x planes %d modifiers %" PRIx64,
|
||||
mWidth, mHeight, mDrmFormats[0], mBufferPlaneCount,
|
||||
mBufferModifiers[0]));
|
||||
|
|
Загрузка…
Ссылка в новой задаче