Remove UIManagerModule dependency in UIViewOperationQueue

Reviewed By: astreet

Differential Revision: D2463226

fb-gh-sync-id: eafc876ca750a08406917d8bbbfe87c27a4649fd
This commit is contained in:
Denis Koroskin
2015-11-23 13:21:29 -08:00
committed by facebook-github-bot-0
parent f624d01cac
commit ac0134322f
5 changed files with 28 additions and 46 deletions

View File

@@ -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);

View File

@@ -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() {