Add bit depth option to ImageBitmapOptions |
|||
Issue description
Add bit depth support to ImageBitmapOptions:
enum ImagePixelFormat { "8-8-8-8", "float16" };
partial dictionary ImageBitmapOptions {
[RuntimeEnabled=CanvasColorManagement] ImagePixelFormat ImagePixelFormat = "8-8-8-8";
};
This bug includes three tasks:
- Implement the new option
- Provide test coverage
- Add to the proposal
,
Jul 25
,
Sep 13
Looking again at this bug, it is not very clear why we should allow user to ask for a half float backed image bitmap from an 8888 image source even if source is wide gamut (since image bitmap is only provided for drawing on canvas without undue latency, and the bit depth does not affect the blending beyond precision).
,
Sep 13
The other way can make sense though, allowing users to create 8888 backed image bitmap from wide gamut sources with more than 8 bit per channel (like a 10 bit video or a 16 bit PNG).
,
Sep 13
May be:
enum ImagePixelFormat { "default", "8-8-8-8"};
partial dictionary ImageBitmapOptions {
[RuntimeEnabled=CanvasColorManagement] ImagePixelFormat imagePixelFormat = "default";
};
where default value will be the minimum bit depth that presents the image pixels without any precision loss and "8-8-8-8" enforces 8888 pixel format.
,
Sep 14
kbr@ also agrees that users don't need to be able to "over-allocate the backing store for things like images". Therefore, "8-8-8-8" option falls back to "default" if the image has less than 8 bit per channel.
,
Sep 18
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4939d044aac5cdec80a5117bee9f0398b89ee038 commit 4939d044aac5cdec80a5117bee9f0398b89ee038 Author: Reza.Zakerinasab <zakerinasab@chromium.org> Date: Tue Sep 18 14:27:51 2018 Add bit depth option to ImageBitmapOptions TBR=fserb@chromium.org Bug: 845556 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I623dad8aa5342ed2d6f1edd0f70ac3b41dbf84e1 Reviewed-on: https://chromium-review.googlesource.com/1228214 Reviewed-by: Mohammad Reza Zakerinasab <zakerinasab@chromium.org> Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org> Cr-Commit-Position: refs/heads/master@{#592033} [modify] https://crrev.com/4939d044aac5cdec80a5117bee9f0398b89ee038/third_party/blink/renderer/core/imagebitmap/image_bitmap.cc [modify] https://crrev.com/4939d044aac5cdec80a5117bee9f0398b89ee038/third_party/blink/renderer/core/imagebitmap/image_bitmap.h [modify] https://crrev.com/4939d044aac5cdec80a5117bee9f0398b89ee038/third_party/blink/renderer/core/imagebitmap/image_bitmap_options.idl [modify] https://crrev.com/4939d044aac5cdec80a5117bee9f0398b89ee038/third_party/blink/renderer/core/imagebitmap/image_bitmap_test.cc [modify] https://crrev.com/4939d044aac5cdec80a5117bee9f0398b89ee038/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc
,
Sep 18
|
|||
►
Sign in to add a comment |
|||
Comment 1 by zakerinasab@chromium.org
, May 22 2018