|
|
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.
|
Caches the compiled wgpu::RenderPipeline for the checkerboard underlay the editor's direct framebuffer presentation draws behind transparent document regions, plus its bind group layout. More...
#include "donner/svg/renderer/geode/GeodeCheckerboardPipeline.h"
Classes | |
| struct | Uniforms |
| Uniform block consumed by the checkerboard shader. More... | |
Public Member Functions | |
| GeodeCheckerboardPipeline (const wgpu::Device &device, wgpu::TextureFormat colorFormat) | |
| Create the checkerboard pipeline for the given device and target format. | |
| GeodeCheckerboardPipeline (const GeodeCheckerboardPipeline &)=delete | |
| GeodeCheckerboardPipeline & | operator= (const GeodeCheckerboardPipeline &)=delete |
| GeodeCheckerboardPipeline (GeodeCheckerboardPipeline &&) noexcept=default | |
| Move constructor. | |
| GeodeCheckerboardPipeline & | operator= (GeodeCheckerboardPipeline &&) noexcept=default |
| Move assignment operator. | |
| bool | valid () const |
| True when the shader, bind group layout, and pipeline all compiled. | |
| const wgpu::RenderPipeline & | pipeline () const |
| The compiled render pipeline. | |
| const wgpu::BindGroupLayout & | bindGroupLayout () const |
| Bind group layout used by the pipeline. | |
Caches the compiled wgpu::RenderPipeline for the checkerboard underlay the editor's direct framebuffer presentation draws behind transparent document regions, plus its bind group layout.
Owned by GeodeDevice (lazily, via GeodeDevice::checkerboardPipeline()) so every consumer sharing the device reuses one compiled pipeline - wgpu-native retains every pipeline ever constructed, so per-consumer construction leaks (issue #575).
Bind group layout:
The pipeline takes no vertex buffer - the shader emits a fullscreen triangle from @builtin(vertex_index). A draw call is pass.draw(3, 1, 0, 0). The caller owns its uniform buffer and bind group; Uniforms pins the layout contract between the two.
| struct donner::geode::GeodeCheckerboardPipeline::Uniforms |
Uniform block consumed by the checkerboard shader.
| donner::geode::GeodeCheckerboardPipeline::GeodeCheckerboardPipeline | ( | const wgpu::Device & | device, |
| wgpu::TextureFormat | colorFormat ) |
Create the checkerboard pipeline for the given device and target format.
| device | The WebGPU device. |
| colorFormat | The pixel format of the render target this pipeline will draw into. Must match the target texture's format at draw time. |