private final ShapeCollection rootShapeCollection = new ShapeCollection();
private final Set<ViewRenderListener> viewRenderListeners = ConcurrentHashMap.newKeySet();
public Color backgroundColor = Color.BLACK;
+
/**
- * Last time this view was updated.
+ * Stores milliseconds when last frame was updated. This is needed to calculate time delta between frames.
+ * Time delta is used to calculate smooth animation.
*/
private long lastUpdateMillis = 0;
+
+ /**
+ * Timer that is used to update canvas at target FPS rate.
+ */
private Timer canvasUpdateTimer;
+
private ViewUpdateTimerTask canvasUpdateTimerTask;
private RenderingContext renderingContext = null;