mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[Impeller] Enable mediatek on API 34+. (#165156)
Most of the reported Mediatek issues are API 29/30, maybe up to 31. By 34 it should work, and the mokey device we have works fine with Vulkan and runs on CI. This is necessary to allow MediaTek devices to use HCPP without us having to write a new rendering surface abstraction for GL. This does _not_ enable PowerVR, which is still denylisted in the vulkan backend.
This commit is contained in:
parent
603981008e
commit
d64db52438
@ -32,6 +32,7 @@
|
||||
namespace flutter {
|
||||
|
||||
constexpr int kMinimumAndroidApiLevelForImpeller = 29;
|
||||
constexpr int kMinimumAndroidApiLevelForMediaTekVulkan = 34;
|
||||
|
||||
extern "C" {
|
||||
#if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG
|
||||
@ -324,8 +325,10 @@ AndroidRenderingAPI FlutterMain::SelectedRenderingAPI(
|
||||
return kVulkanUnsupportedFallback;
|
||||
}
|
||||
|
||||
if (__system_property_find("ro.vendor.mediatek.platform") != nullptr) {
|
||||
// Probably MediaTek. Avoid Vulkan.
|
||||
if (api_level < kMinimumAndroidApiLevelForMediaTekVulkan &&
|
||||
__system_property_find("ro.vendor.mediatek.platform") != nullptr) {
|
||||
// Probably MediaTek. Avoid Vulkan if older than 34 to work around
|
||||
// crashes when importing AHB.
|
||||
return kVulkanUnsupportedFallback;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user