!238 l2任务管理bug

Merge pull request !238 from obama/d1008
This commit is contained in:
openharmony_ci
2021-10-09 10:30:31 +00:00
committed by Gitee
2 changed files with 8 additions and 0 deletions
+1
View File
@@ -423,6 +423,7 @@ template("flutter_engine_shell") {
"$flutter_root/engine/flutter/shell/platform/ohos/ace_vsync_waiter_embedder.cc",
"$flutter_root/engine/flutter/shell/platform/ohos/ohos_shell_holder.cc",
"$flutter_root/engine/flutter/shell/platform/ohos/ohos_surface_software.cc",
"$flutter_root/engine/flutter/shell/platform/ohos/platform_task_runner.cc",
"$flutter_root/engine/flutter/shell/platform/ohos/platform_task_runner_adapter.cc",
"$flutter_root/engine/flutter/shell/platform/ohos/platform_view_ohos.cc",
]
@@ -27,6 +27,9 @@
#define FML_EMBEDDER_ONLY
#endif
#include "flutter/fml/message_loop.h"
#ifdef OHOS_STANDARD_SYSTEM
#include "flutter/shell/platform/ohos/platform_task_runner.h"
#endif
#include "base/log/log.h"
#include "base/thread/background_task_executor.h"
@@ -89,8 +92,12 @@ FlutterTaskExecutor::~FlutterTaskExecutor()
void FlutterTaskExecutor::InitPlatformThread()
{
#ifdef OHOS_STANDARD_SYSTEM
platformRunner_ = flutter::PlatformTaskRunner::CurrentTaskRunner();
#else
fml::MessageLoop::EnsureInitializedForCurrentThread();
platformRunner_ = fml::MessageLoop::GetCurrent().GetTaskRunner();
#endif
#ifdef ACE_DEBUG
FillTaskTypeTable(TaskType::PLATFORM);