зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1443181
- If ANGLE D3D11 disabled, ask for D3D9 explicitly. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D37351 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
3ee5aa5125
Коммит
e10bec305a
|
@ -279,8 +279,6 @@ AngleErrorReporting gAngleErrorReporter;
|
|||
|
||||
static EGLDisplay GetAndInitDisplayForAccelANGLE(
|
||||
GLLibraryEGL& egl, nsACString* const out_failureId) {
|
||||
EGLDisplay ret = 0;
|
||||
|
||||
if (wr::RenderThread::IsInRenderThread()) {
|
||||
return GetAndInitDisplayForWebRender(egl, EGL_DEFAULT_DISPLAY);
|
||||
}
|
||||
|
@ -304,16 +302,21 @@ static EGLDisplay GetAndInitDisplayForAccelANGLE(
|
|||
// will live longer than the ANGLE display so we're fine.
|
||||
});
|
||||
|
||||
if (gfxConfig::IsForcedOnByUser(Feature::D3D11_HW_ANGLE)) {
|
||||
return GetAndInitDisplay(egl, LOCAL_EGL_D3D11_ONLY_DISPLAY_ANGLE);
|
||||
}
|
||||
|
||||
EGLDisplay ret = nullptr;
|
||||
if (d3d11ANGLE.IsEnabled()) {
|
||||
ret = GetAndInitDisplay(egl, LOCAL_EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE);
|
||||
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 (!ret) {
|
||||
ret = GetAndInitDisplay(egl, EGL_DEFAULT_DISPLAY);
|
||||
if (ret && !egl.fInitialize(ret, nullptr, nullptr)) {
|
||||
ret = nullptr;
|
||||
}
|
||||
|
||||
if (!ret && out_failureId->IsEmpty()) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче