Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
Loading...
Searching...
No Matches
ShaderResult.h File Reference

Result type returned by fallible donner::gpu::shader APIs. More...

#include <ostream>
#include <type_traits>
#include <variant>
#include "donner/base/Utils.h"
#include "donner/gpu/shader/ShaderError.h"
Include dependency graph for ShaderResult.h:
This graph shows which files directly or indirectly include this file:

Classes

class  donner::gpu::shader::ShaderResult< T >
 Result of a fallible shader IR operation: exactly one of a value of type T or a ShaderError. More...

Namespaces

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

Typedefs

using donner::gpu::shader::ShaderStatus = ShaderResult<std::monostate>
 Status of a fallible shader IR operation with no result value.

Functions

ShaderStatus donner::gpu::shader::OkShaderStatus ()
 Returns a successful ShaderStatus.
template<typename T>
void donner::gpu::shader::PrintTo (const ShaderResult< T > &result, std::ostream *os)
 gtest PrintTo support for readable failure messages.

Detailed Description

Result type returned by fallible donner::gpu::shader APIs.

Typedef Documentation

◆ ShaderStatus

using donner::gpu::shader::ShaderStatus = ShaderResult<std::monostate>

Status of a fallible shader IR operation with no result value.

Construct success values with OkShaderStatus().

Function Documentation

◆ PrintTo()

template<typename T>
void donner::gpu::shader::PrintTo ( const ShaderResult< T > & result,
std::ostream * os )

gtest PrintTo support for readable failure messages.

Parameters
resultResult to print.
osOutput stream.