Package org.robolectric.shadows
Class ShadowPausedNoVsyncChoreographer
java.lang.Object
org.robolectric.shadows.ShadowChoreographer
org.robolectric.shadows.ShadowPausedChoreographer
org.robolectric.shadows.ShadowPausedNoVsyncChoreographer
@Implements(value=android.view.Choreographer.class,
isInAndroidSdk=false,
minSdk=37,
shadowPicker=Picker.class)
public class ShadowPausedNoVsyncChoreographer
extends ShadowPausedChoreographer
A shadow for
Choreographer that:
- is based off ShadowPausedChoreographer implementation and does not support LooperMode.LEGACY
- Uses 'no-hardware-vsync' software based frame timing managed in the real Choreographer implementation
- Currently used when running on > BAKLAVA SDKs
The behavior should be close to the existing ShadowPausedChoreographer behavior with the following subtle timing differences:
- The first call to Choreographer.postFrameCallback will be scheduled immediately as opposed to scheduled after frameDelay
- Frame callbacks will always occur at fixed times. For example, using the default 15m frame delay an animation that is requesting a frame callback on every frame would see them at 100, 115, 130, etc ms, As opposed to the previous implementation that would always schedule the next frame as 15 ms from the current time. (when in !isPaused() mode)
- Effectively uses millisecond precision for frameDelay. With no-vsync mode, Choreographer uses the Looper to schedule frame callbacks which has ms precision
-
Nested Class Summary
Nested classes/interfaces inherited from class org.robolectric.shadows.ShadowChoreographer
ShadowChoreographer.CallbackQueueReflector, ShadowChoreographer.ChoreographerReflector, ShadowChoreographer.Picker -
Field Summary
Fields inherited from class org.robolectric.shadows.ShadowPausedChoreographer
activeChoreographers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void__constructor__(Looper looper, long layerHandle) protected static booleanprotected voidscheduleFrameLocked(long now) Methods inherited from class org.robolectric.shadows.ShadowPausedChoreographer
__constructor__, __constructor__, __constructor__, disposeMethods inherited from class org.robolectric.shadows.ShadowChoreographer
doFrame, doFrame, getDefaultFrameDelay, getFrameDelay, getFrameInterval, getNextVsyncTime, getNextVsyncTimeNanos, isPaused, reset, setFrameDelay, setFrameInterval, setPaused, setPostCallbackDelay, setPostFrameCallbackDelay
-
Constructor Details
-
ShadowPausedNoVsyncChoreographer
public ShadowPausedNoVsyncChoreographer()
-
-
Method Details
-
__constructor__
- Overrides:
__constructor__in classShadowPausedChoreographer
-
getUseVsync
-
scheduleFrameLocked
-