--- a/dom/canvas/WebGLContextValidate.cpp
+++ b/dom/canvas/WebGLContextValidate.cpp
@@ -1,17 +1,17 @@
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "WebGLContext.h"
#include <algorithm>
-#include "angle/ShaderLang.h"
+#include "GLSLANG/ShaderLang.h"
#include "CanvasUtils.h"
#include "gfxPrefs.h"
#include "GLContext.h"
#include "jsfriendapi.h"
#include "mozilla/CheckedInt.h"
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
#include "nsIObserverService.h"
--- a/dom/canvas/WebGLShader.cpp
+++ b/dom/canvas/WebGLShader.cpp
@@ -1,16 +1,16 @@
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "WebGLShader.h"
-#include "angle/ShaderLang.h"
+#include "GLSLANG/ShaderLang.h"
#include "GLContext.h"
#include "mozilla/dom/WebGLRenderingContextBinding.h"
#include "mozilla/MemoryReporting.h"
#include "nsPrintfCString.h"
#include "nsString.h"
#include "prenv.h"
#include "WebGLContext.h"
#include "WebGLObjectModel.h"
--- a/dom/canvas/WebGLShaderValidator.cpp
+++ b/dom/canvas/WebGLShaderValidator.cpp
@@ -1,16 +1,15 @@
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "WebGLShaderValidator.h"
-#include "angle/ShaderLang.h"
#include "gfxPrefs.h"
#include "GLContext.h"
#include "mozilla/Preferences.h"
#include "MurmurHash3.h"
#include "nsPrintfCString.h"
#include <string>
#include <vector>
#include "WebGLContext.h"
@@ -433,17 +432,17 @@ ShaderValidator::CalcNumSamplerUniforms(
const std::vector<sh::Uniform>& uniforms = *sh::GetUniforms(mHandle);
for (auto itr = uniforms.begin(); itr != uniforms.end(); ++itr) {
GLenum type = itr->type;
if (type == LOCAL_GL_SAMPLER_2D ||
type == LOCAL_GL_SAMPLER_CUBE)
{
- accum += itr->arraySize;
+ accum += itr->getArraySizeProduct();
}
}
return accum;
}
size_t
ShaderValidator::NumAttributes() const
--- a/dom/canvas/WebGLShaderValidator.h
+++ b/dom/canvas/WebGLShaderValidator.h
@@ -1,17 +1,17 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef WEBGL_SHADER_VALIDATOR_H_
#define WEBGL_SHADER_VALIDATOR_H_
-#include "angle/ShaderLang.h"
+#include "GLSLANG/ShaderLang.h"
#include "GLDefs.h"
#include "nsString.h"
#include <string>
namespace mozilla {
namespace webgl {
class ShaderValidator final
--- a/dom/canvas/moz.build
+++ b/dom/canvas/moz.build
@@ -186,31 +186,35 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
SOURCES['MurmurHash3.cpp'].flags += ['-Wno-implicit-fallthrough']
LOCAL_INCLUDES += [
'/js/xpconnect/wrappers',
]
include('/ipc/chromium/chromium-config.mozbuild')
+
+USE_LIBS += [ 'translator' ] # Grab the Angle shader translator.
+
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'/dom/base',
'/dom/html',
'/dom/svg',
'/dom/workers',
'/dom/xul',
+ '/gfx/angle/checkout/include',
'/gfx/gl',
'/image',
'/js/xpconnect/src',
'/layout/generic',
'/layout/style',
'/layout/xul',
'/media/libyuv/libyuv/include',
]
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CXXFLAGS += CONFIG['TK_CFLAGS']
LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
- CXXFLAGS += ['-Wno-error=shadow']
+ CXXFLAGS += ['-Wno-error=shadow', '-Wno-missing-braces']
--- a/gfx/gl/GLBlitHelperD3D.cpp
+++ b/gfx/gl/GLBlitHelperD3D.cpp
@@ -19,36 +19,34 @@
namespace mozilla {
namespace gl {
static EGLStreamKHR
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))
+ !egl.IsExtensionSupported(GLLibraryEGL::ANGLE_stream_producer_d3d_texture))
{
return 0;
}
const auto& display = egl.Display();
const auto stream = egl.fCreateStreamKHR(display, nullptr);
MOZ_ASSERT(stream);
if (!stream)
return 0;
bool ok = true;
MOZ_ALWAYS_TRUE( ok &= bool(egl.fStreamConsumerGLTextureExternalAttribsNV(display,
stream,
nullptr)) );
- MOZ_ALWAYS_TRUE( ok &= bool(egl.fCreateStreamProducerD3DTextureNV12ANGLE(display,
- stream,
- nullptr)) );
- MOZ_ALWAYS_TRUE( ok &= bool(egl.fStreamPostD3DTextureNV12ANGLE(display, stream,
- texD3D,
- postAttribs)) );
+ MOZ_ALWAYS_TRUE( ok &= bool(egl.fCreateStreamProducerD3DTextureANGLE(display, stream,
+ nullptr)) );
+ MOZ_ALWAYS_TRUE( ok &= bool(egl.fStreamPostD3DTextureANGLE(display, stream, texD3D,
+ postAttribs)) );
if (ok)
return stream;
(void)egl.fDestroyStreamKHR(display, stream);
return 0;
}
static RefPtr<ID3D11Texture2D>
@@ -278,16 +276,20 @@ GLBlitHelper::BlitDescriptor(const layer
LOCAL_EGL_NATIVE_BUFFER_PLANE_OFFSET_IMG, 1,
LOCAL_EGL_NONE
};
const EGLAttrib* const postAttribsList[2] = { postAttribs0, postAttribs1 };
// /layers/d3d11/CompositorD3D11.cpp uses bt601 for EffectTypes::NV12.
//return BlitAngleNv12(tex, YUVColorSpace::BT601, destSize, destOrigin);
const BindAnglePlanes bindPlanes(this, 2, texList, postAttribsList);
+ if (!bindPlanes.Success()) {
+ MOZ_ASSERT(false, "BindAnglePlanes failed.");
+ return false;
+ }
D3D11_TEXTURE2D_DESC texDesc = {0};
tex->GetDesc(&texDesc);
const gfx::IntSize ySize(texDesc.Width, texDesc.Height);
const gfx::IntSize divisors(2, 2);
MOZ_ASSERT(ySize.width % divisors.width == 0);
MOZ_ASSERT(ySize.height % divisors.height == 0);
--- a/gfx/gl/GLDefs.h
+++ b/gfx/gl/GLDefs.h
@@ -36,17 +36,17 @@
#define LOCAL_EGL_PLATFORM_ANGLE_TYPE_ANGLE 0x3203
#define LOCAL_EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE 0x3204
#define LOCAL_EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE 0x3205
#define LOCAL_EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE 0x3206
// EGL_ANGLE_keyed_mutex
#define LOCAL_EGL_DXGI_KEYED_MUTEX_ANGLE 0x33A2
-// EGL_ANGLE_stream_producer_d3d_texture_nv12
+// EGL_ANGLE_stream_producer_d3d_texture
#define LOCAL_EGL_D3D_TEXTURE_SUBRESOURCE_ID_ANGLE 0x33AB
// EGL_ANGLE_platform_angle_d3d
#define LOCAL_EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3207
#define LOCAL_EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208
#define LOCAL_EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE 0x3209
#define LOCAL_EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE 0x320A
#define LOCAL_EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE 0x320B
--- a/gfx/gl/GLLibraryEGL.cpp
+++ b/gfx/gl/GLLibraryEGL.cpp
@@ -1,15 +1,14 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "GLLibraryEGL.h"
-#include "angle/Platform.h"
#include "gfxConfig.h"
#include "gfxCrashReporterUtils.h"
#include "gfxUtils.h"
#include "mozilla/Preferences.h"
#include "mozilla/Assertions.h"
#include "mozilla/Telemetry.h"
#include "mozilla/Tokenizer.h"
#include "mozilla/ScopeExit.h"
@@ -54,17 +53,17 @@ static const char* sEGLExtensionNames[]
"EGL_ANGLE_platform_angle",
"EGL_ANGLE_platform_angle_d3d",
"EGL_ANGLE_d3d_share_handle_client_buffer",
"EGL_KHR_create_context",
"EGL_KHR_stream",
"EGL_KHR_stream_consumer_gltexture",
"EGL_EXT_device_query",
"EGL_NV_stream_consumer_gltexture_yuv",
- "EGL_ANGLE_stream_producer_d3d_texture_nv12",
+ "EGL_ANGLE_stream_producer_d3d_texture",
"EGL_ANGLE_device_creation",
"EGL_ANGLE_device_creation_d3d11",
};
#if defined(ANDROID)
static PRLibrary* LoadApitraceLibrary()
{
@@ -692,25 +691,25 @@ GLLibraryEGL::EnsureInitialized(bool for
END_OF_SYMBOLS
};
if (!fnLoadSymbols(nvStreamSymbols)) {
NS_ERROR("EGL supports NV_stream_consumer_gltexture_yuv without exposing its functions!");
MarkExtensionUnsupported(NV_stream_consumer_gltexture_yuv);
}
}
- if (IsExtensionSupported(ANGLE_stream_producer_d3d_texture_nv12)) {
+ if (IsExtensionSupported(ANGLE_stream_producer_d3d_texture)) {
const GLLibraryLoader::SymLoadStruct nvStreamSymbols[] = {
- SYMBOL(CreateStreamProducerD3DTextureNV12ANGLE),
- SYMBOL(StreamPostD3DTextureNV12ANGLE),
+ SYMBOL(CreateStreamProducerD3DTextureANGLE),
+ SYMBOL(StreamPostD3DTextureANGLE),
END_OF_SYMBOLS
};
if (!fnLoadSymbols(nvStreamSymbols)) {
- NS_ERROR("EGL supports ANGLE_stream_producer_d3d_texture_nv12 without exposing its functions!");
- MarkExtensionUnsupported(ANGLE_stream_producer_d3d_texture_nv12);
+ NS_ERROR("EGL supports ANGLE_stream_producer_d3d_texture without exposing its functions!");
+ MarkExtensionUnsupported(ANGLE_stream_producer_d3d_texture);
}
}
mInitialized = true;
reporter.SetSuccessful();
return true;
}
--- a/gfx/gl/GLLibraryEGL.h
+++ b/gfx/gl/GLLibraryEGL.h
@@ -89,17 +89,17 @@ public:
ANGLE_platform_angle,
ANGLE_platform_angle_d3d,
ANGLE_d3d_share_handle_client_buffer,
KHR_create_context,
KHR_stream,
KHR_stream_consumer_gltexture,
EXT_device_query,
NV_stream_consumer_gltexture_yuv,
- ANGLE_stream_producer_d3d_texture_nv12,
+ ANGLE_stream_producer_d3d_texture,
ANGLE_device_creation,
ANGLE_device_creation_d3d11,
Extensions_Max
};
bool IsExtensionSupported(EGLExtensions aKnownExtension) const {
return mAvailableExtensions[aKnownExtension];
}
@@ -302,22 +302,22 @@ public:
EGLBoolean fQueryDeviceAttribEXT(EGLDeviceEXT device, EGLint attribute, EGLAttrib* value) const
WRAP( fQueryDeviceAttribEXT(device, attribute, value) )
// NV_stream_consumer_gltexture_yuv
EGLBoolean fStreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib* attrib_list) const
WRAP( fStreamConsumerGLTextureExternalAttribsNV(dpy, stream, attrib_list) )
- // ANGLE_stream_producer_d3d_texture_nv12
- EGLBoolean fCreateStreamProducerD3DTextureNV12ANGLE(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib* attrib_list) const
- WRAP( fCreateStreamProducerD3DTextureNV12ANGLE(dpy, stream, attrib_list) )
+ // ANGLE_stream_producer_d3d_texture
+ EGLBoolean fCreateStreamProducerD3DTextureANGLE(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib* attrib_list) const
+ WRAP( fCreateStreamProducerD3DTextureANGLE(dpy, stream, attrib_list) )
- EGLBoolean fStreamPostD3DTextureNV12ANGLE(EGLDisplay dpy, EGLStreamKHR stream, void* texture, const EGLAttrib* attrib_list) const
- WRAP( fStreamPostD3DTextureNV12ANGLE(dpy, stream, texture, attrib_list) )
+ EGLBoolean fStreamPostD3DTextureANGLE(EGLDisplay dpy, EGLStreamKHR stream, void* texture, const EGLAttrib* attrib_list) const
+ WRAP( fStreamPostD3DTextureANGLE(dpy, stream, texture, attrib_list) )
// ANGLE_device_creation
EGLDeviceEXT fCreateDeviceANGLE(EGLint device_type, void* native_device, const EGLAttrib* attrib_list) const
WRAP( fCreateDeviceANGLE(device_type, native_device, attrib_list) )
EGLBoolean fReleaseDeviceANGLE(EGLDeviceEXT device)
WRAP( fReleaseDeviceANGLE(device) )
@@ -464,24 +464,24 @@ private:
EGLAttrib* value);
EGLBoolean (GLAPIENTRY * fQueryDeviceAttribEXT)(EGLDeviceEXT device,
EGLint attribute,
EGLAttrib* value);
// NV_stream_consumer_gltexture_yuv
EGLBoolean (GLAPIENTRY * fStreamConsumerGLTextureExternalAttribsNV)(EGLDisplay dpy,
EGLStreamKHR stream,
const EGLAttrib* attrib_list);
- // ANGLE_stream_producer_d3d_texture_nv12
- EGLBoolean (GLAPIENTRY * fCreateStreamProducerD3DTextureNV12ANGLE)(EGLDisplay dpy,
- EGLStreamKHR stream,
- const EGLAttrib* attrib_list);
- EGLBoolean (GLAPIENTRY * fStreamPostD3DTextureNV12ANGLE)(EGLDisplay dpy,
- EGLStreamKHR stream,
- void* texture,
- const EGLAttrib* attrib_list);
+ // ANGLE_stream_producer_d3d_texture
+ EGLBoolean (GLAPIENTRY * fCreateStreamProducerD3DTextureANGLE)(EGLDisplay dpy,
+ EGLStreamKHR stream,
+ const EGLAttrib* attrib_list);
+ EGLBoolean (GLAPIENTRY * fStreamPostD3DTextureANGLE)(EGLDisplay dpy,
+ EGLStreamKHR stream,
+ void* texture,
+ const EGLAttrib* attrib_list);
// ANGLE_device_creation
EGLDeviceEXT (GLAPIENTRY * fCreateDeviceANGLE) (EGLint device_type,
void* native_device,
const EGLAttrib* attrib_list);
EGLBoolean (GLAPIENTRY * fReleaseDeviceANGLE) (EGLDeviceEXT device);
} mSymbols;
--- a/gfx/webrender_bindings/RenderD3D11TextureHostOGL.cpp
+++ b/gfx/webrender_bindings/RenderD3D11TextureHostOGL.cpp
@@ -65,20 +65,20 @@ RenderDXGITextureHostOGL::EnsureLockable
{
if (mTextureHandle[0]) {
return true;
}
const auto& egl = &gl::sEGLLibrary;
// We use EGLStream to get the converted gl handle from d3d texture. The
- // NV_stream_consumer_gltexture_yuv and ANGLE_stream_producer_d3d_texture_nv12
+ // NV_stream_consumer_gltexture_yuv and ANGLE_stream_producer_d3d_texture
// could support nv12 and rgb d3d texture format.
if (!egl->IsExtensionSupported(gl::GLLibraryEGL::NV_stream_consumer_gltexture_yuv) ||
- !egl->IsExtensionSupported(gl::GLLibraryEGL::ANGLE_stream_producer_d3d_texture_nv12)) {
+ !egl->IsExtensionSupported(gl::GLLibraryEGL::ANGLE_stream_producer_d3d_texture)) {
return false;
}
// Fetch the D3D11 device.
EGLDeviceEXT eglDevice = nullptr;
egl->fQueryDisplayAttribEXT(egl->Display(), LOCAL_EGL_DEVICE_EXT, (EGLAttrib*)&eglDevice);
MOZ_ASSERT(eglDevice);
ID3D11Device* device = nullptr;
@@ -106,17 +106,17 @@ RenderDXGITextureHostOGL::EnsureLockable
// The non-nv12 format.
mGL->fGenTextures(1, mTextureHandle);
mGL->fActiveTexture(LOCAL_GL_TEXTURE0);
mGL->fBindTexture(LOCAL_GL_TEXTURE_EXTERNAL_OES, mTextureHandle[0]);
mGL->fTexParameteri(LOCAL_GL_TEXTURE_EXTERNAL_OES, LOCAL_GL_TEXTURE_MIN_FILTER, LOCAL_GL_LINEAR);
MOZ_ALWAYS_TRUE(egl->fStreamConsumerGLTextureExternalAttribsNV(egl->Display(), mStream, nullptr));
- MOZ_ALWAYS_TRUE(egl->fCreateStreamProducerD3DTextureNV12ANGLE(egl->Display(), mStream, nullptr));
+ MOZ_ALWAYS_TRUE(egl->fCreateStreamProducerD3DTextureANGLE(egl->Display(), mStream, nullptr));
} else {
// The nv12 format.
// Setup the NV12 stream consumer/producer.
EGLAttrib consumerAttributes[] = {
LOCAL_EGL_COLOR_BUFFER_TYPE,
LOCAL_EGL_YUV_BUFFER_EXT,
LOCAL_EGL_YUV_NUMBER_OF_PLANES_EXT,
@@ -130,21 +130,21 @@ RenderDXGITextureHostOGL::EnsureLockable
mGL->fGenTextures(2, mTextureHandle);
mGL->fActiveTexture(LOCAL_GL_TEXTURE0);
mGL->fBindTexture(LOCAL_GL_TEXTURE_EXTERNAL_OES, mTextureHandle[0]);
mGL->fTexParameteri(LOCAL_GL_TEXTURE_EXTERNAL_OES, LOCAL_GL_TEXTURE_MIN_FILTER, LOCAL_GL_LINEAR);
mGL->fActiveTexture(LOCAL_GL_TEXTURE1);
mGL->fBindTexture(LOCAL_GL_TEXTURE_EXTERNAL_OES, mTextureHandle[1]);
mGL->fTexParameteri(LOCAL_GL_TEXTURE_EXTERNAL_OES, LOCAL_GL_TEXTURE_MIN_FILTER, LOCAL_GL_LINEAR);
MOZ_ALWAYS_TRUE(egl->fStreamConsumerGLTextureExternalAttribsNV(egl->Display(), mStream, consumerAttributes));
- MOZ_ALWAYS_TRUE(egl->fCreateStreamProducerD3DTextureNV12ANGLE(egl->Display(), mStream, nullptr));
+ MOZ_ALWAYS_TRUE(egl->fCreateStreamProducerD3DTextureANGLE(egl->Display(), mStream, nullptr));
}
// Insert the d3d texture.
- MOZ_ALWAYS_TRUE(egl->fStreamPostD3DTextureNV12ANGLE(egl->Display(), mStream, (void*)mTexture.get(), nullptr));
+ MOZ_ALWAYS_TRUE(egl->fStreamPostD3DTextureANGLE(egl->Display(), mStream, (void*)mTexture.get(), nullptr));
// Now, we could get the gl handle from the stream.
egl->fStreamConsumerAcquireKHR(egl->Display(), mStream);
MOZ_ASSERT(egl->fGetError() == LOCAL_EGL_SUCCESS);
return true;
}
@@ -272,17 +272,17 @@ RenderDXGIYCbCrTextureHostOGL::EnsureLoc
}
const auto& egl = &gl::sEGLLibrary;
// The eglCreatePbufferFromClientBuffer doesn't support R8 format, so we
// use EGLStream to get the converted gl handle from d3d R8 texture.
if (!egl->IsExtensionSupported(gl::GLLibraryEGL::NV_stream_consumer_gltexture_yuv) ||
- !egl->IsExtensionSupported(gl::GLLibraryEGL::ANGLE_stream_producer_d3d_texture_nv12))
+ !egl->IsExtensionSupported(gl::GLLibraryEGL::ANGLE_stream_producer_d3d_texture))
{
return false;
}
// Fetch the D3D11 device.
EGLDeviceEXT eglDevice = nullptr;
egl->fQueryDisplayAttribEXT(egl->Display(), LOCAL_EGL_DEVICE_EXT, (EGLAttrib*)&eglDevice);
MOZ_ASSERT(eglDevice);
@@ -313,20 +313,20 @@ RenderDXGIYCbCrTextureHostOGL::EnsureLoc
mGL->fBindTexture(LOCAL_GL_TEXTURE_EXTERNAL_OES, mTextureHandles[i]);
mGL->fTexParameteri(LOCAL_GL_TEXTURE_EXTERNAL_OES, LOCAL_GL_TEXTURE_MIN_FILTER, LOCAL_GL_LINEAR);
// Create the EGLStream.
mStreams[i] = egl->fCreateStreamKHR(egl->Display(), nullptr);
MOZ_ASSERT(mStreams[i]);
MOZ_ALWAYS_TRUE(egl->fStreamConsumerGLTextureExternalAttribsNV(egl->Display(), mStreams[i], nullptr));
- MOZ_ALWAYS_TRUE(egl->fCreateStreamProducerD3DTextureNV12ANGLE(egl->Display(), mStreams[i], nullptr));
+ MOZ_ALWAYS_TRUE(egl->fCreateStreamProducerD3DTextureANGLE(egl->Display(), mStreams[i], nullptr));
// Insert the R8 texture.
- MOZ_ALWAYS_TRUE(egl->fStreamPostD3DTextureNV12ANGLE(egl->Display(), mStreams[i], (void*)mTextures[i].get(), nullptr));
+ MOZ_ALWAYS_TRUE(egl->fStreamPostD3DTextureANGLE(egl->Display(), mStreams[i], (void*)mTextures[i].get(), nullptr));
// Now, we could get the R8 gl handle from the stream.
egl->fStreamConsumerAcquireKHR(egl->Display(), mStreams[i]);
MOZ_ASSERT(egl->fGetError() == LOCAL_EGL_SUCCESS);
}
return true;
}