|
|
Donner 0.5.1
Embeddable browser-grade SVG2 engine
|
GPU filter-graph executor. More...
#include "donner/svg/renderer/geode/GeodeFilterEngine.h"
Public Member Functions | |
| GeodeFilterEngine (GeodeDevice &device, bool verbose=false) | |
| GeodeFilterEngine (const GeodeFilterEngine &)=delete | |
| GeodeFilterEngine & | operator= (const GeodeFilterEngine &)=delete |
| wgpu::Texture | execute (const svg::components::FilterGraph &graph, const wgpu::Texture &sourceGraphic, const Box2d &filterRegion, const Transform2d &deviceFromFilter) |
| Execute a filter graph against the source-graphic texture. | |
GPU filter-graph executor.
Given a FilterGraph and a source-graphic texture (the offscreen layer snapshot captured between pushFilterLayer / popFilterLayer), executes the graph's primitives on the GPU and returns the final output texture.
Intermediate textures between primitives are allocated on demand and keyed by result names.
Currently supports:
Unsupported primitives pass the current buffer through unchanged.
|
explicit |
| device | The Geode device (owns wgpu::Device + queue). |
| verbose | If true, emit one-shot warnings for unsupported primitives. |
| wgpu::Texture donner::geode::GeodeFilterEngine::execute | ( | const svg::components::FilterGraph & | graph, |
| const wgpu::Texture & | sourceGraphic, | ||
| const Box2d & | filterRegion, | ||
| const Transform2d & | deviceFromFilter ) |
Execute a filter graph against the source-graphic texture.
The source texture must be RGBA8Unorm with TextureBinding usage. The returned texture is a freshly-allocated RGBA8Unorm texture sized to the filter region (or the source dimensions if no region is given).
| graph | The filter graph to execute. |
| sourceGraphic | The input texture (layer snapshot). |
| filterRegion | The filter region in user-space coordinates. |
| deviceFromFilter | The combined transform from filter/user-space to device-pixel coordinates, captured at pushFilterLayer time. Used to derive per-axis scale factors and to project directional parameters (e.g. feOffset dx/dy) through rotation/skew. |