mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Refactoring
This commit is contained in:
parent
1f1509a64c
commit
9c08df83a1
@ -622,7 +622,7 @@ CGRect getPathNativeBoundingBox(CGPathRef _Nonnull path) {
|
|||||||
CGPoint scale = CGPointMake(size.width / (CGFloat)animation.size.width, size.height / (CGFloat)animation.size.height);
|
CGPoint scale = CGPointMake(size.width / (CGFloat)animation.size.width, size.height / (CGFloat)animation.size.height);
|
||||||
context->concatenate(lottie::Transform2D::makeScale(scale.x, scale.y));
|
context->concatenate(lottie::Transform2D::makeScale(scale.x, scale.y));
|
||||||
|
|
||||||
renderLottieRenderNode(renderNode, context, lottie::Vector2D(context->width(), context->height()), rootTransform, 1.0, false, *_bezierPathsBoundingBoxContext.get());
|
//renderLottieRenderNode(renderNode, context, lottie::Vector2D(context->width(), context->height()), rootTransform, 1.0, false, *_bezierPathsBoundingBoxContext.get());
|
||||||
|
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,7 @@ public final class ViewController: UIViewController {
|
|||||||
let updatesPerSecond = Double(numUpdates) / deltaTime
|
let updatesPerSecond = Double(numUpdates) / deltaTime
|
||||||
startTime = timestamp
|
startTime = timestamp
|
||||||
numUpdates = 0
|
numUpdates = 0
|
||||||
print("updatesPerSecond: \(updatesPerSecond)")
|
print("Ours: updatesPerSecond: \(updatesPerSecond)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.start()
|
}.start()
|
||||||
@ -205,7 +205,7 @@ public final class ViewController: UIViewController {
|
|||||||
let updatesPerSecond = Double(numUpdates) / deltaTime
|
let updatesPerSecond = Double(numUpdates) / deltaTime
|
||||||
startTime = timestamp
|
startTime = timestamp
|
||||||
numUpdates = 0
|
numUpdates = 0
|
||||||
print("updatesPerSecond: \(updatesPerSecond)")
|
print("Rlottie: updatesPerSecond: \(updatesPerSecond)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.start()
|
}.start()
|
||||||
|
@ -69,19 +69,6 @@ public:
|
|||||||
return std::make_shared<CompoundBezierPath>();
|
return std::make_shared<CompoundBezierPath>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*bool trimSimultaneously = false;
|
|
||||||
if (trimSimultaneously) {
|
|
||||||
/// Trim each path individually.
|
|
||||||
std::vector<BezierPath> newPaths;
|
|
||||||
for (auto &path : paths) {
|
|
||||||
auto trimmedPaths = path.trim(fromPosition * path.length(), toPosition * path.length(), offset * path.length());
|
|
||||||
for (const auto &trimmedPath : trimmedPaths) {
|
|
||||||
newPaths.push_back(trimmedPath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return std::make_shared<CompoundBezierPath>(newPaths);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
float lengthValue = length();
|
float lengthValue = length();
|
||||||
|
|
||||||
/// Normalize lengths to the curve length.
|
/// Normalize lengths to the curve length.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user