mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 23:21:05 +00:00
commit
1f8ec9cd90
@ -2404,6 +2404,8 @@ void UIContentImpl::UpdateViewportConfig(const ViewportConfig& config, OHOS::Ros
|
||||
const std::shared_ptr<OHOS::Rosen::RSTransaction>& rsTransaction,
|
||||
const std::map<OHOS::Rosen::AvoidAreaType, OHOS::Rosen::AvoidArea>& avoidAreas)
|
||||
{
|
||||
PerfMonitor::GetPerfMonitor()->RecordWindowRectResize(static_cast<OHOS::Ace::WindowSizeChangeReason>(reason),
|
||||
bundleName_);
|
||||
UpdateViewportConfigWithAnimation(config, reason, {}, rsTransaction, avoidAreas);
|
||||
}
|
||||
|
||||
|
@ -668,4 +668,18 @@ int32_t PerfMonitor::GetFilterType() const
|
||||
return filterType;
|
||||
}
|
||||
|
||||
void PerfMonitor::RecordWindowRectResize(OHOS::Ace::WindowSizeChangeReason reason, const std::string& bundleName)
|
||||
{
|
||||
switch (reason) {
|
||||
case OHOS::Ace::WindowSizeChangeReason::DRAG_START:
|
||||
Start(PerfConstants::WINDOW_RECT_RESIZE, PerfActionType::LAST_DOWN, bundleName.c_str());
|
||||
break;
|
||||
case OHOS::Ace::WindowSizeChangeReason::DRAG_END:
|
||||
End(PerfConstants::WINDOW_RECT_RESIZE, true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace OHOS::Ace
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include "base/utils/macros.h"
|
||||
#include "core/common/window_animation_config.h"
|
||||
|
||||
namespace OHOS::Ace {
|
||||
constexpr int32_t US_TO_MS = 1000;
|
||||
@ -147,6 +148,8 @@ public:
|
||||
static PerfMonitor* pMonitor;
|
||||
void ReportPageShowMsg(const std::string& pageUrl, const std::string& bundleName,
|
||||
const std::string& pageName);
|
||||
void RecordWindowRectResize(OHOS::Ace::WindowSizeChangeReason reason,
|
||||
const std::string& bundleName);
|
||||
|
||||
private:
|
||||
SceneRecord* GetRecord(const std::string& sceneId);
|
||||
|
Loading…
Reference in New Issue
Block a user