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:
Ram N authored and Facebook Github Bot committed 2018-10-03 13:40:35 -07:00
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);
}