|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
Holds one production device for the whole corpus, because device creation compiles every shared pipeline and is far more expensive than any single scene. More...
#include "donner/gpu/baseline/WgpuBaselineCapture.h"
Public Member Functions | |
| WgpuBaselineCapturer (const WgpuBaselineCapturer &)=delete | |
| WgpuBaselineCapturer & | operator= (const WgpuBaselineCapturer &)=delete |
| const CaptureEnvironment & | environment () const |
| The adapter this capturer is bound to. | |
| std::string | capture (const CorpusScene &scene, std::vector< uint8_t > &pixelsOut) |
| Renders one scene and reads its pixels back. | |
Static Public Member Functions | |
| static std::unique_ptr< WgpuBaselineCapturer > | Create () |
| Creates a capturer, or returns null when no GPU adapter is available on this host. | |
Holds one production device for the whole corpus, because device creation compiles every shared pipeline and is far more expensive than any single scene.
| std::string donner::gpu::baseline::WgpuBaselineCapturer::capture | ( | const CorpusScene & | scene, |
| std::vector< uint8_t > & | pixelsOut ) |
Renders one scene and reads its pixels back.
| scene | Scene to render. |
| pixelsOut | Receives tightly packed RGBA8 premultiplied pixels, row-major, kCorpusSize * kCorpusSize * 4 bytes. |