[react-native] dispatch perf updates to main thread

This commit is contained in:
John Harper 2015-06-02 01:38:50 -07:00
parent 1ed2542b46
commit 570597c4ac
1 changed files with 3 additions and 1 deletions

View File

@ -1555,7 +1555,9 @@ RCT_INNER_BRIDGE_ONLY(_invokeAndProcessModule:(NSString *)module method:(NSStrin
RCTProfileEndEvent(@"DispatchFrameUpdate", @"objc_call", nil); RCTProfileEndEvent(@"DispatchFrameUpdate", @"objc_call", nil);
[self.perfStats.jsGraph tick:displayLink.timestamp]; dispatch_async(dispatch_get_main_queue(), ^{
[self.perfStats.jsGraph tick:displayLink.timestamp];
});
} }
- (void)_mainThreadUpdate:(CADisplayLink *)displayLink - (void)_mainThreadUpdate:(CADisplayLink *)displayLink