Skip to content

Commit d1a090b

Browse files
NickGerlemanfacebook-github-bot
authored andcommitted
Fix animated images missing from offscreen render (#50187)
Summary: Pull Request resolved: #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
1 parent dfde51e commit d1a090b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/react-native/Libraries/Image/RCTUIImageViewAnimated.mm

+2-4
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,9 @@ - (void)setImage:(UIImage *)image
123123
if ([self paused]) {
124124
[self start];
125125
}
126-
127-
[self.layer setNeedsDisplay];
128-
} else {
129-
super.image = image;
130126
}
127+
128+
super.image = image;
131129
}
132130

133131
#pragma mark - Private

0 commit comments

Comments
 (0)