Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::editor::DocumentPresenter Class Referenceabstract

The per-frame document presentation decision. More...

#include "donner/editor/DocumentPresenter.h"

Inheritance diagram for donner::editor::DocumentPresenter:
[legend]

Public Member Functions

virtual DocumentPresentationResult resolveExternalSurface (const DocumentPresentationFrame &frame)=0
 Stage 1: open the frame and resolve the transform this frame's document pixels are placed with.
virtual bool presentUnderlay (std::optional< FramebufferUnderlayPlan > plan)=0
 Stage 2: install this frame's framebuffer underlay plan, or clear the underlay when there is nothing directly presentable.
virtual std::uint64_t refusedUnderlayPresentCount () const =0
 Count of stage-2 calls refused because no frame was open. Diagnostic only.

Detailed Description

The per-frame document presentation decision.

Driven in two ordered stages per frame, because the shell's own work sits between them:

  1. resolveExternalSurface runs before selection-chrome rasterization, which needs to know whether an external surface already owns (and has already baked chrome into) this frame's pixels.
  2. presentUnderlay runs after tile suppression is final.

Calling the stages out of order is a programming error; implementations refuse the second stage rather than installing a plan against a frame that was never opened.

Member Function Documentation

◆ presentUnderlay()

virtual bool donner::editor::DocumentPresenter::presentUnderlay ( std::optional< FramebufferUnderlayPlan > plan)
pure virtual

Stage 2: install this frame's framebuffer underlay plan, or clear the underlay when there is nothing directly presentable.

Closes the frame.

Parameters
planTiles and placement for the underlay, or std::nullopt.
Returns
True when the underlay presents document pixels this frame.

Implemented in donner::editor::FramebufferUnderlayPresenter.

◆ refusedUnderlayPresentCount()

virtual std::uint64_t donner::editor::DocumentPresenter::refusedUnderlayPresentCount ( ) const
nodiscardpure virtual

Count of stage-2 calls refused because no frame was open. Diagnostic only.

Implemented in donner::editor::FramebufferUnderlayPresenter.

◆ resolveExternalSurface()

virtual DocumentPresentationResult donner::editor::DocumentPresenter::resolveExternalSurface ( const DocumentPresentationFrame & frame)
pure virtual

Stage 1: open the frame and resolve the transform this frame's document pixels are placed with.

Parameters
framePer-frame presentation inputs.
Returns
What this frame resolved to.

Implemented in donner::editor::FramebufferUnderlayPresenter.


The documentation for this class was generated from the following file: