Skip to content

Commit

Permalink
fix(iOS): gif is play fast at high fresh rate device
Browse files Browse the repository at this point in the history
  • Loading branch information
luoyibu authored and zoomchan-cxj committed Feb 20, 2023
1 parent 9608471 commit 2ec1b35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/sdk/component/image/HippyAnimatedImageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ - (void)displayDidRefresh:(CADisplayLink *)displayLink {
self.needsDisplayWhenImageBecomesAvailable = NO;
}
if (@available(iOS 10, *)) {
self.accumulator += displayLink.targetTimestamp - CACurrentMediaTime();
self.accumulator += displayLink.targetTimestamp - displayLink.timestamp;
} else {
self.accumulator += displayLink.duration * displayLink.frameInterval;
}
Expand Down

0 comments on commit 2ec1b35

Please sign in to comment.