Chromium Code Reviews| Index: third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp |
| diff --git a/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp b/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp |
| index 8aa6b4a00b523327313f82aed2798e377cf63bf4..b7d5b05649dc3cac880acd09de368d1c798ccbb3 100644 |
| --- a/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp |
| +++ b/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp |
| @@ -258,10 +258,15 @@ PassRefPtr<SharedBuffer> readFile(const char* fileName) { |
| bool decodeImageData(SharedBuffer* data, |
| bool colorCorrection, |
| size_t packetSize) { |
| - std::unique_ptr<ImageDecoder> decoder = ImageDecoder::create( |
| - *data, ImageDecoder::AlphaPremultiplied, |
| - colorCorrection ? ImageDecoder::GammaAndColorProfileApplied |
| - : ImageDecoder::GammaAndColorProfileIgnored); |
| + std::unique_ptr<ImageDecoder> decoder = |
| + ImageDecoder::create(data, true, ImageDecoder::AlphaPremultiplied, |
| + colorCorrection ? ImageDecoder::ColorSpaceApplied |
| + : ImageDecoder::ColorSpaceIgnored); |
| + if (colorCorrection) { |
| + WebVector<char> profile; |
| + getScreenColorProfile(&profile); // Returns a color spin color profile. |
| + decoder->setTargetColorProfile(profile); |
|
Simon Hosie
2016/11/15 01:50:00
So far as I could see `profile` doesn't need to li
scroggo_chromium
2016/11/15 14:54:42
Agreed. setTargetColorProfile will store an object
Simon Hosie
2016/11/16 01:36:33
Done.
|
| + } |
| if (!packetSize) { |
| bool allDataReceived = true; |
| @@ -350,12 +355,7 @@ int main(int argc, char* argv[]) { |
| // Create a web platform without V8. |
|
scroggo_chromium
2016/11/15 14:54:42
This comment appears to no longer apply. When this
Simon Hosie
2016/11/16 01:36:32
Done.
|
| - class WebPlatform : public blink::Platform { |
| - public: |
| - void screenColorProfile(WebVector<char>* profile) override { |
| - getScreenColorProfile(profile); // Returns a color spin color profile. |
| - } |
| - }; |
| + class WebPlatform : public blink::Platform {}; |
|
scroggo_chromium
2016/11/15 14:54:42
Without overriding anything, I don't think you nee
Simon Hosie
2016/11/16 01:36:32
Done.
|
| Platform::initialize(new WebPlatform()); |