Donner SVG main
0.8.0 ยท 382bd0190.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::editor::DocumentPresentationCompositor Class Reference

Composes cached non-WGPU document tiles into one transparent GL texture. More...

#include "donner/editor/DocumentPresentationCompositor.h"

Public Member Functions

 DocumentPresentationCompositor (const DocumentPresentationCompositor &)=delete
DocumentPresentationCompositor & operator= (const DocumentPresentationCompositor &)=delete
DocumentCompositeTextureView compose (const FramePresentation &frame)
 Compose the current document presentation into one pane-sized texture.
void reset ()
 Invalidate the cached request and clear its presented view while retaining allocations.
std::uint64_t retainedBytes () const
 Bytes retained by document intermediates and software-rendered frame paint textures.
void failNextSoftwarePaintUploadForTesting ()
 Refuse the next software paint upload before changing any presented pixels.
std::uint64_t compositionCountForTesting () const
 Number of cache-miss compositions, exposed for deterministic performance tests.

Detailed Description

Composes cached non-WGPU document tiles into one transparent GL texture.

The compositor preserves each tile's full affine presentation quad, including live drag and transform previews. It performs the tile blend in premultiplied form, resolves back to straight alpha for ImGui, and caches the result while all presentation inputs remain unchanged.

Member Function Documentation

◆ compose()

DocumentCompositeTextureView donner::editor::DocumentPresentationCompositor::compose ( const FramePresentation & frame)
nodiscard

Compose the current document presentation into one pane-sized texture.

Parameters
frameValidated camera, clip and resolved tile geometry shared with chrome.
Returns
Cached or newly composed texture view, or an empty view when composition is invalid.

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