ImageData: Add constructors for canvas color extension
Add new constructors for ImageData. These come in two flavors: ones that take an optional ImageDataSettings, and ones that take an array that isn't Uint8ClampedArray. Move all ImageData::Create instances to be in the header file, since they are one line long now, and there are many more of them (all optional arguments are expanded into several separate Create functions). Because IDL files do not allow runtime feature checks in constructors, add a new parameter for ImageData::ValidateAndCreate to add this check. Add tests for all of these configurations. R=yiyix TBR=fserb Bug: 1160105 Change-Id: Ib4392cd1ace7ff52789083c72b771eb50228f9c4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2605629Reviewed-by:ccameron <ccameron@chromium.org> Reviewed-by:
Yi Xu <yiyix@chromium.org> Commit-Queue: ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#839893}
Showing
Please register or sign in to comment