public class MockTimingSource extends java.lang.Object implements TimingSource, ChoreographerCompat
ChoreographerCompat.FrameCallback
Modifier and Type | Field and Description |
---|---|
static int |
FRAME_TIME_MS |
Constructor and Description |
---|
MockTimingSource() |
Modifier and Type | Method and Description |
---|---|
void |
postFrameCallback(ChoreographerCompat.FrameCallback callbackWrapper) |
void |
postFrameCallbackDelayed(ChoreographerCompat.FrameCallback callbackWrapper,
long delayMillis) |
void |
removeFrameCallback(ChoreographerCompat.FrameCallback callbackWrapper) |
void |
setDataFlowGraph(DataFlowGraph dataFlowGraph) |
void |
start()
Registers the
DataFlowGraph to receive frame callbacks until it calls TimingSource.stop() . |
void |
step(int numFrames) |
void |
stop()
Stops the
DataFlowGraph from receiving frame callbacks. |
public void setDataFlowGraph(DataFlowGraph dataFlowGraph)
setDataFlowGraph
in interface TimingSource
public void start()
TimingSource
DataFlowGraph
to receive frame callbacks until it calls TimingSource.stop()
.start
in interface TimingSource
public void stop()
TimingSource
DataFlowGraph
from receiving frame callbacks.stop
in interface TimingSource
public void step(int numFrames)
public void postFrameCallback(ChoreographerCompat.FrameCallback callbackWrapper)
postFrameCallback
in interface ChoreographerCompat
public void postFrameCallbackDelayed(ChoreographerCompat.FrameCallback callbackWrapper, long delayMillis)
postFrameCallbackDelayed
in interface ChoreographerCompat
public void removeFrameCallback(ChoreographerCompat.FrameCallback callbackWrapper)
removeFrameCallback
in interface ChoreographerCompat