mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Refactor the usages of ChoreographerCompat
Summary: Reducing the places where we directly access `ChoreographerCompat.getInstance()`. Since this is a singleton anyway, there was no need to pass this as an argument. In subsequent diffs, we will also ensure that `ChoreographerCompat.getInstance()` runs on the UI thread, so that the `Choreographer` it gets is based on the `Looper` of the main thread. Reviewed By: achen1 Differential Revision: D10136624 fbshipit-source-id: ad18f7b61eb8b05094aff310f2eb90eb225427dc
This commit is contained in:
1 parent
8b487d4d5a
commit
a5f3571770
3 files changed
+15
-8
No files matched your search
@@ -39,7 +39,7 @@ public class FpsView extends FrameLayout {
|
||||
super(reactContext);
|
||||
inflate(reactContext, R.layout.fps_view, this);
|
||||
mTextView = (TextView) findViewById(R.id.fps_text);
|
||||
mFrameCallback = new FpsDebugFrameCallback(ChoreographerCompat.getInstance(), reactContext);
|
||||
mFrameCallback = new FpsDebugFrameCallback(reactContext);
|
||||
mFPSMonitorRunnable = new FPSMonitorRunnable();
|
||||
setCurrentFPS(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user