From 29e97f56fc4728d08ac28710cded8a88d8f163db Mon Sep 17 00:00:00 2001 From: guanzengkun Date: Sun, 11 Jun 2023 10:49:39 +0800 Subject: [PATCH] Description: Optimize function calls to improve performance IssueNo: https://gitee.com/openharmony/arkui_ui_lite/issues/I7CICL Feature or Bugfix: Feature Binary Source:No Signed-off-by: guanzengkun --- frameworks/wms/lite_proxy_windows_manager.cpp | 5 +++-- services/wms/lite_win.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frameworks/wms/lite_proxy_windows_manager.cpp b/frameworks/wms/lite_proxy_windows_manager.cpp index d2d9888..8cb7033 100644 --- a/frameworks/wms/lite_proxy_windows_manager.cpp +++ b/frameworks/wms/lite_proxy_windows_manager.cpp @@ -25,8 +25,9 @@ int LiteProxyWindowsManager::Init() { GRAPHIC_LOGI("Init"); LiteWMSClient::GetInstance()->InitLiteWMSClient(); - LiteWMRequestor::GetInstance()->ClientRegister(); - LiteWMRequestor::GetInstance()->GetLayerInfo(); + LiteWMRequestor* requestor = LiteWMRequestor::GetInstance(); + requestor->ClientRegister(); + requestor->GetLayerInfo(); return 0; } diff --git a/services/wms/lite_win.cpp b/services/wms/lite_win.cpp index 2362bf8..0cc85e2 100644 --- a/services/wms/lite_win.cpp +++ b/services/wms/lite_win.cpp @@ -264,9 +264,10 @@ Surface* LiteWindow::GetSurface() void LiteWindow::MoveTo(int16_t x, int16_t y) { GRAPHIC_LOGI("{%d,%d}=>{%d,%d}", config_.rect.GetLeft(), config_.rect.GetTop(), x, y); - LiteWM::GetInstance()->UpdateWindowRegion(this, config_.rect); + LiteWM* liteWM = LiteWM::GetInstance(); + liteWM->UpdateWindowRegion(this, config_.rect); config_.rect.SetPosition(x, y); - LiteWM::GetInstance()->UpdateWindowRegion(this, config_.rect); + liteWM->UpdateWindowRegion(this, config_.rect); } void LiteWindow::Resize(int16_t width, int16_t height) -- Gitee