mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 23:21:05 +00:00
add syncgenro
Signed-off-by: dujingcheng <dujingcheng@huawei.com> Change-Id: Ic23c35ea9f5f8e5a41f4664cbf4081c982ccc974
This commit is contained in:
parent
3ea5804a26
commit
ffed84f5bd
@ -582,14 +582,13 @@ void SecuritySessionWrapperImpl::NotifyDisplayArea(const RectF& displayArea)
|
||||
CHECK_NULL_VOID(pipeline);
|
||||
auto curWindow = pipeline->GetCurrentWindowRect();
|
||||
displayArea_ = displayArea + OffsetF(curWindow.Left(), curWindow.Top());
|
||||
PLATFORM_LOGD("The display area with '%{public}s' is notified to the provider.",
|
||||
displayArea_.ToString().c_str());
|
||||
std::shared_ptr<Rosen::RSTransaction> transaction;
|
||||
auto parentSession = session_->GetParentSession();
|
||||
auto reason = parentSession ? parentSession->GetSizeChangeReason() : session_->GetSizeChangeReason();
|
||||
auto persistentId = parentSession ? parentSession->GetPersistentId() : session_->GetPersistentId();
|
||||
ACE_SCOPED_TRACE("NotifyDisplayArea id: %d, reason [%d]", persistentId, reason);
|
||||
PLATFORM_LOGD("NotifyDisplayArea id: %{public}d, reason = %{public}d", persistentId, reason);
|
||||
PLATFORM_LOGI("DisplayArea: %{public}s, persistentId: %{public}d, reason: %{public}d",
|
||||
displayArea_.ToString().c_str(), persistentId, reason);
|
||||
if (reason == Rosen::SizeChangeReason::ROTATION) {
|
||||
if (transaction_.lock()) {
|
||||
transaction = transaction_.lock();
|
||||
|
@ -281,20 +281,9 @@ void SecurityUIExtensionPattern::OnAreaChangedInner()
|
||||
void SecurityUIExtensionPattern::FireBindModalCallback()
|
||||
{}
|
||||
|
||||
bool SecurityUIExtensionPattern::OnDirtyLayoutWrapperSwap(
|
||||
const RefPtr<LayoutWrapper>& dirty, const DirtySwapConfig& config)
|
||||
void SecurityUIExtensionPattern::OnSyncGeometryNode(const DirtySwapConfig& config)
|
||||
{
|
||||
CHECK_NULL_RETURN(sessionWrapper_, false);
|
||||
CHECK_NULL_RETURN(dirty, false);
|
||||
auto host = dirty->GetHostNode();
|
||||
CHECK_NULL_RETURN(host, false);
|
||||
auto [displayOffset, err] = host->GetPaintRectGlobalOffsetWithTranslate();
|
||||
auto geometryNode = dirty->GetGeometryNode();
|
||||
CHECK_NULL_RETURN(geometryNode, false);
|
||||
auto displaySize = geometryNode->GetFrameSize();
|
||||
displayArea_ = RectF(displayOffset, displaySize);
|
||||
sessionWrapper_->NotifyDisplayArea(displayArea_);
|
||||
return false;
|
||||
DispatchDisplayArea(true);
|
||||
}
|
||||
|
||||
void SecurityUIExtensionPattern::OnWindowShow()
|
||||
@ -524,7 +513,7 @@ void SecurityUIExtensionPattern::SetSyncCallbacks(
|
||||
|
||||
void SecurityUIExtensionPattern::FireSyncCallbacks()
|
||||
{
|
||||
PLATFORM_LOGD("The size of sync callbacks = %{public}zu.", onSyncOnCallbackList_.size());
|
||||
PLATFORM_LOGI("The size of sync callbacks = %{public}zu.", onSyncOnCallbackList_.size());
|
||||
ContainerScope scope(instanceId_);
|
||||
for (const auto& callback : onSyncOnCallbackList_) {
|
||||
if (callback) {
|
||||
@ -541,7 +530,7 @@ void SecurityUIExtensionPattern::SetAsyncCallbacks(
|
||||
|
||||
void SecurityUIExtensionPattern::FireAsyncCallbacks()
|
||||
{
|
||||
PLATFORM_LOGD("The size of async callbacks = %{public}zu.", onSyncOnCallbackList_.size());
|
||||
PLATFORM_LOGI("The size of async callbacks = %{public}zu.", onSyncOnCallbackList_.size());
|
||||
ContainerScope scope(instanceId_);
|
||||
for (const auto& callback : onAsyncOnCallbackList_) {
|
||||
if (callback) {
|
||||
|
@ -64,8 +64,7 @@ public:
|
||||
int32_t GetInstanceId();
|
||||
|
||||
void OnAreaChangedInner() override;
|
||||
bool OnDirtyLayoutWrapperSwap(
|
||||
const RefPtr<LayoutWrapper>& dirty, const DirtySwapConfig& config) override;
|
||||
void OnSyncGeometryNode(const DirtySwapConfig& config) override;
|
||||
void OnWindowShow() override;
|
||||
void OnWindowHide() override;
|
||||
void OnAttachToFrameNode() override;
|
||||
|
Loading…
Reference in New Issue
Block a user