Skip to content

CpuImageFilterExecutor class

Backend-agnostic CPU evaluator for ImageFilter graphs. Walks the DAG recursively, materializing each intermediate as a scratch BGRA32 buffer rented from the context’s pool. All math runs in premultiplied alpha (linearly blendable) and the result’s IsPremultiplied reports true.

public sealed class CpuImageFilterExecutor : IImageFilterExecutor
name description
CpuImageFilterExecutor() The default constructor.
MaxInputScale { get; }
Execute(…)

Used as:

  • The default executor when no GPU backend is available.
  • The fallback executor for GPU backends - they delegate unsupported nodes here. In that case the GPU result is read back via ReadPixels and processed on CPU; subsequent GPU nodes re-upload the CPU result.

Correctness over speed: this is the reference implementation for image filter semantics, not the perf path. GPU executors should match its output bit-exactly (within sRGB rounding).