/** * True when the mode has to be evaluated in a shader against a copy of the * frame rather than left to the blend state. * * multiply and screen fold only against an opaque backdrop. The full formula * also carries the source over the part of the pixel the backdrop does not * cover, and factors that reach the destination cannot carry that as well: a * multiply over nothing came out black where canvas draws the source plainly. * A frame cleared opaque stays opaque wherever anything draws, since source * over leaves the alpha at one, so there the shortcut is exact. * * A mark that batches its items has to stop batching where this is true. The * copy is read once per draw, so two items sharing one would both blend with * what was there before either of them, and canvas composites item by item. */ export declare function needsBackdrop(key: string, opaqueBackdrop: boolean): boolean; /** Replaces the pixel, for a composite that has already done the blending. */ export declare const REPLACE: GPUBlendState; /** * The mode to build a pipeline with, given the one it was asked for. A mode the * blend state cannot express builds unblended, and `record` then ties the * pipeline back to what it stands in for so the queue can lift its draws into a * layer. Every pipeline that carries a blend goes through this. */ export declare function buildBlend(blend: string, opaqueBackdrop: boolean): { blend: string; record: (pipeline: GPURenderPipeline) => void; }; /** The mode a pipeline's draws are composited with, or undefined for the frame. */ export declare function layerMode(pipeline: GPURenderPipeline): string | undefined; /** Normalizes a mark's blend to one this renderer keys a pipeline by. */ export declare function blendKey(blend: string | null | undefined): string; export declare function blendState(key: string): GPUBlendState;