mirror of
https://github.com/openharmony/ace_ace_engine.git
synced 2026-07-21 01:45:30 -04:00
Vendored
+1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user