From f6a28108410965c4cee7f782ea13e3623b412a30 Mon Sep 17 00:00:00 2001 From: Gary Qian Date: Thu, 1 Jun 2017 17:50:03 -0700 Subject: [PATCH] Add software as fallback if Vulkan and OpenGL fails (flutter/engine#3725) --- .../shell/platform/android/platform_view_android.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/android/platform_view_android.cc b/engine/src/flutter/shell/platform/android/platform_view_android.cc index 3d4d85272e..be44b43251 100644 --- a/engine/src/flutter/shell/platform/android/platform_view_android.cc +++ b/engine/src/flutter/shell/platform/android/platform_view_android.cc @@ -112,7 +112,12 @@ static std::unique_ptr 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; }