android.view.Choreographer#getInstance ( )源码实例Demo

下面列出了android.view.Choreographer#getInstance ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: android_9.0.0_r45   文件: DisplayPowerState.java
public DisplayPowerState(DisplayBlanker blanker, ColorFade colorFade) {
    mHandler = new Handler(true /*async*/);
    mChoreographer = Choreographer.getInstance();
    mBlanker = blanker;
    mColorFade = colorFade;
    mPhotonicModulator = new PhotonicModulator();
    mPhotonicModulator.start();

    // At boot time, we know that the screen is on and the electron beam
    // animation is not playing.  We don't know the screen's brightness though,
    // so prepare to set it to a known state when the state is next applied.
    // Although we set the brightness to full on here, the display power controller
    // will reset the brightness to a new level immediately before the changes
    // actually have a chance to be applied.
    mScreenState = Display.STATE_ON;
    mScreenBrightness = PowerManager.BRIGHTNESS_ON;
    scheduleScreenUpdate();

    mColorFadePrepared = false;
    mColorFadeLevel = 1.0f;
    mColorFadeReady = true;
}
 
源代码2 项目: ZhuanLan   文件: ZhuanlanApplication.java
@Override
    public void onCreate() {
        super.onCreate();
        mContext = this;
        Tips.init(this);
        DataCenter.init(this, "zhuanlan.db");

//        StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
//        .detectDiskReads()
//        .detectDiskWrites()
//        .detectNetwork()
//        .penaltyLog()
//        .build());
//
//        StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
//        .detectActivityLeaks()
//        .detectLeakedSqlLiteObjects()
//        .penaltyLog()
//        .penaltyDeath()
//        .build());

        initStetho();

        Choreographer choreographer = Choreographer.getInstance();
        choreographer.postFrameCallback(FRAME_CALLBACK);
    }
 
源代码3 项目: narrate-android   文件: AbsView.java
protected void redraw() {
    log("redraw()");
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        // stay in sync with display updates
        Choreographer choreographer = Choreographer.getInstance();
        choreographer.removeFrameCallback(redrawCallback);
        choreographer.postFrameCallback(redrawCallback);

    } else {
        redrawInternal();
    }
}
 
@Override
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public void onTaskInit() {
    this.mFpsChecker = new FPSSampler(Choreographer.getInstance());
    mFpsChecker.reset();
    mFpsChecker.start();
}
 
源代码5 项目: MediaSDK   文件: VideoFrameReleaseTimeHelper.java
private void createChoreographerInstanceInternal() {
  choreographer = Choreographer.getInstance();
}
 
源代码6 项目: android_9.0.0_r45   文件: RampAnimator.java
public RampAnimator(T object, IntProperty<T> property) {
    mObject = object;
    mProperty = property;
    mChoreographer = Choreographer.getInstance();
}
 
private void createChoreographerInstanceInternal() {
  choreographer = Choreographer.getInstance();
}
 
源代码8 项目: styT   文件: Metronome.java
public Metronome() {
  choreographer = Choreographer.getInstance();
}
 
private void createChoreographerInstanceInternal() {
  choreographer = Choreographer.getInstance();
}
 
源代码10 项目: react-native-GPay   文件: ChoreographerCompat.java
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
private Choreographer getChoreographer() {
  return Choreographer.getInstance();
}
 
源代码11 项目: DebugOverlay-Android   文件: FpsDataModule.java
public FpsDataModule(int interval) {
    this.interval = interval;
    this.choreographer = Choreographer.getInstance();
}
 
源代码12 项目: litho   文件: ChoreographerCompatImpl.java
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
private Choreographer getChoreographer() {
  return Choreographer.getInstance();
}
 
源代码13 项目: Trebuchet   文件: Workspace.java
public WallpaperOffsetInterpolator() {
    mChoreographer = Choreographer.getInstance();
    mInterpolator = new DecelerateInterpolator(1.5f);
}
 
/**
 * @return an Android spring choreographer using the system {@link android.view.Choreographer}
 */
public static ChoreographerAndroidSpringLooper create() {
  return new ChoreographerAndroidSpringLooper(Choreographer.getInstance());
}
 
源代码15 项目: android-port   文件: MouseCursor.java
public MouseCursor(GameActivity activity, Osc osc) {
    this.osc = osc;

    Resources r = activity.getResources();

    int height = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 30, r.getDisplayMetrics());
    int width = (int) Math.round(height / 1.5);

    cursor = new FixedSizeImageView(activity, width, height);
    cursor.setImageResource(R.drawable.pointer_arrow);

    cursor.setLayoutParams(new RelativeLayout.LayoutParams(width, height));

    layout = activity.getLayout();
    layout.addView(cursor);

    choreographer = Choreographer.getInstance();
    choreographer.postFrameCallback(this);
}
 
源代码16 项目: StackCardsView   文件: ChoreographerCompat.java
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
private Choreographer getChoreographer() {
  return Choreographer.getInstance();
}
 
源代码17 项目: AndroidGodEye   文件: ChoreographerInjecor.java
@Override
public Choreographer getChoreographer() {
    return Choreographer.getInstance();
}
 
源代码18 项目: Viewer   文件: AndroidSpringLooperFactory.java
/**
 * @return an Android spring choreographer using the system {@link Choreographer}
 */
public static ChoreographerAndroidSpringLooper create() {
  return new ChoreographerAndroidSpringLooper(Choreographer.getInstance());
}
 
源代码19 项目: Takt   文件: Metronome.java
public Metronome() {
  choreographer = Choreographer.getInstance();
}
 
private void createChoreographerInstanceInternal() {
  choreographer = Choreographer.getInstance();
}