private RenderBatch GetRenderedBatch(RenderTreeBuilder from, RenderTreeBuilder to)
        {
            var batchBuilder = new RenderBatchBuilder();

            diff.ApplyNewRenderTreeVersion(batchBuilder, 0, from.GetFrames(), to.GetFrames());
            return(batchBuilder.ToBatch());
        }
        private RenderBatch GetRenderedBatch(RenderTreeBuilder from, RenderTreeBuilder to)
        {
            var batchBuilder = new RenderBatchBuilder();
            var diff         = RenderTreeDiffBuilder.ComputeDiff(renderer, batchBuilder, 0, from.GetFrames(), to.GetFrames());

            batchBuilder.UpdatedComponentDiffs.Append(diff);
            return(batchBuilder.ToBatch());
        }
        private RenderBatch GetRenderedBatch(RenderTreeBuilder from, RenderTreeBuilder to, bool initializeFromFrames)
        {
            if (initializeFromFrames)
            {
                var emptyFrames = new RenderTreeBuilder(renderer).GetFrames();
                var oldFrames   = from.GetFrames();
                RenderTreeDiffBuilder.ComputeDiff(renderer, new RenderBatchBuilder(), 0, emptyFrames, oldFrames);
            }

            var batchBuilder = new RenderBatchBuilder();
            var diff         = RenderTreeDiffBuilder.ComputeDiff(renderer, batchBuilder, 0, from.GetFrames(), to.GetFrames());

            batchBuilder.UpdatedComponentDiffs.Append(diff);
            return(batchBuilder.ToBatch());
        }