| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // https://github.com/junov/CanvasColorSpace/blob/master/CanvasColorSpaceProposa
l.md#imagedata | 30 // https://github.com/junov/CanvasColorSpace/blob/master/CanvasColorSpaceProposa
l.md#imagedata |
| 31 | 31 |
| 32 typedef (Uint8ClampedArray or Uint16Array or Float32Array) ImageDataArray; | 32 typedef (Uint8ClampedArray or Uint16Array or Float32Array) ImageDataArray; |
| 33 | 33 |
| 34 [ | 34 [ |
| 35 Constructor(unsigned long sw, unsigned long sh), | 35 Constructor(unsigned long sw, unsigned long sh), |
| 36 Constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long
sh), | 36 Constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long
sh), |
| 37 Exposed=(Window,Worker), | 37 Exposed=(Window,Worker), |
| 38 RaisesException=Constructor, | 38 RaisesException=Constructor, |
| 39 ] interface ImageData { | 39 ] interface ImageData { |
| 40 | |
| 41 // The following createImageData functions are used instead of the regular c
onstructors | |
| 42 // as currently Blink IDL does not allow to put custom constructors behind a
flag | |
| 43 // (crbug.com/672978). These must be replaced with regular constructor decla
ration | |
| 44 // as specified in the proposal before shipping. | |
| 45 // https://github.com/WICG/canvas-color-space/blob/master/CanvasColorSpacePr
oposal.md | |
| 46 | |
| 47 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] ImageData creat
eImageData(unsigned long sw, unsigned long sh, ImageDataColorSettings imageDataC
olorSettings); | |
| 48 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] ImageData creat
eImageData(ImageDataArray data, unsigned long sw, unsigned long sh, ImageDataCol
orSettings imageDataColorSettings); | |
| 49 | |
| 50 [RuntimeEnabled=ExperimentalCanvasFeatures] ImageDataColorSettings getColorS
ettings(); | 40 [RuntimeEnabled=ExperimentalCanvasFeatures] ImageDataColorSettings getColorS
ettings(); |
| 51 | 41 |
| 52 readonly attribute unsigned long width; | 42 readonly attribute unsigned long width; |
| 53 readonly attribute unsigned long height; | 43 readonly attribute unsigned long height; |
| 54 readonly attribute Uint8ClampedArray data; | 44 readonly attribute Uint8ClampedArray data; |
| 55 [RuntimeEnabled=ExperimentalCanvasFeatures] readonly attribute ImageDataArra
y dataUnion; | 45 [RuntimeEnabled=ExperimentalCanvasFeatures] readonly attribute ImageDataArra
y dataUnion; |
| 56 }; | 46 }; |
| OLD | NEW |