v134 · graphics
Image Pipeline
A multi-stage OffscreenCanvas pipeline: source → filter → composite → display. Each stage reads getContextAttributes() to verify the engine granted the attributes it requested — alpha, colorSpace, willReadFrequently. Mismatches are flagged before the pipeline runs.
checking OffscreenCanvas…
checking getContextAttributes…
Chrome 134 adds
getContextAttributes() to OffscreenCanvasRenderingContext2D. This is critical for worker-thread pipelines: a worker creates an OffscreenCanvas, requests specific attributes, then calls getContextAttributes() to confirm the engine honored them before performing expensive operations that depend on those attributes.
Pipeline configuration
Pipeline stages
getContextAttributes() per stage
| Stage | Requested alpha | Granted alpha | Requested colorSpace | Granted colorSpace | willReadFrequently | Status |
|---|
Why it matters: if you request
colorSpace: "display-p3" but the engine falls back to srgb (e.g. on unsupported hardware), reading getContextAttributes() tells you before you run a P3-dependent color transform that would produce wrong output. The willReadFrequently flag tells the engine to keep the raster in CPU-accessible memory — calling getImageData() repeatedly without it causes costly GPU readbacks.