зеркало из https://github.com/mozilla/gecko-dev.git
Bug 713369 - don't try to fall back to another GL provider, if one GL provider gives a WebGL initialization error - r=jgilbert
This commit is contained in:
Родитель
17e3647e65
Коммит
ba846acb30
|
@ -614,35 +614,32 @@ WebGLContext::SetDimensions(PRInt32 width, PRInt32 height)
|
|||
gl->SetFlushGuaranteesResolve(true);
|
||||
}
|
||||
} else {
|
||||
gl = nsnull;
|
||||
LogMessage("Error during ANGLE OpenGL ES initialization");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if it failed, then try the default provider, whatever that is
|
||||
if (!gl && useOpenGL) {
|
||||
gl = gl::GLContextProvider::CreateOffscreen(gfxIntSize(width, height), format);
|
||||
if (gl && !InitAndValidateGL()) {
|
||||
gl = nsnull;
|
||||
}
|
||||
}
|
||||
#else
|
||||
// other platforms just use whatever the default is
|
||||
if (!gl && useOpenGL) {
|
||||
gl = gl::GLContextProvider::CreateOffscreen(gfxIntSize(width, height), format);
|
||||
if (gl && !InitAndValidateGL()) {
|
||||
gl = nsnull;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// try the default provider, whatever that is
|
||||
if (!gl && useOpenGL) {
|
||||
gl = gl::GLContextProvider::CreateOffscreen(gfxIntSize(width, height), format);
|
||||
if (gl && !InitAndValidateGL()) {
|
||||
LogMessage("Error during OpenGL initialization");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
// finally, try OSMesa
|
||||
if (!gl) {
|
||||
gl = gl::GLContextProviderOSMesa::CreateOffscreen(gfxIntSize(width, height), format);
|
||||
if (!gl || !InitAndValidateGL()) {
|
||||
gl = nsnull;
|
||||
} else {
|
||||
LogMessage("Using software rendering via OSMesa (THIS WILL BE SLOW)");
|
||||
if (gl) {
|
||||
if (!InitAndValidateGL()) {
|
||||
LogMessage("Error during OSMesa initialization");
|
||||
return NS_ERROR_FAILURE;
|
||||
} else {
|
||||
LogMessage("Using software rendering via OSMesa (THIS WILL BE SLOW)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче