Make ImageDataColorSettings param in CRC2D.createImageData optional |
||
Issue descriptionCurrently we have two separate method declaration in CanvasRenderingContext2D.idl as follows: [RaisesException] ImageData createImageData(long sw, long sh); [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] ImageData createImageData(unsigned long sw, unsigned long sh, ImageDataColorSettings imageDataColorSettings); When the second method is not behind a flag, these two must merge and the ImageDataColorSettings param must be optional.
,
Oct 24
This doesn't seem to be correct to do. When setting the ImageDataColorSettings optional, context.createImageData(w,h) uses the default values for ImageDataColorSettings, hence setting the storage format of the ImageData object always to uint8. If the context pixel format is float 16, this is not the intended behavior. Instead, we want to have the ImageData follow the color settings of the canvas, so the storage format should be float 32 not uint8. To achieve this, we need to keep these two API separate. |
||
►
Sign in to add a comment |
||
Comment 1 by junov@chromium.org
, Jul 25