diff --git a/build/external_config/flutter/BUILD.gn b/build/external_config/flutter/BUILD.gn index c07a2f7c..4e0e0661 100644 --- a/build/external_config/flutter/BUILD.gn +++ b/build/external_config/flutter/BUILD.gn @@ -437,8 +437,9 @@ template("flutter_engine_shell") { "$flutter_root/engine/flutter/shell/platform/ohos/platform_task_runner_adapter.cc", "$flutter_root/engine/flutter/shell/platform/ohos/platform_view_ohos.cc", ] - if ((!defined(config.disable_gpu) || !config.disable_gpu) && (!defined( + if ((!defined(config.disable_gpu) || !config.disable_gpu) && (!defined( config.enable_rosen_backend) || !config.enable_rosen_backend)) { + sources += [ "$flutter_root/engine/flutter/shell/platform/ohos/ohos_surface_gl.cc", ]