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

Issue 2523943002: Explicitly specify target color space to ImageDecoder at creation (Closed)

Created:
4 years ago by ccameron
Modified:
4 years ago
CC:
chromium-reviews, urvang, blink-reviews-platform-graphics_chromium.org, dshwang, kinuko+watch, rwlbuis, krit, drott+blinkwatch_chromium.org, awdf+watch_chromium.org, skal, Rik, blink-reviews, ajuma+watch_chromium.org, Peter Beverloo, jbroman, pdr+graphicswatchlist_chromium.org, haraken, piman+watch_chromium.org, Stephen Chennney, jzern, f(malita), danakj+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

This is towards removing the global variable that specifies the target color profile for all image decode. The core of this change is the change to ImageDecoder::ColorSpaceOption. Prior to this change, the options for image decode were * Ignore color entirely * "Apply" that global profile, whatever it happens to be There was one other mode, behind the EnableColorCorrectRendering flag, which would * Tag the SkImages that came out of the ImageDecoder with the embedded color profile. After this change, we still have the same 3 options, but they no longer use global variables or command line flags. The ColorSpaceOption enum has three states * Ignore color entirely * Transform the image into an explicitly specified (in the constructor) color space. * Tag the SkImages for that come out of the ImageDecoder. Most of the change is just plumbing these variables though all of the ImageDecoder related classes. The two other parts are as follows. This patch makes it explicit when SkColorSpaces related to an image are to be used with the SkImages (and SkImageInfos) for the image. Previously, this distinction was less clear. This patch also plumbs the ColorSpaceOption correctly from ImageSource through to ImageDecoder. The path is ImageSource -> DeferredImageDecoder -> DeferredImageGenerator -> ImageFrameGenerator -> ImageDecoder This just involves stashing the ColorSpaceOption and target color space at the required stages along the way, to ensure that the final ImageDecoder is created with the initially-specified arguments. R=pdr,junov TBR=peter BUG=667420 Committed: https://crrev.com/c8f175a4cbe14604f5b0f32b421a2be344a269bf Cr-Commit-Position: refs/heads/master@{#435478}

Patch Set 1 #

Patch Set 2 : More const, better enums #

Total comments: 2

Patch Set 3 : Remove one more global call #

Patch Set 4 : Separate global and testing #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+264 lines, -153 lines) Patch
M third_party/WebKit/Source/core/frame/ImageBitmap.cpp View 1 3 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp View 1 1 chunk +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp View 1 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/exported/WebImage.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp View 1 1 chunk +7 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h View 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp View 4 chunks +8 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTest.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/DeferredImageDecoderTestWoPlatform.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageDecodingStoreTest.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h View 1 5 chunks +15 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp View 1 2 4 chunks +16 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageFrameGeneratorTest.cpp View 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageSource.cpp View 1 2 chunks +11 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/PictureSnapshot.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp View 1 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/test/MockImageDecoder.h View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h View 1 2 3 7 chunks +42 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp View 1 2 3 5 chunks +36 lines, -24 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageDecoderTest.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageFrame.h View 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp View 1 chunk +1 line, -12 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageDecoder.h View 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageDecoder.cpp View 1 chunk +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageDecoderTest.cpp View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.h View 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp View 1 chunk +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoderTest.cpp View 1 2 3 2 chunks +8 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.h View 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.cpp View 2 chunks +7 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoderTest.cpp View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.h View 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp View 2 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoderTest.cpp View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp View 4 chunks +8 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.h View 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp View 2 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp View 1 2 3 1 chunk +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/WebImageDecoder.cpp View 1 2 3 1 chunk +6 lines, -6 lines 0 comments Download

Messages

Total messages: 42 (27 generated)
ccameron
This is the second part of https://codereview.chromium.org/2512683003/ It's a bit long because it touches all ...
4 years ago (2016-11-23 06:30:01 UTC) #4
ccameron
Oops, I forgot to set Reviewers...
4 years ago (2016-11-23 06:30:28 UTC) #6
ccameron
postprandial ping
4 years ago (2016-11-28 20:10:09 UTC) #19
msarett1
4 years ago (2016-11-29 15:25:19 UTC) #23
ccameron
post-postprandial ping
4 years ago (2016-11-29 17:36:45 UTC) #24
ccameron
post-postprandial ping
4 years ago (2016-11-29 17:36:47 UTC) #25
ccameron
Switching reviewer to junov@ Adding pdr@ for OWNER of third_party/WebKit/Source/web
4 years ago (2016-11-29 20:17:23 UTC) #27
ccameron
ping again
4 years ago (2016-11-30 18:39:48 UTC) #28
Justin Novosad
lgtm for Source/platform and Source/core
4 years ago (2016-11-30 19:28:17 UTC) #29
pdr.
On 2016/11/30 at 19:28:17, junov wrote: > lgtm for Source/platform and Source/core LGTM for third_party/WebKit/Source/web
4 years ago (2016-11-30 19:46:32 UTC) #30
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/2523943002/80001
4 years ago (2016-11-30 21:43:04 UTC) #32
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/315801)
4 years ago (2016-11-30 21:52:00 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/2523943002/80001
4 years ago (2016-11-30 23:33:50 UTC) #37
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years ago (2016-11-30 23:39:07 UTC) #40
commit-bot: I haz the power
4 years ago (2016-11-30 23:42:13 UTC) #42
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/c8f175a4cbe14604f5b0f32b421a2be344a269bf
Cr-Commit-Position: refs/heads/master@{#435478}

Powered by Google App Engine
This is Rietveld 408576698