mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix animated images missing from offscreen render (#50187)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50187 D70668516 broke some SSTs, where asset that previously was black, showed up as clear. I was assuming that was because we fixed a separate bug where assets could erroneously show as black layer, but these tests were actually just using a black asset. Real bug here, is that the change led to only setting image when we have a displayLink, ie showing on screen, where before, we set image (implicitly at first frame) as layer content. This change fixes that behavior, so first frame is rendered as part of off-screen view rendering, for images considered animatable. Changelog: [iOS][Fixed] - Fix animated images missing from offscreen render Reviewed By: cipolleschi Differential Revision: D71590856 fbshipit-source-id: f5da690b27f2da0f6979f25ece031ff0d418cca6
This commit is contained in:
committed by
Facebook GitHub Bot
parent
dfde51e469
commit
d1a090b0af
@@ -123,11 +123,9 @@ static NSUInteger RCTDeviceFreeMemory(void)
|
||||
if ([self paused]) {
|
||||
[self start];
|
||||
}
|
||||
|
||||
[self.layer setNeedsDisplay];
|
||||
} else {
|
||||
super.image = image;
|
||||
}
|
||||
|
||||
super.image = image;
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
|
||||
Reference in New Issue
Block a user