diff --git a/widget/android/GfxInfo.cpp b/widget/android/GfxInfo.cpp index d50e413f8525..6a587c40e008 100644 --- a/widget/android/GfxInfo.cpp +++ b/widget/android/GfxInfo.cpp @@ -697,6 +697,20 @@ nsresult GfxInfo::GetFeatureStatusImpl( return NS_OK; } + if (aFeature == FEATURE_GPU_PROCESS) { + // On Android 12 the EGL context isn't correctly detached from the Surface + // when the process dies, meaning we are subsequently unable to create new + // EGL contexts. Block the GPU process on Android 12 and above until we find + // a solution. See bug 1762025. + if (mSDKVersion >= 31) { + *aStatus = nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION; + aFailureId = "FEATURE_FAILURE_ANDROID_12"; + } else { + *aStatus = nsIGfxInfo::FEATURE_STATUS_OK; + } + return NS_OK; + } + return GfxInfoBase::GetFeatureStatusImpl( aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, aFailureId, &os); }