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

Issue 2787053004: Respect colorSpace in DecodingImageGenerator::onGetPixels() (Closed)

Created:
3 years, 8 months ago by msarett
Modified:
3 years, 8 months ago
CC:
ajuma+watch_chromium.org, blink-reviews, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, fmalita+watch_chromium.org, jbroman, Justin Novosad, kinuko+watch, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Respect colorSpace in DecodingImageGenerator::onGetPixels() ImageDecoder.cpp In case the of a rare image with an embedded color space that is not parametric, we will do a color space xform at decode time. Otherwise, leave it as is. DecodingImageGenerator.cpp Based on cc behavior, we should almost always be asking for the SkImage "as is" (in the same color space that it is already in). In the rare case that we miss the cc cache and request it in a different color space, will need to do the color space xform here. We always use an unpremul decoder when we will be doing a color space xform in a second pass. That way we don't need to unpremultiply. BUG=706613 Review-Url: https://codereview.chromium.org/2787053004 Cr-Commit-Position: refs/heads/master@{#464458} Committed: https://chromium.googlesource.com/chromium/src/+/669daddab5f2f01c57add7ec00ab87fa8453b463

Patch Set 1 #

Patch Set 2 : Add comment #

Total comments: 15

Patch Set 3 : Response to comments #

Patch Set 4 : Basic approach #

Total comments: 8

Patch Set 5 : Response to comments #

Total comments: 7

Patch Set 6 : Response to comments #

Total comments: 37

Patch Set 7 : Moving xform back to image generator #

Total comments: 14

Patch Set 8 : Add hash support for std::tuple() #

Patch Set 9 : Enourmous rebase #

Patch Set 10 : Response to comments #

Total comments: 2

Patch Set 11 : AlphaOption #

Total comments: 10

Patch Set 12 : Write custom hash impl for DecoderCacheKey struct #

Total comments: 1

Patch Set 13 : Add trace #

Patch Set 14 : Rebase #

Messages

Total messages: 66 (33 generated)
msarett1
https://codereview.chromium.org/2787053004/diff/20001/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp File third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp (right): https://codereview.chromium.org/2787053004/diff/20001/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp#newcode146 third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp:146: // |dst| color space. The Skia API for this ...
3 years, 8 months ago (2017-03-31 19:05:28 UTC) #2
ccameron
Thanks for looking at this. Doing the conversion at decode time would probably be the ...
3 years, 8 months ago (2017-03-31 19:46:08 UTC) #3
f(malita)
I'm not familiar with color space subtleties, so I'll defer to the other reviewers for ...
3 years, 8 months ago (2017-03-31 19:52:08 UTC) #4
msarett1
> Doing the conversion at decode time would probably be the best in terms of ...
3 years, 8 months ago (2017-03-31 19:59:11 UTC) #5
msarett1
Will put this on hold to discuss the pros and cons of various approaches. FWIW, ...
3 years, 8 months ago (2017-03-31 21:47:30 UTC) #6
scroggo_chromium
> Respect dstInfo in DecodingImageGenerator::onGetPixels() Instead of "dstInfo", how about "color space"? We already "respect" ...
3 years, 8 months ago (2017-04-04 20:52:45 UTC) #8
msarett1
So here is the latest model I'm going for... ImageDecoder.cpp In case the of a ...
3 years, 8 months ago (2017-04-04 23:02:36 UTC) #11
scroggo_chromium
https://codereview.chromium.org/2787053004/diff/80001/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp File third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp (right): https://codereview.chromium.org/2787053004/diff/80001/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp#newcode151 third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp:151: return success; On 2017/04/04 23:02:36, msarett1 wrote: > On ...
3 years, 8 months ago (2017-04-05 19:59:02 UTC) #13
msarett1
https://codereview.chromium.org/2787053004/diff/80001/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp File third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp (right): https://codereview.chromium.org/2787053004/diff/80001/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp#newcode151 third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp:151: return success; On 2017/04/05 19:59:01, scroggo_chromium wrote: > On ...
3 years, 8 months ago (2017-04-06 22:05:30 UTC) #17
scroggo_chromium
After reviewing this patch set, I think I was wrong to suggest moving the transform ...
3 years, 8 months ago (2017-04-07 18:06:06 UTC) #18
msarett1
> After reviewing this patch set, I think I was wrong to suggest moving the ...
3 years, 8 months ago (2017-04-10 14:42:46 UTC) #20
msarett1
Adding hash support for std::tuple(). +esprehn@ for platform/wtf
3 years, 8 months ago (2017-04-10 17:19:38 UTC) #22
scroggo_chromium
nit: Please add the ImageDecodingStore and Hash changes to the description. LGTM, except on the ...
3 years, 8 months ago (2017-04-10 17:31:24 UTC) #23
msarett1
PTAL, still needs OWNERS review for platform/graphics and platform/wtf. FYI, also went through a major ...
3 years, 8 months ago (2017-04-10 21:34:26 UTC) #25
msarett1
Oops... actually adding platform/wtf OWNERS this time
3 years, 8 months ago (2017-04-11 12:21:21 UTC) #31
scroggo_chromium
lgtm https://codereview.chromium.org/2787053004/diff/280001/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h File third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h (right): https://codereview.chromium.org/2787053004/diff/280001/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h#newcode229 third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h:229: AlphaOption AlphaOpt() const { I suppose you abbreviated ...
3 years, 8 months ago (2017-04-11 12:37:39 UTC) #32
msarett1
https://codereview.chromium.org/2787053004/diff/280001/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h File third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h (right): https://codereview.chromium.org/2787053004/diff/280001/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h#newcode229 third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h:229: AlphaOption AlphaOpt() const { On 2017/04/11 12:37:38, scroggo_chromium wrote: ...
3 years, 8 months ago (2017-04-11 12:44:20 UTC) #33
Nico
This (honoring color spaces more) is a web-visible change from what I understand, did y'all ...
3 years, 8 months ago (2017-04-11 15:18:40 UTC) #34
msarett1
On 2017/04/11 15:18:40, Nico wrote: > This (honoring color spaces more) is a web-visible change ...
3 years, 8 months ago (2017-04-11 15:22:12 UTC) #35
Nico
On 2017/04/11 15:22:12, msarett1 wrote: > On 2017/04/11 15:18:40, Nico wrote: > > This (honoring ...
3 years, 8 months ago (2017-04-11 15:25:14 UTC) #36
msarett1
On 2017/04/11 15:25:14, Nico wrote: > On 2017/04/11 15:22:12, msarett1 wrote: > > On 2017/04/11 ...
3 years, 8 months ago (2017-04-11 15:29:33 UTC) #37
Nico
+haraken so he sees the image cache and the tuple hash things. Code looks generally ...
3 years, 8 months ago (2017-04-11 15:41:05 UTC) #39
ccameron
Added comment WRT this having impact on the web -- this is still behind a ...
3 years, 8 months ago (2017-04-11 19:03:10 UTC) #41
Nico
https://codereview.chromium.org/2787053004/diff/300001/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp File third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp (right): https://codereview.chromium.org/2787053004/diff/300001/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp#newcode103 third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp:103: decode_color_space && dst_info.colorSpace() && On 2017/04/11 19:03:10, ccameron wrote: ...
3 years, 8 months ago (2017-04-11 19:07:48 UTC) #42
msarett1
Thanks for the review! The latest patch adds a hash implementation for a DecoderCacheKey struct. ...
3 years, 8 months ago (2017-04-11 20:52:06 UTC) #45
haraken
+yutak I haven't yet caught up the discussion history but would you help me understand ...
3 years, 8 months ago (2017-04-12 06:53:03 UTC) #47
msarett1
On 2017/04/12 06:53:03, haraken wrote: > +yutak > > I haven't yet caught up the ...
3 years, 8 months ago (2017-04-12 12:39:21 UTC) #48
msarett1
Florin, would you mind taking a look?
3 years, 8 months ago (2017-04-12 17:29:19 UTC) #49
haraken
On 2017/04/12 12:39:21, msarett1 wrote: > On 2017/04/12 06:53:03, haraken wrote: > > +yutak > ...
3 years, 8 months ago (2017-04-13 04:30:11 UTC) #50
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/2787053004/400001
3 years, 8 months ago (2017-04-13 17:33:43 UTC) #61
commit-bot: I haz the power
Committed patchset #14 (id:400001) as https://chromium.googlesource.com/chromium/src/+/669daddab5f2f01c57add7ec00ab87fa8453b463
3 years, 8 months ago (2017-04-13 17:42:44 UTC) #64
Nico
Please address the intent-to-implement concern I raised above before further working on this feature.
3 years, 8 months ago (2017-04-13 20:53:26 UTC) #65
msarett1
3 years, 8 months ago (2017-04-13 20:54:43 UTC) #66
Message was sent while issue was closed.
On 2017/04/13 20:53:26, Nico wrote:
> Please address the intent-to-implement concern I raised above before further
> working on this feature.

I will certainly make sure it is addressed, thanks!

Powered by Google App Engine
This is Rietveld 408576698