Donner SVG main
0.8.0 ยท 382bd0190.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
GeodeRuntimeDeviceSource.h File Reference

Geode roots over runtime devices that their owner opens, instead of Donner's backend selection. More...

#include <memory>
#include "donner/gpu/Device.h"
Include dependency graph for GeodeRuntimeDeviceSource.h:

Classes

class  donner::geode::GeodeRuntimeDeviceSource
 Opens runtime devices over a GPU backend that its owner selected and keeps alive. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Functions

std::shared_ptr< GeodeGpuRoot > donner::geode::AdoptRuntimeDeviceSource (std::shared_ptr< GeodeRuntimeDeviceSource > source, const GeodeGpuRootCapabilities &capabilities, std::shared_ptr< gpu::DeviceLostState > lostState)
 Adopts source as a Geode root of kind GpuBackendKind::External.

Detailed Description

Geode roots over runtime devices that their owner opens, instead of Donner's backend selection.

Function Documentation

◆ AdoptRuntimeDeviceSource()

std::shared_ptr< GeodeGpuRoot > donner::geode::AdoptRuntimeDeviceSource ( std::shared_ptr< GeodeRuntimeDeviceSource > source,
const GeodeGpuRootCapabilities & capabilities,
std::shared_ptr< gpu::DeviceLostState > lostState )

Adopts source as a Geode root of kind GpuBackendKind::External.

The root never selects or names a backend: DONNER_GPU_BACKEND, a caller's backend choice and the platform default all refuse the external kind, so only a holder of a source reaches it.

Parameters
sourceOpens the runtime devices of every context over the root; must not be null.
capabilitiesWhat every device the source opens reports identically. Its backend kind is replaced with the external kind.
lostStateLoss condition shared by the root and every device source opens; must not be null.
Returns
The root, or null when source or lostState is null.