Skip to content

Commit bb27645

Browse files
committed
Log fallback reasons at INFO
1 parent 6ce9abd commit bb27645

2 files changed

Lines changed: 14 additions & 15 deletions

File tree

‎engine/src/flutter/shell/platform/android/android_context_dynamic_impeller.cc‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ GetActualRenderingAPIForImpeller(
8989
// feature. In these cases it will use OpenGLES.
9090
if (IsDeviceEmulator()) {
9191
// Avoid using Vulkan on known emulators.
92-
FML_LOG(IMPORTANT) << "Emulator detected, falling back to OpenGLES.";
92+
FML_LOG(INFO) << "Emulator detected, falling back to OpenGLES.";
9393
return nullptr;
9494
}
9595

@@ -98,8 +98,8 @@ GetActualRenderingAPIForImpeller(
9898
if (strcmp(property, kAndroidHuawei) == 0) {
9999
// Avoid using Vulkan on Huawei as AHB imports do not
100100
// consistently work.
101-
FML_LOG(IMPORTANT) << "Huawei device detected (ro.com.google.clientidbase="
102-
<< kAndroidHuawei << "), falling back to OpenGLES.";
101+
FML_LOG(INFO) << "Huawei device detected (ro.com.google.clientidbase="
102+
<< kAndroidHuawei << "), falling back to OpenGLES.";
103103
return nullptr;
104104
}
105105

@@ -113,18 +113,17 @@ GetActualRenderingAPIForImpeller(
113113
// Probably MediaTek. Avoid Vulkan if older than 32 to work around
114114
// crashes when importing AHB.
115115
__system_property_get("ro.vendor.mediatek.platform", property);
116-
FML_LOG(IMPORTANT) << "MediaTek vendor API level " << vendor_api_level
117-
<< " is below "
118-
<< kMinimumAndroidApiLevelForMediaTekVulkan
119-
<< " (ro.vendor.mediatek.platform=" << property
120-
<< "), falling back to OpenGLES.";
116+
FML_LOG(INFO) << "MediaTek vendor API level " << vendor_api_level
117+
<< " is below " << kMinimumAndroidApiLevelForMediaTekVulkan
118+
<< " (ro.vendor.mediatek.platform=" << property
119+
<< "), falling back to OpenGLES.";
121120
return nullptr;
122121
}
123122

124123
__system_property_get("ro.product.board", property);
125124
if (IsKnownBadSOC(property)) {
126-
FML_LOG(IMPORTANT) << "Known bad SoC encountered (ro.product.board="
127-
<< property << "), falling back to OpenGLES.";
125+
FML_LOG(INFO) << "Known bad SoC encountered (ro.product.board=" << property
126+
<< "), falling back to OpenGLES.";
128127
return nullptr;
129128
}
130129

@@ -142,7 +141,7 @@ GetActualRenderingAPIForImpeller(
142141
.enable_surface_control = settings.enable_surface_control,
143142
});
144143
if (!vulkan_backend->IsValid()) {
145-
FML_LOG(IMPORTANT)
144+
FML_LOG(INFO)
146145
<< "Could not create a Vulkan context, falling back to OpenGLES.";
147146
return nullptr;
148147
}

‎engine/src/flutter/shell/platform/android/android_context_vk_impeller.cc‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,19 @@ static std::shared_ptr<impeller::Context> CreateImpellerContext(
5555
// identified, before the (expensive) remainder of Vulkan setup runs.
5656
auto selection = impeller::ContextVK::SelectDevice(std::move(settings));
5757
if (!selection.ok()) {
58-
FML_LOG(IMPORTANT) << "Could not select a Vulkan device: "
59-
<< selection.status().message();
58+
FML_LOG(INFO) << "Could not select a Vulkan device: "
59+
<< selection.status().message();
6060
return nullptr;
6161
}
6262
if (selection->driver_info->IsKnownBadDriver()) {
63-
FML_LOG(IMPORTANT) << "Known bad Vulkan driver encountered.";
63+
FML_LOG(INFO) << "Known bad Vulkan driver encountered.";
6464
selection->driver_info->DumpToLog();
6565
return nullptr;
6666
}
6767

6868
auto context = selection->CreateContext();
6969
if (!context) {
70-
FML_LOG(IMPORTANT)
70+
FML_LOG(INFO)
7171
<< "Could not set up the Vulkan context on the selected device.";
7272
return nullptr;
7373
}

0 commit comments

Comments
 (0)