Bug 1396521 - Check that we have ANGLE exts for blitting from d3d. - r=daoshengmu

MozReview-Commit-ID: 3eto0R2Cjwa
This commit is contained in:
Jeff Gilbert 2017-09-05 19:21:55 -07:00
parent 472cb53db6
commit 607fb42383

View File

@ -24,6 +24,12 @@ StreamFromD3DTexture(ID3D11Texture2D* const texD3D,
const EGLAttrib* const postAttribs)
{
auto& egl = sEGLLibrary;
if (!egl.IsExtensionSupported(GLLibraryEGL::NV_stream_consumer_gltexture_yuv) ||
!egl.IsExtensionSupported(GLLibraryEGL::ANGLE_stream_producer_d3d_texture_nv12))
{
return 0;
}
const auto& display = egl.Display();
const auto stream = egl.fCreateStreamKHR(display, nullptr);
MOZ_ASSERT(stream);