promotion for animation

Signed-off-by: zhirong <215782872@qq.com>
Change-Id: I02839825824a17c13e54b2853dd4bf5027ef99e3
Signed-off-by: zhirong <215782872@qq.com>
This commit is contained in:
zhirong
2022-08-05 11:22:43 +08:00
parent 1875cb98f1
commit 8ae64f30ec
7 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -255,7 +255,7 @@ public:
virtual WMError SetWindowMode(WindowMode mode) = 0;
virtual void SetAlpha(float alpha) = 0;
virtual void SetTransform(const Transform& trans) = 0;
virtual Transform GetTransform() const = 0;
virtual const Transform& GetTransform() const = 0;
virtual WMError AddWindowFlag(WindowFlag flag) = 0;
virtual WMError RemoveWindowFlag(WindowFlag flag) = 0;
virtual WMError SetWindowFlags(uint32_t flags) = 0;
+1 -1
View File
@@ -113,7 +113,7 @@ public:
const Rect& GetOriginRect() const;
void GetTouchHotAreas(std::vector<Rect>& rects) const;
uint32_t GetAccessTokenId() const;
Transform GetTransform() const;
const Transform& GetTransform() const;
WindowSizeLimits GetSizeLimits() const;
WindowSizeLimits GetUpdatedSizeLimits() const;
const TransformHelper::Matrix4& GetTransformMat() const;
+4 -6
View File
@@ -48,10 +48,9 @@ T Max(const T& a, const T& b)
}
template <typename T, typename... Ts>
T Max(const T& a, Ts... bs)
T Max(const T& a, const Ts&... bs)
{
T b = Max(bs...);
return (a > b ? a : b);
return Max(a, Max(bs...));
}
template <typename T>
@@ -61,10 +60,9 @@ T Min(const T& a, const T& b)
}
template <typename T, typename... Ts>
T Min(const T& a, Ts... bs)
T Min(const T& a, const Ts&... bs)
{
T b = Min(bs...);
return (a < b ? a : b);
return Min(a, Min(bs...));
}
template <typename T>
+1 -1
View File
@@ -305,7 +305,7 @@ float WindowProperty::GetAlpha() const
return alpha_;
}
Transform WindowProperty::GetTransform() const
const Transform& WindowProperty::GetTransform() const
{
return trans_;
}
+3 -1
View File
@@ -67,9 +67,11 @@ HWTEST_F(WmMathTest, MathHalper, Function | SmallTest | Level2)
ASSERT_EQ(true, MathHelper::NearZero(MathHelper::ToRadians(degrees) - radians));
}
{
int a = 1, b = 2, c = 3;
int a = 1, b = 2, c = 3, d = 4;
ASSERT_EQ(true, MathHelper::Max(a, b, c) == c);
ASSERT_EQ(true, MathHelper::Min(a, b, c) == a);
ASSERT_EQ(true, MathHelper::Max(a, b, c, d) == d);
ASSERT_EQ(true, MathHelper::Min(a, b, c, d) == a);
ASSERT_EQ(true, MathHelper::Clamp(a, b, c) == b);
ASSERT_EQ(true, MathHelper::Clamp(b, a, c) == b);
ASSERT_EQ(true, MathHelper::Clamp(c, a, b) == b);
+1 -1
View File
@@ -134,7 +134,7 @@ public:
virtual WMError SetSystemBarProperty(WindowType type, const SystemBarProperty& property) override;
virtual WMError SetLayoutFullScreen(bool status) override;
virtual WMError SetFullScreen(bool status) override;
virtual Transform GetTransform() const override;
virtual const Transform& GetTransform() const override;
virtual WMError UpdateSurfaceNodeAfterCustomAnimation(bool isAdd) override;
inline void SetWindowState(WindowState state)
{
+1 -1
View File
@@ -393,7 +393,7 @@ void WindowImpl::SetTransform(const Transform& trans)
UpdateProperty(PropertyChangeAction::ACTION_UPDATE_TRANSFORM_PROPERTY);
}
Transform WindowImpl::GetTransform() const
const Transform& WindowImpl::GetTransform() const
{
return property_->GetTransform();
}