[Impeller] detect mediatek soc and fall back to GLES. (#164126)

If the device is _probably_ mediatek, then use OpenGL. We may relax this
check if the future if we find a mediatek soc that works well w/ Vulkan.
This commit is contained in:
Jonah Williams
2025-02-25 21:07:59 -08:00
committed by GitHub
parent 8bb34f2c20
commit ac9f68b12d

View File

@@ -310,6 +310,11 @@ AndroidRenderingAPI FlutterMain::SelectedRenderingAPI(
return kVulkanUnsupportedFallback;
}
if (__system_property_find("ro.vendor.mediatek.platform") != nullptr) {
// Probably MediaTek. Avoid Vulkan.
return kVulkanUnsupportedFallback;
}
__system_property_get("ro.product.board", product_model);
if (IsKnownBadSOC(product_model)) {
// Avoid using Vulkan on known bad SoCs.