Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(790)

Issue 2522693002: Color correct ImageBitmap(HTMLImageElement*) constructor (Closed)

Created:
4 years, 1 month ago by zakerinasab
Modified:
3 years, 11 months ago
CC:
chromium-reviews, blink-reviews, msarett1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement color management for ImageBitamp in Canvas Implement color management for ImageBitmap as described in proposal: (github.com/junov/CanvasColorSpace/blob/master/CanvasColorSpaceProposal.md) ImageBitmap objects are augmented to have an internal color space attribute of type CanvasColorSpace. The colorSpaceConversion creation attribute also accepts enum values that correspond to CanvasColorSpace values. Specifying a CanvasColorSpace value results in a conversion of the image to the specified color space. This CL only covers the constructor that uses an HTMLImageElement object. BUG=665919 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Committed: https://crrev.com/0f76e01dbfc50d33d6bffb930487ff494babd695 Cr-Commit-Position: refs/heads/master@{#438272}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Resolving issues #

Total comments: 21

Patch Set 3 : Addressing comments and unit tests issues #

Total comments: 2

Patch Set 4 : Removing ImageDecoder::globalTargetColorSpace() calls for now #

Total comments: 9

Patch Set 5 : Addressing comments. #

Total comments: 1

Patch Set 6 : Addressing comments. #

Total comments: 4

Patch Set 7 : Color correction using SkColorSpaceXform #

Patch Set 8 : Minor correctinos #

Total comments: 8

Patch Set 9 : Addressing comments. #

Patch Set 10 : Putting the new "default" behavior behind a flag #

Patch Set 11 : Minor corrections #

Patch Set 12 : Swicth moved from cc to content + rebaseline. #

Patch Set 13 : Minor corrections. #

Patch Set 14 : Rebaseline #

Total comments: 15

Patch Set 15 : Addressing comments. #

Patch Set 16 : Addressing crash on memory sanitizer trybot #

Unified diffs Side-by-side diffs Delta from patch set Stats (+415 lines, -48 lines) Patch
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/common/common_param_traits_macros.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +8 lines, -0 lines 0 comments Download
M content/public/common/web_preferences.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/ImageBitmap.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +9 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/ImageBitmap.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 18 chunks +219 lines, -40 lines 0 comments Download
M third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +160 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/imagebitmap/ImageBitmapOptions.idl View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebRuntimeFeatures.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebRuntimeFeatures.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 101 (53 generated)
ccameron
https://codereview.chromium.org/2522693002/diff/1/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2522693002/diff/1/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode270 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:270: !colorCorrectRendering) { Ah -- as soon as https://codereview.chromium.org/2512683003/ lands ...
4 years, 1 month ago (2016-11-21 22:11:36 UTC) #3
xidachen
https://codereview.chromium.org/2522693002/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2522693002/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode247 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:247: return image; This part should be moved to the ...
4 years, 1 month ago (2016-11-22 20:34:38 UTC) #5
dcheng
Drive-by https://codereview.chromium.org/2522693002/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp File third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp (right): https://codereview.chromium.org/2522693002/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp#newcode196 third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp:196: static const std::vector<std::string> conversions = { Please use ...
4 years ago (2016-11-23 02:23:54 UTC) #6
zakerinasab
New patch uploaded. https://codereview.chromium.org/2522693002/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2522693002/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode259 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:259: return image; On 2016/11/22 20:34:37, xidachen ...
4 years ago (2016-11-24 18:18:33 UTC) #9
xidachen
Great work! Almost there. https://codereview.chromium.org/2522693002/diff/80001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2522693002/diff/80001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode437 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:437: : ImageDecoder::ColorSpaceIgnored); Why not move ...
4 years ago (2016-11-24 18:41:01 UTC) #10
zakerinasab
New patch submitted. https://codereview.chromium.org/2522693002/diff/80001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2522693002/diff/80001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode437 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:437: : ImageDecoder::ColorSpaceIgnored); On 2016/11/24 18:41:01, xidachen ...
4 years ago (2016-11-24 20:13:42 UTC) #11
xidachen
https://codereview.chromium.org/2522693002/diff/100001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2522693002/diff/100001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode69 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:69: //parsedOptions.dstColorSpace = ImageDecoder::globalTargetColorSpace(); On 2016/11/24 20:13:42, zakerinasab wrote: > ...
4 years ago (2016-11-24 20:27:32 UTC) #12
dcheng
https://codereview.chromium.org/2522693002/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp File third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp (right): https://codereview.chromium.org/2522693002/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp#newcode199 third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp:199: WTF::String(conversions[(uint8_t)(colorSpaceConversion)].c_str())); On 2016/11/24 18:18:33, zakerinasab wrote: > On 2016/11/23 ...
4 years ago (2016-11-24 20:28:15 UTC) #13
zakerinasab
New patch submitted (addressing comments). https://codereview.chromium.org/2522693002/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp File third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp (right): https://codereview.chromium.org/2522693002/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp#newcode199 third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp:199: WTF::String(conversions[(uint8_t)(colorSpaceConversion)].c_str())); On 2016/11/24 20:28:15, ...
4 years ago (2016-11-24 20:51:12 UTC) #14
xidachen
lgtm with nits. https://codereview.chromium.org/2522693002/diff/120001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2522693002/diff/120001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode71 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:71: // is fixed. Please file a ...
4 years ago (2016-11-24 21:07:58 UTC) #15
zakerinasab
New patch submitted (addressing comments).
4 years ago (2016-11-24 21:33:57 UTC) #16
Justin Novosad
https://codereview.chromium.org/2522693002/diff/160001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2522693002/diff/160001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode82 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:82: parsedOptions.bytesPerPixel = 8; avoid hard-coded values. IMHO, we should ...
4 years ago (2016-11-28 16:30:43 UTC) #19
zakerinasab
New patch submitted. https://codereview.chromium.org/2522693002/diff/160001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2522693002/diff/160001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode82 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:82: parsedOptions.bytesPerPixel = 8; On 2016/11/28 16:30:43, ...
4 years ago (2016-11-28 19:12:31 UTC) #20
Justin Novosad
lgtm
4 years ago (2016-11-28 21:16:15 UTC) #21
ccameron
On 2016/11/28 21:16:15, Justin Novosad wrote: > lgtm lgtm too -- go ahead and land ...
4 years ago (2016-11-28 21:45:22 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2522693002/180001
4 years ago (2016-11-28 21:47:26 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/345693) win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, ...
4 years ago (2016-11-28 23:35:08 UTC) #27
zakerinasab
New patch submitted with in-place color conversion. @msarett: PTAL at the SkColorSpaceXform usage and let ...
4 years ago (2016-11-30 17:10:53 UTC) #28
msarett1
https://codereview.chromium.org/2522693002/diff/240001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2522693002/diff/240001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode37 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:37: SkColorType dstColorType = SkColorType::kN32_SkColorType; FWIW, I don't think the ...
4 years ago (2016-11-30 21:32:39 UTC) #31
zakerinasab
New patch submitted. Comments are applied. https://codereview.chromium.org/2522693002/diff/240001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2522693002/diff/240001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode37 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:37: SkColorType dstColorType = ...
4 years ago (2016-12-01 19:49:46 UTC) #33
Justin Novosad
new changes lgtm
4 years ago (2016-12-01 20:07:03 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2522693002/280001
4 years ago (2016-12-02 14:57:16 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/348836)
4 years ago (2016-12-02 16:20:49 UTC) #39
zakerinasab
New patch submitted. The new behavior of "default" color space conversion option is behind a ...
4 years ago (2016-12-05 16:43:08 UTC) #43
Justin Novosad
On 2016/12/05 16:43:08, zakerinasab wrote: > New patch submitted. The new behavior of "default" color ...
4 years ago (2016-12-05 19:56:07 UTC) #49
danakj
Why is this a cc switch? It's not changing compositor behaviour afaict?
4 years ago (2016-12-08 17:38:03 UTC) #51
zakerinasab
On 2016/12/08 17:38:03, danakj_OOO_and_slow wrote: > Why is this a cc switch? It's not changing ...
4 years ago (2016-12-08 19:02:52 UTC) #53
danakj
That seems better but I'm no longer an owner then :)
4 years ago (2016-12-08 21:18:29 UTC) #54
zakerinasab
On 2016/12/08 21:18:29, danakj_OOO_and_slow wrote: > That seems better but I'm no longer an owner ...
4 years ago (2016-12-08 21:46:19 UTC) #56
piman
lgtm
4 years ago (2016-12-08 21:53:07 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2522693002/420001
4 years ago (2016-12-08 21:54:34 UTC) #61
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/321967)
4 years ago (2016-12-08 22:16:51 UTC) #63
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2522693002/420001
4 years ago (2016-12-09 02:23:19 UTC) #65
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/322245)
4 years ago (2016-12-09 02:35:15 UTC) #67
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2522693002/420001
4 years ago (2016-12-09 15:18:55 UTC) #69
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/322550)
4 years ago (2016-12-09 15:28:37 UTC) #71
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2522693002/440001
4 years ago (2016-12-09 18:20:59 UTC) #74
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/322723)
4 years ago (2016-12-09 19:04:13 UTC) #76
dcheng
https://codereview.chromium.org/2522693002/diff/440001/content/public/common/web_preferences.h File content/public/common/web_preferences.h (right): https://codereview.chromium.org/2522693002/diff/440001/content/public/common/web_preferences.h#newcode174 content/public/common/web_preferences.h:174: bool color_correct_rendering_default_mode_enabled = false; I think the IPC serialization ...
4 years ago (2016-12-11 20:11:58 UTC) #78
zakerinasab1
New patch submitted to address the new comments. https://codereview.chromium.org/2522693002/diff/440001/content/public/common/web_preferences.h File content/public/common/web_preferences.h (right): https://codereview.chromium.org/2522693002/diff/440001/content/public/common/web_preferences.h#newcode174 content/public/common/web_preferences.h:174: bool ...
4 years ago (2016-12-12 18:35:21 UTC) #81
dcheng
lgtm https://codereview.chromium.org/2522693002/diff/440001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2522693002/diff/440001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode310 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:310: static sk_sp<SkImage> applyColorSpaceConversion(const sk_sp<SkImage> image, On 2016/12/12 18:35:21, ...
4 years ago (2016-12-12 21:13:58 UTC) #82
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2522693002/480001
4 years ago (2016-12-12 22:05:22 UTC) #85
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/331600)
4 years ago (2016-12-13 00:35:04 UTC) #87
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2522693002/480001
4 years ago (2016-12-13 05:39:26 UTC) #89
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/278435)
4 years ago (2016-12-13 08:13:44 UTC) #91
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2522693002/520001
4 years ago (2016-12-13 18:17:06 UTC) #95
commit-bot: I haz the power
Committed patchset #16 (id:520001)
4 years ago (2016-12-13 20:11:14 UTC) #98
commit-bot: I haz the power
4 years ago (2016-12-13 20:13:57 UTC) #100
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/0f76e01dbfc50d33d6bffb930487ff494babd695
Cr-Commit-Position: refs/heads/master@{#438272}

Powered by Google App Engine
This is Rietveld 408576698