Bug 1665815 - Avoid using scissored glClear() on Android Emulator with SwiftShader r=geckoview-reviewers,jnicol,agi

Emulator with SwiftShader is buggy when attempting to clear picture cache textures with a scissor rect set.

Differential Revision: https://phabricator.services.mozilla.com/D90644
This commit is contained in:
sotaro 2020-09-24 09:43:21 +00:00
Родитель 2129e51ab1
Коммит ef4c798491
1 изменённых файлов: 16 добавлений и 0 удалений

Просмотреть файл

@ -599,6 +599,22 @@ nsresult GfxInfo::GetFeatureStatusImpl(
}
return NS_OK;
}
if (aFeature == FEATURE_WEBRENDER_SCISSORED_CACHE_CLEARS) {
// Emulator with SwiftShader is buggy when attempting to clear picture
// cache textures with a scissor rect set.
const bool isEmulatorSwiftShader =
mGLStrings->Renderer().Find(
"Android Emulator OpenGL ES Translator (Google SwiftShader)") >=
0;
if (isEmulatorSwiftShader) {
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
aFailureId = "FEATURE_FAILURE_BUG_1603515";
} else {
*aStatus = nsIGfxInfo::FEATURE_STATUS_OK;
}
return NS_OK;
}
}
return GfxInfoBase::GetFeatureStatusImpl(