Bug 1571838 - Backed out changeset a6f3fd30a0a7 (bug 1443181). r=jbonisteel

Differential Revision: https://phabricator.services.mozilla.com/D43080

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Lee Salzman 2019-08-22 15:15:08 +00:00
parent 8e0abb2869
commit abec95ddc1

View File

@ -280,6 +280,8 @@ AngleErrorReporting gAngleErrorReporter;
static EGLDisplay GetAndInitDisplayForAccelANGLE(
GLLibraryEGL& egl, nsACString* const out_failureId) {
EGLDisplay ret = 0;
if (wr::RenderThread::IsInRenderThread()) {
return GetAndInitDisplayForWebRender(egl, EGL_DEFAULT_DISPLAY);
}
@ -303,21 +305,16 @@ static EGLDisplay GetAndInitDisplayForAccelANGLE(
// will live longer than the ANGLE display so we're fine.
});
EGLDisplay ret = nullptr;
if (d3d11ANGLE.IsEnabled()) {
ret = egl.fGetDisplay(
EGL_DEFAULT_DISPLAY); // This will try d3d11, then d3d9.
} else {
// D3D9-only.
const EGLint attribs[] = {LOCAL_EGL_PLATFORM_ANGLE_TYPE_ANGLE,
LOCAL_EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE,
LOCAL_EGL_NONE};
ret = egl.fGetPlatformDisplayEXT(LOCAL_EGL_PLATFORM_ANGLE_ANGLE,
EGL_DEFAULT_DISPLAY, attribs);
if (gfxConfig::IsForcedOnByUser(Feature::D3D11_HW_ANGLE)) {
return GetAndInitDisplay(egl, LOCAL_EGL_D3D11_ONLY_DISPLAY_ANGLE);
}
if (ret && !egl.fInitialize(ret, nullptr, nullptr)) {
ret = nullptr;
if (d3d11ANGLE.IsEnabled()) {
ret = GetAndInitDisplay(egl, LOCAL_EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE);
}
if (!ret) {
ret = GetAndInitDisplay(egl, EGL_DEFAULT_DISPLAY);
}
if (!ret && out_failureId->IsEmpty()) {