mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-05 05:51:42 +00:00
lottie/optimization: reduce temporary object by calling *= operator.
Change-Id: I9a5273a81cdad0ac78edf6a6564cfb6965884311
This commit is contained in:
parent
f0fc4f8c3b
commit
6f5a77fa45
@ -420,7 +420,8 @@ void LOTLayerItem::update(int frameNo, const VMatrix &parentMatrix, float parent
|
||||
if (!visible()) return;
|
||||
|
||||
// 2. calculate the parent matrix and alpha
|
||||
VMatrix m = matrix(frameNo) * parentMatrix;
|
||||
VMatrix m = matrix(frameNo);
|
||||
m *= parentMatrix;
|
||||
float alpha = parentAlpha * opacity(frameNo);
|
||||
|
||||
//6. update the mask
|
||||
@ -713,7 +714,8 @@ void LOTContentGroupItem::update(int frameNo, const VMatrix &parentMatrix, float
|
||||
if ((flag & DirtyFlagBit::Matrix) || !mData->mTransform->staticMatrix() ) {
|
||||
newFlag |= DirtyFlagBit::Matrix;
|
||||
}
|
||||
m = mData->mTransform->matrix(frameNo) * parentMatrix;
|
||||
m = mData->mTransform->matrix(frameNo);
|
||||
m *= parentMatrix;
|
||||
alpha *= mData->mTransform->opacity(frameNo);
|
||||
|
||||
if (!vCompare(alpha, parentAlpha)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user