public DrawingEngine(IDevice device, ThemeOptions themeOptions, IVisualTransitionFactory visualTransitionFactory) { _device = device; _themeOptions = themeOptions; _imagesToDevice = new LazyDictionary <Location, LayoutDrawElement>(); _switchedLocations = new ConcurrentDictionary <Location, Location>(); _visualEffectProcessor = new VisualEffectProcessor(_device, visualTransitionFactory); }
public VisualEffectProcessor(IDevice device, IVisualTransitionFactory visualTransitionFactory) { _device = device; _visualTransitionFactory = visualTransitionFactory; _disposeLock = new object(); _cts = new CancellationTokenSource(); _transitionsAdded = new AsyncAutoResetEvent(); _currentTransitions = new LazyDictionary <Location, VisualEffectInfo>(); _scheduledTransitions = new ConcurrentQueue <LayoutDrawElement>(); _drawTask = DrawCycle(_cts.Token); }