public BackgroundCachedLineUpdater(
            CachedTextRenderer renderer,
            CachedLineList lines)
        {
            this.renderer = renderer;
            this.lines    = lines;

            needRestart = true;
            maximumTime = TimeSpan.FromMilliseconds(13);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CachedTextRenderer" /> class.
        /// </summary>
        /// <param name="displayContext">The display context.</param>
        /// <param name="editorViewRenderer">The text renderer.</param>
        public CachedTextRenderer(
            IDisplayContext displayContext,
            EditorViewRenderer editorViewRenderer)
            : base(displayContext, editorViewRenderer)
        {
            // Keep track of the thread we've been created on.
            thread = Thread.CurrentThread;

            // Set the cache window properties.
            access           = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion);
            queuedLineEvents = new List <Action>();

            // Create a collection of the initial buffer lines.
            lines = new CachedLineList();

            AllocateLines();

            // Create a background loader that will attempt to calculate the
            // layout and heights of lines using the GUI's idle loop.
            backgroundUpdater = new BackgroundCachedLineUpdater(this, lines);
            backgroundUpdater.Restart();
        }