This commit is contained in:
Isaac 2024-05-17 11:16:24 +04:00
parent 3a5585c1fd
commit bbb74b6bdf
3 changed files with 6 additions and 11 deletions

View File

@ -657,6 +657,10 @@ CGRect getPathNativeBoundingBox(CGPathRef _Nonnull path) {
return nil;
}
if (!useReferenceRendering) {
return nil;
}
processRenderTree(renderNode, lottie::Vector2D((int)size.width, (int)size.height), lottie::CATransform3D::identity().scaled(lottie::Vector2D(size.width / (double)animation.size.width, size.height / (double)animation.size.height)), false, *_bezierPathsBoundingBoxContext.get());
if (useReferenceRendering) {

View File

@ -119,7 +119,7 @@ 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)
}
@ -167,7 +167,7 @@ public final class ViewController: UIViewController {
var frameIndex = 0
while true {
animationContainer.update(frameIndex)
//let _ = animationRenderer.render(for: CGSize(width: CGFloat(performanceFrameSize), height: CGFloat(performanceFrameSize)), useReferenceRendering: false)
let _ = animationRenderer.render(for: CGSize(width: CGFloat(performanceFrameSize), height: CGFloat(performanceFrameSize)), useReferenceRendering: false)
frameIndex = (frameIndex + 1) % animationContainer.animation.frameCount
numUpdates += 1
let timestamp = CFAbsoluteTimeGetCurrent()

View File

@ -1403,15 +1403,6 @@ void ShapeCompositionLayer::updateRenderTree(BezierPathsBoundingBoxContext &boun
_contentRenderTreeNode->_masksToBounds = _contentsLayer->masksToBounds();
_contentRenderTreeNode->_isHidden = _contentsLayer->isHidden();
assert(position() == Vector2D::Zero());
assert(transform().isIdentity());
assert(opacity() == 1.0);
assert(!masksToBounds());
assert(!isHidden());
assert(_contentsLayer->bounds() == CGRect(0.0, 0.0, 0.0, 0.0));
assert(_contentsLayer->position() == Vector2D::Zero());
assert(!_contentsLayer->masksToBounds());
_renderTreeNode->_bounds = bounds();
_renderTreeNode->_position = position();
_renderTreeNode->_transform = transform();