Donner SVG main
0.8.0 ยท 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::svg::compositor::CompositorController::PromoteResult Struct Reference

Result of requesting an editor-facing compositor presentation plan. More...

#include "donner/svg/compositor/CompositorController.h"

Public Types

enum class  Code : uint8_t {
  PromotedLayer ,
  OwningTilesRequired ,
  InvalidEntity ,
  LayerLimit ,
  MemoryLimit ,
  DescendantPromoted
}
 Outcome of a request to promote an entity into a compositor layer. More...

Public Member Functions

bool promotedLayer () const
 Whether the entity owns a promoted layer.
bool owningTilesRequired () const
 Whether the entity must remain inside its compositor-owned tiles.
 operator bool () const
 True only when the entity owns a promoted layer.

Public Attributes

Code code = Code::PromotedLayer
 Result code for this promotion request.

Static Public Attributes

static constexpr Code PromotedLayer = Code::PromotedLayer
 Entity owns a promoted layer.
static constexpr Code OwningTilesRequired
 Valid request that must remain in owning tiles.
static constexpr Code InvalidEntity
 Entity is not a live SVG element.
static constexpr Code LayerLimit = Code::LayerLimit
 Layer count limit was reached.
static constexpr Code MemoryLimit = Code::MemoryLimit
 Memory limit was reached.
static constexpr Code DescendantPromoted
 A descendant already owns a promoted layer.

Friends

std::ostream & operator<< (std::ostream &stream, Code value)
 Prints the name of value.
std::ostream & operator<< (std::ostream &stream, const PromoteResult &result)
 Prints the name of the result's code.
bool operator== (PromoteResult result, Code code)
 Compare a promotion result with a result code.
bool operator== (Code code, PromoteResult result)
 Compare a result code with a promotion result.

Detailed Description

Result of requesting an editor-facing compositor presentation plan.

Member Enumeration Documentation

◆ Code

Outcome of a request to promote an entity into a compositor layer.

Enumerator
PromotedLayer 

The requested entity owns a promoted compositor layer.

OwningTilesRequired 

The request is valid but cannot be extracted from its owning compositor tiles.

InvalidEntity 

The requested entity is not a live SVG element in the document.

LayerLimit 

The compositor cannot add another layer without exceeding the layer limit.

MemoryLimit 

The promotion was refused for memory: retained pixels plus one canvas-sized frame target (two while a slot is drawn directly and the editor presents the composed frame in place of its tiles) reached the total threshold; retained CPU bitmaps reached the heap bitmap threshold; the entity's complete interaction tile exceeds the largest tile the compositor admits; or the request repeats, at the same raster size and surface transform, one that was refused because its complete tile was oversized or dropped after a texture allocation failure while it held an exclusive layer.

DescendantPromoted 

A descendant is already promoted, so this entity was not promoted.

◆ operator== [1/2]

bool operator== ( Code code,
PromoteResult result )
friend

Compare a result code with a promotion result.

Parameters
codeCode to compare against.
resultPromotion result to inspect.

◆ operator== [2/2]

bool operator== ( PromoteResult result,
Code code )
friend

Compare a promotion result with a result code.

Parameters
resultPromotion result to inspect.
codeCode to compare against.

Member Data Documentation

◆ DescendantPromoted

Code donner::svg::compositor::CompositorController::PromoteResult::DescendantPromoted
staticconstexpr
Initial value:
=
@ DescendantPromoted
A descendant is already promoted, so this entity was not promoted.
Definition CompositorController.h:413

A descendant already owns a promoted layer.

◆ InvalidEntity

Code donner::svg::compositor::CompositorController::PromoteResult::InvalidEntity
staticconstexpr
Initial value:
=
@ InvalidEntity
The requested entity is not a live SVG element in the document.
Definition CompositorController.h:401

Entity is not a live SVG element.

◆ OwningTilesRequired

Code donner::svg::compositor::CompositorController::PromoteResult::OwningTilesRequired
staticconstexpr
Initial value:
=
@ OwningTilesRequired
The request is valid but cannot be extracted from its owning compositor tiles.
Definition CompositorController.h:399

Valid request that must remain in owning tiles.


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