共享元素适配交互优先

Change-Id: I440ea14fed59347ca2bd78916b7a58e3d0f7bee1
Signed-off-by: charlielou <louchenglin1@huawei.com>
This commit is contained in:
charlielou 2024-10-21 16:33:55 +08:00
parent 7013dedaf8
commit 35c1165a44
3 changed files with 24 additions and 5 deletions

View File

@ -46,6 +46,16 @@
#include "platform/ohos/backend/rs_vulkan_context.h"
#endif
namespace {
static const OHOS::Rosen::Drawing::Matrix IDENTITY_MATRIX = []() {
OHOS::Rosen::Drawing::Matrix matrix;
matrix.SetMatrix(1.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 1.0f);
return matrix;
}();
}
namespace OHOS::Rosen::DrawableV2 {
CacheProcessStatus RSSurfaceRenderNodeDrawable::GetCacheSurfaceProcessedStatus() const
{
@ -453,7 +463,7 @@ void RSSurfaceRenderNodeDrawable::SubDraw(Drawing::Canvas& canvas)
Drawing::Rect bounds = uifirstParams ? uifirstParams->GetBounds() : Drawing::Rect(0, 0, 0, 0);
auto parentSurfaceMatrix = RSRenderParams::GetParentSurfaceMatrix();
RSRenderParams::SetParentSurfaceMatrix(rscanvas->GetTotalMatrix());
RSRenderParams::SetParentSurfaceMatrix(IDENTITY_MATRIX);
RSRenderNodeDrawable::DrawUifirstContentChildren(*rscanvas, bounds);
RSRenderParams::SetParentSurfaceMatrix(parentSurfaceMatrix);

View File

@ -662,10 +662,7 @@ public:
isChildSupportUifirst_ = isChildSupportUifirst_ && b;
}
virtual bool GetUifirstSupportFlag()
{
return !GetRenderProperties().GetSandBox() && isChildSupportUifirst_ && isUifirstNode_;
}
virtual bool GetUifirstSupportFlag();
virtual void MergeOldDirtyRect()
{
@ -1108,6 +1105,10 @@ struct SharedTransitionParam {
RSRenderNode::SharedPtr GetPairedNode(const NodeId nodeId) const;
bool UpdateHierarchyAndReturnIsLower(const NodeId nodeId);
bool IsInAppTranSition() const
{
return !crossApplication_;
}
void InternalUnregisterSelf();
RSB_EXPORT std::string Dump() const;

View File

@ -4246,6 +4246,14 @@ void RSRenderNode::MarkBlurIntersectWithDRM(bool intersectWithDRM, bool isDark)
}
}
bool RSRenderNode::GetUifirstSupportFlag()
{
if (sharedTransitionParam_ && !sharedTransitionParam_->IsInAppTranSition()) {
return false;
}
return isChildSupportUifirst_ && isUifirstNode_;
}
void RSRenderNode::UpdatePointLightDirtySlot()
{
UpdateDirtySlotsAndPendingNodes(RSDrawableSlot::POINT_LIGHT);