Vixen
02b45cc4
csharp
public sealed class DrawList

A frame's worth of drawing, and whether it differs from the last one.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Doc 09 asks for the list to be diffed at the command level so that a static user interface re-submits a cached command buffer instead of rebuilding one. That is what Version is: it changes when the drawing changes and not when the drawing is merely rebuilt, so a renderer can compare one integer instead of a list.

⚠ The comparison is against the previous content, not against a dirty flag. A flag says what the framework believes changed; this says what actually did — and the two part company exactly when something is invalidated too eagerly, which is the failure a cache is supposed to absorb rather than propagate.

Fields and properties (9)

  • public IReadOnlyList<DrawCommand> Commands

    The commands, in the order they are drawn.

  • public IReadOnlyList<PositionedGlyph> Glyphs

    Every glyph of every text command, back to back.

  • public IReadOnlyList<PathSegment> Segments

    Every step of every path, back to back.

  • public IReadOnlyList<BoxStyle> Boxes

    The styles of the boxes that needed one.

  • public IReadOnlyList<FontFace> Fonts

    The faces the text commands refer to, in the order they were first used.

  • public IReadOnlyList<DrawBatch> Batches

    The commands grouped into runs a renderer can submit together.

  • public int Batched

    How many times the batches have been rebuilt.

  • public int Version

    Bumped whenever the commands differ from the previous frame's.

  • public bool ChangedLastFrame

    Whether the last EndFrame changed anything.

Methods (7)

  • public void BeginFrame()

    Starts collecting a frame.

  • public void Add(DrawCommand command)

    Adds a command.

  • public int AddGlyphs(List<PositionedGlyph> run)

    Puts a run of glyphs in the side buffer.

  • public int AddBox(BoxStyle style)

    Puts a box's style in the side buffer.

  • public int AddPath(PathBuilder path)

    Puts a path in the side buffer.

  • public int AddFont(FontFace font)

    Finds or adds a font.

  • public bool EndFrame()

    Finishes a frame and works out whether anything moved.

Used by (30)

  • UiHostHelloUi
  • BatchTestsVixen.Ui.Tests
  • DrawContextVixen.Ui
  • DrawListBuilderVixen.Ui
  • DrawListTestsVixen.Ui.Tests
  • FontFallbackTestsVixen.Ui.Tests
  • IconAtlasTestsVixen.Ui.Tests
  • NineSliceImageTestsVixen.Ui.Tests
  • PathTessellationCacheTestsVixen.Ui.Tests
  • PathTestsVixen.Ui.Tests
  • RasterizerTestsVixen.Ui.Testing.Tests
  • RemovalTestsVixen.Ui.Tests
  • SurfaceTestsVixen.Ui.Controls.Tests
  • SurfaceTestsVixen.Ui.Tests
  • TessellationVixen.Ui
  • TextFieldTestsVixen.Ui.Controls.Tests
  • TextTestsVixen.Ui.Tests
  • TextWrapTestsVixen.Ui.Tests
  • UiDocumentVixen.Ui
  • UiFrameLifetimeTestsVixen.Graphics.Golden.Tests
  • UiGeometryBuilderVixen.Ui
  • UiGeometryTestsVixen.Ui.Tests
  • UiImageTestsVixen.Graphics.Golden.Tests
  • UiSurfaceVixen.Ui
  • VideoInUiTestsVixen.Video.Rendering.Tests
  • ViewportTestsVixen.Ui.Controls.Advanced.Tests
  • VisibilityTestsVixen.Ui.Testing.Tests
  • EditorHostVixen.Editor.Host
  • EditorShellTestsVixen.Editor.Ui.Tests
  • ViewTestsVixen.Editor.NodeGraph.Tests