Bug 1742229 - Firefox doesn't use modifiers for YUV surfaces r=stransky

Firefox is not setting the modifiers for YUV surfaces causing the import of surfaces that require them to fail.

Differential Revision: https://phabricator.services.mozilla.com/D131772
This commit is contained in:
elfarto 2021-11-23 08:27:48 +00:00
parent 88d64b75bb
commit ff07766ece

View File

@ -1152,7 +1152,15 @@ bool DMABufSurfaceYUV::CreateTexture(GLContext* aGLContext, int aPlane) {
attribs.AppendElement(LOCAL_EGL_DMA_BUF_PLANE##plane_idx##_OFFSET_EXT); \
attribs.AppendElement((int)mOffsets[aPlane]); \
attribs.AppendElement(LOCAL_EGL_DMA_BUF_PLANE##plane_idx##_PITCH_EXT); \
attribs.AppendElement((int)mStrides[aPlane]);
attribs.AppendElement((int)mStrides[aPlane]); \
if (mBufferModifier != DRM_FORMAT_MOD_INVALID) { \
attribs.AppendElement( \
LOCAL_EGL_DMA_BUF_PLANE##plane_idx##_MODIFIER_LO_EXT); \
attribs.AppendElement(mBufferModifier & 0xFFFFFFFF); \
attribs.AppendElement( \
LOCAL_EGL_DMA_BUF_PLANE##plane_idx##_MODIFIER_HI_EXT); \
attribs.AppendElement(mBufferModifier >> 32); \
}
ADD_PLANE_ATTRIBS_NV12(0);
#undef ADD_PLANE_ATTRIBS_NV12
attribs.AppendElement(LOCAL_EGL_NONE);