mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-22 03:13:52 +08:00
Remove UIManagerModule dependency in UIViewOperationQueue
Reviewed By: astreet Differential Revision: D2463226 fb-gh-sync-id: eafc876ca750a08406917d8bbbfe87c27a4649fd
This commit is contained in:
committed by
facebook-github-bot-0
parent
f624d01cac
commit
ac0134322f
@@ -15,7 +15,7 @@ import com.facebook.react.bridge.ReactBridge;
|
||||
import com.facebook.react.bridge.NotThreadSafeBridgeIdleDebugListener;
|
||||
import com.facebook.react.common.LongArray;
|
||||
import com.facebook.react.uimanager.UIManagerModule;
|
||||
import com.facebook.react.uimanager.debug.NotThreadSafeUiManagerDebugListener;
|
||||
import com.facebook.react.uimanager.debug.NotThreadSafeViewHierarchyUpdateDebugListener;
|
||||
|
||||
/**
|
||||
* Debug object that listens to bridge busy/idle events and UiManagerModule dispatches and uses it
|
||||
@@ -25,7 +25,7 @@ import com.facebook.react.uimanager.debug.NotThreadSafeUiManagerDebugListener;
|
||||
* {@link Choreographer.FrameCallback}.
|
||||
*/
|
||||
public class DidJSUpdateUiDuringFrameDetector implements NotThreadSafeBridgeIdleDebugListener,
|
||||
NotThreadSafeUiManagerDebugListener {
|
||||
NotThreadSafeViewHierarchyUpdateDebugListener {
|
||||
|
||||
private final LongArray mTransitionToIdleEvents = LongArray.createWithInitialCapacity(20);
|
||||
private final LongArray mTransitionToBusyEvents = LongArray.createWithInitialCapacity(20);
|
||||
|
||||
@@ -135,7 +135,7 @@ public class FpsDebugFrameCallback implements Choreographer.FrameCallback {
|
||||
mShouldStop = false;
|
||||
mReactContext.getCatalystInstance().addBridgeIdleDebugListener(
|
||||
mDidJSUpdateUiDuringFrameDetector);
|
||||
mUIManagerModule.setUiManagerDebugListener(mDidJSUpdateUiDuringFrameDetector);
|
||||
mUIManagerModule.setViewHierarchyUpdateDebugListener(mDidJSUpdateUiDuringFrameDetector);
|
||||
mChoreographer.postFrameCallback(this);
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ public class FpsDebugFrameCallback implements Choreographer.FrameCallback {
|
||||
mShouldStop = true;
|
||||
mReactContext.getCatalystInstance().removeBridgeIdleDebugListener(
|
||||
mDidJSUpdateUiDuringFrameDetector);
|
||||
mUIManagerModule.setUiManagerDebugListener(null);
|
||||
mUIManagerModule.setViewHierarchyUpdateDebugListener(null);
|
||||
}
|
||||
|
||||
public double getFPS() {
|
||||
|
||||
Reference in New Issue
Block a user