com.threerings.media
Class FlipFrameManager

java.lang.Object
  extended by com.threerings.media.FrameManager
      extended by com.threerings.media.FlipFrameManager

public class FlipFrameManager
extends FrameManager

A FrameManager extension that uses a flip-buffer (via BufferStrategy to do its rendering.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.media.FrameManager
FrameManager.ManagedRoot, FrameManager.SafeLayerComponent, FrameManager.Ticker
 
Field Summary
protected  BufferStrategy _bufstrat
          The buffer strategy used to do our rendering.
 
Fields inherited from class com.threerings.media.FrameManager
_clipped, _fps, _lastTickStamp, _metrics, _millisPerFrame, _overlay, _participants, _perfDebug, _repainter, _root, _sleepGranularity, _tbounds, _ticker, _timer, _useFlip, _window, BIG_GAP, HANG_DEBUG, HANG_GAP, PERF_TIMERS
 
Constructor Summary
FlipFrameManager()
           
 
Method Summary
protected  Graphics2D createGraphics()
          Returns a graphics context with which to layout its media objects.
protected  void paint(long tickStamp)
          Called once per frame to invoke FrameManager.paint(long) on all of our frame participants' components and all dirty components managed by our ActiveRepaintManager.
protected  void restoreFromBack(Rectangle dirty)
          Called by the ManagedJFrame when our window was hidden and reexposed.
 
Methods inherited from class com.threerings.media.FrameManager
clearMaxTimerDriftRatio, clearMediaOverlay, createTimer, getManagedRoot, getMaxTimerDriftRatio, getMediaOverlay, getPerfMetrics, getPerfTicks, getPerfTries, getRoot, getTimeStamp, init, isRegisteredFrameParticipant, isRunning, newInstance, newInstance, paint, registerFrameParticipant, removeFrameParticipant, renderLayer, renderLayers, setTargetFrameRate, start, stop, tick, tickParticipants
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_bufstrat

protected BufferStrategy _bufstrat
The buffer strategy used to do our rendering.

Constructor Detail

FlipFrameManager

public FlipFrameManager()
Method Detail

paint

protected void paint(long tickStamp)
Description copied from class: FrameManager
Called once per frame to invoke FrameManager.paint(long) on all of our frame participants' components and all dirty components managed by our ActiveRepaintManager.

Specified by:
paint in class FrameManager

createGraphics

protected Graphics2D createGraphics()
Description copied from class: FrameManager
Returns a graphics context with which to layout its media objects. The returned context must be disposed when layout is complete and must not be retained across frame ticks. Used by the MediaOverlay.

Specified by:
createGraphics in class FrameManager

restoreFromBack

protected void restoreFromBack(Rectangle dirty)
Description copied from class: FrameManager
Called by the ManagedJFrame when our window was hidden and reexposed.

Specified by:
restoreFromBack in class FrameManager