Open ku8ar opened 3 years ago
I was wondering the same while playing with this BlurHash/Paint API experiment. Are there any plans to introduce this?
The PaintWorklet context is currently restricted to the operations that can be translated into DisplayLists and similar underlying browser drawing tech, so that it can be stored, painted, and replayed more easily without needing to allocate potentially-large pixel buffers.
Original question
PaintRenderingContext2D does not have
putImageData
and anImageData
interface. IfPaintWorklet
allowed pixel manipulation withCanvasRenderingContext2D
, it would be possible to create beautiful placeholders (e.g. using BlurHash algorithm). Why doesn'tPaintWorklet
allow direct manipulation of pixels? Or maybe there is any other way to draw an image inPaintWorklet
fromUint8ClampedArray
source?