зеркало из https://github.com/mozilla/pjs.git
Bug 677531 - GLXtest process stays around as zombie until the data is used by GfxInfo - r=matt.woodrow
This gave zombies staying around when using layers.acceleration.force-enabled or .disabled or safe-mode, for instance.
This commit is contained in:
Родитель
ded43a6c4d
Коммит
6e502e8d6f
|
@ -828,22 +828,30 @@ nsBaseWidget::GetShouldAccelerate()
|
|||
if (xr)
|
||||
xr->GetInSafeMode(&safeMode);
|
||||
|
||||
bool whitelisted = false;
|
||||
|
||||
// bug 655578: on X11 at least, we must always call GetFeatureStatus (even if we don't need that information)
|
||||
// as that's what causes GfxInfo initialization which kills the zombie 'glxtest' process.
|
||||
nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
|
||||
if (gfxInfo) {
|
||||
PRInt32 status;
|
||||
if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_OPENGL_LAYERS, &status))) {
|
||||
if (status == nsIGfxInfo::FEATURE_NO_INFO) {
|
||||
whitelisted = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (disableAcceleration || safeMode)
|
||||
return PR_FALSE;
|
||||
|
||||
if (forceAcceleration)
|
||||
return PR_TRUE;
|
||||
|
||||
nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
|
||||
if (gfxInfo) {
|
||||
PRInt32 status;
|
||||
if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_OPENGL_LAYERS, &status))) {
|
||||
if (status != nsIGfxInfo::FEATURE_NO_INFO) {
|
||||
if (!whitelisted) {
|
||||
NS_WARNING("OpenGL-accelerated layers are not supported on this system.");
|
||||
return PR_FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (accelerateByDefault)
|
||||
return PR_TRUE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче