mirror of
https://gitee.com/openharmony/msdp_device_status
synced 2024-11-23 15:40:16 +00:00
eventhandler cut ffrt
Signed-off-by: lwx1285820 <lishaoxiong10@huawei.com>
This commit is contained in:
parent
0460789475
commit
8cd2c8a2be
@ -105,7 +105,7 @@ bool Client::StartEventRunner()
|
||||
{
|
||||
CALL_DEBUG_ENTER;
|
||||
CHK_PID_AND_TID();
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME);
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME, AppExecFwk::ModeThread::FFRT);
|
||||
CHKPF(runner);
|
||||
eventHandler_ = std::make_shared<AppExecFwk::EventHandler>(runner);
|
||||
|
||||
|
@ -158,7 +158,7 @@ void Context::Disable()
|
||||
|
||||
int32_t Context::StartEventHandler()
|
||||
{
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME);
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME, AppExecFwk::ModeThread::FFRT);
|
||||
CHKPR(runner, RET_ERR);
|
||||
eventHandler_ = std::make_shared<AppExecFwk::EventHandler>(runner);
|
||||
return RET_OK;
|
||||
|
@ -35,7 +35,7 @@ const std::string THREAD_NAME { "os_ClientEventHandler" };
|
||||
SocketClient::SocketClient(std::shared_ptr<ITunnelClient> tunnel)
|
||||
: tunnel_(tunnel)
|
||||
{
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME);
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME, AppExecFwk::ModeThread::FFRT);
|
||||
eventHandler_ = std::make_shared<AppExecFwk::EventHandler>(runner);
|
||||
}
|
||||
|
||||
|
@ -716,7 +716,7 @@ void DragDrawing::NotifyDragInfo(const std::string &sourceName, const std::strin
|
||||
std::shared_ptr<AppExecFwk::EventHandler> DragDrawing::GetSuperHubHandler()
|
||||
{
|
||||
if (superHubHandler_ == nullptr) {
|
||||
auto runner = AppExecFwk::EventRunner::Create(SUPER_HUB_THREAD_NAME);
|
||||
auto runner = AppExecFwk::EventRunner::Create(SUPER_HUB_THREAD_NAME, AppExecFwk::ModeThread::FFRT);
|
||||
superHubHandler_ = std::make_shared<AppExecFwk::EventHandler>(std::move(runner));
|
||||
}
|
||||
return superHubHandler_;
|
||||
@ -879,7 +879,7 @@ void DragDrawing::OnDragStyleAnimation()
|
||||
return;
|
||||
}
|
||||
if (handler_ == nullptr) {
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME);
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME, AppExecFwk::ModeThread::FFRT);
|
||||
handler_ = std::make_shared<AppExecFwk::EventHandler>(std::move(runner));
|
||||
}
|
||||
CheckStyleNodeModifier(dragStyleNode);
|
||||
@ -895,7 +895,7 @@ void DragDrawing::OnDragStyle(std::shared_ptr<Rosen::RSCanvasNode> dragStyleNode
|
||||
CHKPV(stylePixelMap);
|
||||
#ifdef OHOS_DRAG_ENABLE_ANIMATION
|
||||
if (handler_ == nullptr) {
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME);
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME, AppExecFwk::ModeThread::FFRT);
|
||||
CHKPV(runner);
|
||||
handler_ = std::make_shared<AppExecFwk::EventHandler>(std::move(runner));
|
||||
}
|
||||
@ -970,7 +970,7 @@ void DragDrawing::OnStopDragSuccess(std::shared_ptr<Rosen::RSCanvasNode> shadowN
|
||||
auto animateCb = [this] { return this->InitVSync(END_ALPHA, END_SCALE_SUCCESS); };
|
||||
#ifdef OHOS_DRAG_ENABLE_ANIMATION
|
||||
ResetAnimationParameter();
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME);
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME, AppExecFwk::ModeThread::FFRT);
|
||||
CHKPV(runner);
|
||||
handler_ = std::make_shared<AppExecFwk::EventHandler>(std::move(runner));
|
||||
if (!handler_->PostTask([this] { return this->OnStopAnimationSuccess(); })) {
|
||||
@ -1034,7 +1034,7 @@ void DragDrawing::OnStopDragFail(std::shared_ptr<Rosen::RSSurfaceNode> surfaceNo
|
||||
auto animateCb = [this] { return this->InitVSync(END_ALPHA, END_SCALE_FAIL); };
|
||||
#ifdef OHOS_DRAG_ENABLE_ANIMATION
|
||||
ResetAnimationParameter();
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME);
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME, AppExecFwk::ModeThread::FFRT);
|
||||
CHKPV(runner);
|
||||
handler_ = std::make_shared<AppExecFwk::EventHandler>(std::move(runner));
|
||||
if (!handler_->PostTask([this] { this->OnStopAnimationFail(); })) {
|
||||
@ -1056,7 +1056,7 @@ int32_t DragDrawing::RunAnimation(std::function<int32_t()> cb)
|
||||
{
|
||||
FI_HILOGD("enter");
|
||||
ResetAnimationParameter();
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME);
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME, AppExecFwk::ModeThread::FFRT);
|
||||
CHKPR(runner, RET_ERR);
|
||||
handler_ = std::make_shared<AppExecFwk::EventHandler>(std::move(runner));
|
||||
if (!handler_->PostTask(cb)) {
|
||||
|
@ -96,7 +96,7 @@ int32_t DragVSyncStation::Init()
|
||||
return RET_OK;
|
||||
}
|
||||
if (handler_ == nullptr) {
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME);
|
||||
auto runner = AppExecFwk::EventRunner::Create(THREAD_NAME, AppExecFwk::ModeThread::FFRT);
|
||||
handler_ = std::make_shared<AppExecFwk::EventHandler>(std::move(runner));
|
||||
SetThreadQosLevel(handler_);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user