|
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}
Total comments: 2
|
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
|
Total messages: 42 (27 generated)
|