New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 774520 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 24
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocking:
issue 634542



Sign in to add a comment

Replace SkColorSpaceXform::apply() with the new Skia API

Project Member Reported by zakerinasab@chromium.org, Oct 13 2017

Issue description

According to the discussion with brianosman@, there will be a new SkColorSpaceXform API, taking src, srcColorType, srcAlphaType*, dst, dstColorType, and dstAlphaType*. The alpha type param will be opaque, unpremul, linearPremul, nonlinearPremul (i.e. legacy), so that any possible data shape (and operation) can be described.

Whenever this API is available, refactor the following to use the new API:
- ImageData::ImageDataInCanvasColorSettings()
- ColorCorrectionUtils
- ImageData unit tests
- ImageBitmap unit tests
- CanvasRenderingContext unit tests
 
Blocking: 634542
Call sites are not limited to the above list anymore. The new API, whenever ready, should replace the old one wherever SkColorSpaceXform::apply() or SkColorSpaceXform::Apply() are used in Blink->Canvas code.
Cc: -junov@chromium.org
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cc7d7079b035941ebe6f8a2e713beff3a32d849f

commit cc7d7079b035941ebe6f8a2e713beff3a32d849f
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Mon Sep 17 19:09:38 2018

Refactor ImageData and ColorCorrectionUtils

This change:
- adds support for u16 readback in canvas.getImageData.
- removes SkColorSpaceXform call sites from ImageData and
  ColorCorrectionUtils source code and uses skcms_Transform
  wherever appropriate.
- does some minor other refactorings.

TBR=fserb@chromium.org

Bug:  774520 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I172df3b44ab1eec289d611b2e9a35790dad0c5c1
Reviewed-on: https://chromium-review.googlesource.com/1187232
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Reviewed-by: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591763}
[modify] https://crrev.com/cc7d7079b035941ebe6f8a2e713beff3a32d849f/third_party/blink/renderer/core/BUILD.gn
[modify] https://crrev.com/cc7d7079b035941ebe6f8a2e713beff3a32d849f/third_party/blink/renderer/core/html/BUILD.gn
[modify] https://crrev.com/cc7d7079b035941ebe6f8a2e713beff3a32d849f/third_party/blink/renderer/core/html/canvas/image_data.cc
[modify] https://crrev.com/cc7d7079b035941ebe6f8a2e713beff3a32d849f/third_party/blink/renderer/core/html/canvas/image_data.h
[modify] https://crrev.com/cc7d7079b035941ebe6f8a2e713beff3a32d849f/third_party/blink/renderer/core/html/canvas/image_data_test.cc
[modify] https://crrev.com/cc7d7079b035941ebe6f8a2e713beff3a32d849f/third_party/blink/renderer/core/imagebitmap/image_bitmap_test.cc
[modify] https://crrev.com/cc7d7079b035941ebe6f8a2e713beff3a32d849f/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_test.cc
[modify] https://crrev.com/cc7d7079b035941ebe6f8a2e713beff3a32d849f/third_party/blink/renderer/platform/graphics/canvas_color_params_test.cc
[modify] https://crrev.com/cc7d7079b035941ebe6f8a2e713beff3a32d849f/third_party/blink/renderer/platform/graphics/color_correction_test_utils.cc
[modify] https://crrev.com/cc7d7079b035941ebe6f8a2e713beff3a32d849f/third_party/blink/renderer/platform/graphics/color_correction_test_utils.h

Project Member

Comment 5 by bugdroid1@chromium.org, Sep 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1bdeee6598f0a6dd657efb6f589f465b354ce573

commit 1bdeee6598f0a6dd657efb6f589f465b354ce573
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Wed Sep 19 22:01:26 2018

Add "preserve" color space conversion option to ImageBitmap

This CL:
 - adds "preserve" color space conversion option to ImageBitmap.
 - replaces sRGB with color spin color space as the source color space in ImageBitmap unit tests.
 - removes SkColorSpaceXform usage from ImageBitmap unit tests.

Bug:842688,  774520 
TBR=fserb@chromium.org

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I62df4c8bd0cd69b0da36dee4dd2f62ed1714d884
Reviewed-on: https://chromium-review.googlesource.com/1234017
Reviewed-by: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592565}
[modify] https://crrev.com/1bdeee6598f0a6dd657efb6f589f465b354ce573/third_party/blink/renderer/core/imagebitmap/image_bitmap.cc
[modify] https://crrev.com/1bdeee6598f0a6dd657efb6f589f465b354ce573/third_party/blink/renderer/core/imagebitmap/image_bitmap.h
[modify] https://crrev.com/1bdeee6598f0a6dd657efb6f589f465b354ce573/third_party/blink/renderer/core/imagebitmap/image_bitmap_options.idl
[modify] https://crrev.com/1bdeee6598f0a6dd657efb6f589f465b354ce573/third_party/blink/renderer/core/imagebitmap/image_bitmap_test.cc
[modify] https://crrev.com/1bdeee6598f0a6dd657efb6f589f465b354ce573/third_party/blink/renderer/platform/graphics/color_correction_test_utils.cc
[modify] https://crrev.com/1bdeee6598f0a6dd657efb6f589f465b354ce573/third_party/blink/renderer/platform/graphics/color_correction_test_utils.h
[modify] https://crrev.com/1bdeee6598f0a6dd657efb6f589f465b354ce573/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc
[modify] https://crrev.com/1bdeee6598f0a6dd657efb6f589f465b354ce573/third_party/blink/renderer/platform/graphics/static_bitmap_image.h

Project Member

Comment 6 by bugdroid1@chromium.org, Sep 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/267cb8af204bec0c8ab16b956ff3befec2790fca

commit 267cb8af204bec0c8ab16b956ff3befec2790fca
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Mon Sep 24 21:05:18 2018

Remove SkColorSpaceXform usage from Canvas code

This is the last CL to remove SkColorSpaceXform call sites from
third_party/blink. This change also does some refactoring in
ImageBitmap unit tests, etc.

TBR=fserb@chromium.org

Bug:  774520 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I8279f1687ef096ae9aa2179c74d5d6cf2364ce9b
Reviewed-on: https://chromium-review.googlesource.com/1237140
Reviewed-by: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593674}
[modify] https://crrev.com/267cb8af204bec0c8ab16b956ff3befec2790fca/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc
[modify] https://crrev.com/267cb8af204bec0c8ab16b956ff3befec2790fca/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator_test.cc
[modify] https://crrev.com/267cb8af204bec0c8ab16b956ff3befec2790fca/third_party/blink/renderer/core/imagebitmap/image_bitmap_test.cc
[modify] https://crrev.com/267cb8af204bec0c8ab16b956ff3befec2790fca/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_test.cc
[modify] https://crrev.com/267cb8af204bec0c8ab16b956ff3befec2790fca/third_party/blink/renderer/platform/graphics/canvas_color_params_test.cc
[modify] https://crrev.com/267cb8af204bec0c8ab16b956ff3befec2790fca/third_party/blink/renderer/platform/graphics/color_correction_test_utils.cc
[modify] https://crrev.com/267cb8af204bec0c8ab16b956ff3befec2790fca/third_party/blink/renderer/platform/graphics/color_correction_test_utils.h
[modify] https://crrev.com/267cb8af204bec0c8ab16b956ff3befec2790fca/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc
[modify] https://crrev.com/267cb8af204bec0c8ab16b956ff3befec2790fca/third_party/blink/renderer/platform/image-decoders/image_frame_test.cc

Status: Fixed (was: Assigned)
Project Member

Comment 8 by bugdroid1@chromium.org, Sep 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/723be3e447d347077494627c2a045ec86a37fbd2

commit 723be3e447d347077494627c2a045ec86a37fbd2
Author: Findit <findit-for-me@appspot.gserviceaccount.com>
Date: Mon Sep 24 22:05:36 2018

Revert "Remove SkColorSpaceXform usage from Canvas code"

This reverts commit 267cb8af204bec0c8ab16b956ff3befec2790fca.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 593674 as the
culprit for failures in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtLzI2N2NiOGFmMjA0YmVjMGM4YWIxNmI5NTZmZjNiZWZlYzI3OTBmY2EM

Sample Failed Build: https://ci.chromium.org/buildbot/chromium.linux/linux-jumbo-rel/7066

Sample Failed Step: compile

Original change's description:
> Remove SkColorSpaceXform usage from Canvas code
> 
> This is the last CL to remove SkColorSpaceXform call sites from
> third_party/blink. This change also does some refactoring in
> ImageBitmap unit tests, etc.
> 
> TBR=fserb@chromium.org
> 
> Bug:  774520 
> Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
> Change-Id: I8279f1687ef096ae9aa2179c74d5d6cf2364ce9b
> Reviewed-on: https://chromium-review.googlesource.com/1237140
> Reviewed-by: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#593674}

Change-Id: I8fd0d3dcd6e2e5e4eb8251485ce07451bf8f11e2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  774520 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/1241762
Cr-Commit-Position: refs/heads/master@{#593706}
[modify] https://crrev.com/723be3e447d347077494627c2a045ec86a37fbd2/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc
[modify] https://crrev.com/723be3e447d347077494627c2a045ec86a37fbd2/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator_test.cc
[modify] https://crrev.com/723be3e447d347077494627c2a045ec86a37fbd2/third_party/blink/renderer/core/imagebitmap/image_bitmap_test.cc
[modify] https://crrev.com/723be3e447d347077494627c2a045ec86a37fbd2/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_test.cc
[modify] https://crrev.com/723be3e447d347077494627c2a045ec86a37fbd2/third_party/blink/renderer/platform/graphics/canvas_color_params_test.cc
[modify] https://crrev.com/723be3e447d347077494627c2a045ec86a37fbd2/third_party/blink/renderer/platform/graphics/color_correction_test_utils.cc
[modify] https://crrev.com/723be3e447d347077494627c2a045ec86a37fbd2/third_party/blink/renderer/platform/graphics/color_correction_test_utils.h
[modify] https://crrev.com/723be3e447d347077494627c2a045ec86a37fbd2/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc
[modify] https://crrev.com/723be3e447d347077494627c2a045ec86a37fbd2/third_party/blink/renderer/platform/image-decoders/image_frame_test.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Sep 25

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/926db268b78ff4c8287eea914c795729bd2d5631

commit 926db268b78ff4c8287eea914c795729bd2d5631
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Tue Sep 25 15:53:16 2018

Reland "Remove SkColorSpaceXform usage from Canvas code"

This relands chromium-review.googlesource.com/c/chromium/src/+/1237140
after addressing jumbo compile failure due to repeated enum values.

TBR=fserb@chromium.org

Bug:  774520 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I6922416b25272e29d115090fa61bc979f0317f0e
Reviewed-on: https://chromium-review.googlesource.com/1243423
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Reviewed-by: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593949}
[modify] https://crrev.com/926db268b78ff4c8287eea914c795729bd2d5631/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc
[modify] https://crrev.com/926db268b78ff4c8287eea914c795729bd2d5631/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator_test.cc
[modify] https://crrev.com/926db268b78ff4c8287eea914c795729bd2d5631/third_party/blink/renderer/core/imagebitmap/image_bitmap_test.cc
[modify] https://crrev.com/926db268b78ff4c8287eea914c795729bd2d5631/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_test.cc
[modify] https://crrev.com/926db268b78ff4c8287eea914c795729bd2d5631/third_party/blink/renderer/platform/graphics/canvas_color_params_test.cc
[modify] https://crrev.com/926db268b78ff4c8287eea914c795729bd2d5631/third_party/blink/renderer/platform/graphics/color_correction_test_utils.cc
[modify] https://crrev.com/926db268b78ff4c8287eea914c795729bd2d5631/third_party/blink/renderer/platform/graphics/color_correction_test_utils.h
[modify] https://crrev.com/926db268b78ff4c8287eea914c795729bd2d5631/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc
[modify] https://crrev.com/926db268b78ff4c8287eea914c795729bd2d5631/third_party/blink/renderer/platform/image-decoders/image_frame_test.cc

Sign in to add a comment