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

Issue 2462803002: Plumb color space to DecodingImageGenerator and ImageFrameGenerator (Closed)

Created:
4 years, 1 month ago by ccameron
Modified:
4 years, 1 month ago
Reviewers:
Justin Novosad
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Plumb color space to DecodingImageGenerator and ImageFrameGenerator Image creation was failing in ExternalMemoryAllocator::allocPixelRef because the SkImageInfo specified to the ExternalMemoryAllocator via the ImageFrameGenerator that creates it did not include the color space of the image. Populate this information by querying it from the decoder in DecodingImageGenerator::create. Change ImageDecoder::colorSpace to be the single place for enforcing the rule that images that do not have embedded color profiles should be interpreted as sRGB. Change all callers to ImageFrame::setSizeAndColorSpace to query the ImageDecoder::colorSpace, and enforce that the color space specified be non-null. Rename ImageDecoder::hasColorSpace to hasEmbeddedColorSpace to make it clear that this refers only to an embedded color space (all images have an explicit or implicit color space). Rename ImageDecoder::setColorSpaceAndComputeTransform's overload to setColorProfileAndComputeTransform, when the argument is a full ICC profile. BUG=44872 Committed: https://crrev.com/65402021deb370b590ec564d93f941733308f477 Cr-Commit-Position: refs/heads/master@{#428864}

Patch Set 1 #

Patch Set 2 : Don't tag images just yet #

Total comments: 10

Patch Set 3 : Incorporate review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -59 lines) Patch
M third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp View 6 chunks +13 lines, -14 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 2 4 chunks +8 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageFrameGeneratorTest.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageSource.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h View 1 3 chunks +14 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp View 1 2 3 chunks +25 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageFrame.h View 1 2 chunks +7 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp View 1 2 1 chunk +9 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/bmp/BMPImageReader.cpp View 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp View 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 20 (13 generated)
ccameron
This is from the work that we did in NC a few weeks back.
4 years, 1 month ago (2016-10-29 02:40:32 UTC) #4
Justin Novosad
https://codereview.chromium.org/2462803002/diff/20001/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp File third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp (right): https://codereview.chromium.org/2462803002/diff/20001/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp#newcode110 third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp:110: m_colorSpace(colorSpace), std::move https://codereview.chromium.org/2462803002/diff/20001/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h File third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h (right): https://codereview.chromium.org/2462803002/diff/20001/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h#newcode70 third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h:70: new ...
4 years, 1 month ago (2016-10-31 14:55:13 UTC) #11
ccameron
Thanks -- updated. I'd like to keep tag all inputs even when the flag is ...
4 years, 1 month ago (2016-10-31 18:10:18 UTC) #13
Justin Novosad
lgtm
4 years, 1 month ago (2016-10-31 18:15:58 UTC) #14
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/2462803002/40001
4 years, 1 month ago (2016-10-31 22:02:16 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 1 month ago (2016-10-31 23:30:54 UTC) #18
commit-bot: I haz the power
4 years, 1 month ago (2016-10-31 23:34:01 UTC) #20
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/65402021deb370b590ec564d93f941733308f477
Cr-Commit-Position: refs/heads/master@{#428864}

Powered by Google App Engine
This is Rietveld 408576698