public class LayerThread
extends android.os.HandlerThread
When you call addTask on the MaplyController, the Runnable probably ends up here.
Modifier and Type | Class and Description |
---|---|
static interface |
LayerThread.ViewWatcherInterface
Objects that want to be called when the view updates its position
fill out this interface and register with the layer thread.
|
Modifier and Type | Field and Description |
---|---|
protected ChangeSet |
changes |
RenderController |
renderer |
Scene |
scene |
static long |
UpdatePeriod |
View |
view |
protected boolean |
viewUpdates |
Modifier and Type | Method and Description |
---|---|
void |
addChanges(ChangeSet newChanges)
Add a set of change requests to the scene.
|
android.os.Handler |
addDelayedTask(java.lang.Runnable run,
long time)
Add a Runnable to the queue, but only execute after the given amount of time.
|
void |
addLayer(Layer layer) |
android.os.Handler |
addTask(java.lang.Runnable run)
Add a Runnable to our queue.
|
android.os.Handler |
addTask(java.lang.Runnable run,
boolean wait)
Add a Runnable to this thread's queue.
|
void |
addWatcher(LayerThread.ViewWatcherInterface watcher)
Add an object that we'd like to track changes to the view as
the user moves around.
|
void |
removeLayer(Layer layer) |
void |
removeWatcher(LayerThread.ViewWatcherInterface watcher)
Remove a view watcher that was added previously.
|
void |
viewUpdated(View view) |
getLooper, getThreadId, onLooperPrepared, quit, quitSafely, run
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public View view
public Scene scene
public RenderController renderer
protected boolean viewUpdates
protected ChangeSet changes
public static long UpdatePeriod
public void addLayer(Layer layer)
public void removeLayer(Layer layer)
public void addChanges(ChangeSet newChanges)
newChanges
- Change requests to process.public android.os.Handler addTask(java.lang.Runnable run)
run
- Runnable to runpublic android.os.Handler addDelayedTask(java.lang.Runnable run, long time)
run
- Runnable to add to the queuepublic android.os.Handler addTask(java.lang.Runnable run, boolean wait)
run
- Runnable to runwait
- If true we'll always put the Runnable in the queue. If false we'll see
if we're already on the layer thread and just execute the runnable instead.public void addWatcher(LayerThread.ViewWatcherInterface watcher)
watcher
- Watcher to add to the list.public void removeWatcher(LayerThread.ViewWatcherInterface watcher)
public void viewUpdated(View view)