mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Update lottie-cpp
This commit is contained in:
parent
571e2164b2
commit
8ab94ac4f6
@ -69,7 +69,7 @@ CGRect getPathNativeBoundingBox(CGPathRef _Nonnull path) {
|
||||
|
||||
return [[UIImage alloc] initWithCGImage:std::static_pointer_cast<lottie::CanvasImpl::Image>(image)->nativeImage()];
|
||||
} else {
|
||||
if ((int64_t)"" > 0) {
|
||||
if ((int64_t)"" < 0) {
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
lottie::ThorVGCanvasImpl::initializeOnce();
|
||||
@ -88,9 +88,6 @@ CGRect getPathNativeBoundingBox(CGPathRef _Nonnull path) {
|
||||
CGContextRef targetContext = CGBitmapContextCreate((void *)context->backingData(), (int)size.width, (int)size.height, 8, bytesPerRow, colorSpace, bitmapInfo);
|
||||
CGColorSpaceRelease(colorSpace);
|
||||
|
||||
//CGContextSetFillColorWithColor(targetContext, [UIColor blueColor].CGColor);
|
||||
//CGContextFillRect(targetContext, CGRectMake(0.0f, 0.0f, size.width, size.height));
|
||||
|
||||
CGImageRef bitmapImage = CGBitmapContextCreateImage(targetContext);
|
||||
UIImage *image = [[UIImage alloc] initWithCGImage:bitmapImage scale:1.0f orientation:UIImageOrientationDownMirrored];
|
||||
CGImageRelease(bitmapImage);
|
||||
@ -100,7 +97,6 @@ CGRect getPathNativeBoundingBox(CGPathRef _Nonnull path) {
|
||||
return image;
|
||||
} else {
|
||||
auto context = std::make_shared<lottie::NullCanvasImpl>((int)size.width, (int)size.height);
|
||||
|
||||
_canvasRenderer->render(_renderer, context, lottie::Vector2D(size.width, size.height));
|
||||
|
||||
return nil;
|
||||
|
@ -78,7 +78,7 @@ private final class ReferenceCompareTest {
|
||||
}
|
||||
|
||||
var continueFromName: String?
|
||||
//continueFromName = "1137162165791227948.json"
|
||||
//continueFromName = "1048388279864393866.json"
|
||||
|
||||
let _ = await processAnimationFolderAsync(basePath: bundlePath, path: "", stopOnFailure: !testNonReference, process: { path, name, alwaysDraw in
|
||||
if let continueFromNameValue = continueFromName {
|
||||
@ -119,9 +119,9 @@ public final class ViewController: UIViewController {
|
||||
|
||||
self.view.layer.addSublayer(MetalEngine.shared.rootLayer)
|
||||
|
||||
if "".isEmpty {
|
||||
if !"".isEmpty {
|
||||
if #available(iOS 13.0, *) {
|
||||
self.test = ReferenceCompareTest(view: self.view, testNonReference: true)
|
||||
self.test = ReferenceCompareTest(view: self.view, testNonReference: false)
|
||||
}
|
||||
} else if !"".isEmpty {
|
||||
/*let cachedAnimation = cacheLottieMetalAnimation(path: filePath)!
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 12787bcc9fe73f6598e5b03882b64b074aff52b6
|
||||
Subproject commit 117ba5937d00e386073b0213c179c48379017067
|
Loading…
x
Reference in New Issue
Block a user