Add software as fallback if Vulkan and OpenGL fails (flutter/engine#3725)

This commit is contained in:
Gary Qian
2017-06-01 17:50:03 -07:00
committed by GitHub
parent d77f805ffe
commit f6a2810841

View File

@@ -112,7 +112,12 @@ static std::unique_ptr<AndroidSurface> InitializePlatformSurface() {
return surface;
}
FTL_CHECK(false) << "Could not initialize either the Vulkan or OpenGL "
if (auto surface = InitializePlatformSurfaceSoftware()) {
FTL_DLOG(INFO) << "Software surface initialized.";
return surface;
}
FTL_CHECK(false) << "Could not initialize either the Vulkan, OpenGL, or Software"
"surface backends. Flutter requires a GPU to render.";
return nullptr;
}