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

Side by Side Diff: third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.h

Issue 2454123002: Refactor image decoders to use 'colorSpace' instead of 'colorProfile' (Closed)
Patch Set: Fix legacy ImageFrame Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 19 matching lines...) Expand all
30 #include <memory> 30 #include <memory>
31 31
32 namespace blink { 32 namespace blink {
33 33
34 class JPEGImageReader; 34 class JPEGImageReader;
35 35
36 class PLATFORM_EXPORT JPEGImageDecoder final : public ImageDecoder { 36 class PLATFORM_EXPORT JPEGImageDecoder final : public ImageDecoder {
37 WTF_MAKE_NONCOPYABLE(JPEGImageDecoder); 37 WTF_MAKE_NONCOPYABLE(JPEGImageDecoder);
38 38
39 public: 39 public:
40 JPEGImageDecoder(AlphaOption, 40 JPEGImageDecoder(AlphaOption, ColorSpaceOption, size_t maxDecodedBytes);
41 GammaAndColorProfileOption,
42 size_t maxDecodedBytes);
43 ~JPEGImageDecoder() override; 41 ~JPEGImageDecoder() override;
44 42
45 // ImageDecoder: 43 // ImageDecoder:
46 String filenameExtension() const override { return "jpg"; } 44 String filenameExtension() const override { return "jpg"; }
47 void onSetData(SegmentReader* data) override; 45 void onSetData(SegmentReader* data) override;
48 IntSize decodedSize() const override { return m_decodedSize; } 46 IntSize decodedSize() const override { return m_decodedSize; }
49 bool setSize(unsigned width, unsigned height) override; 47 bool setSize(unsigned width, unsigned height) override;
50 IntSize decodedYUVSize(int component) const override; 48 IntSize decodedYUVSize(int component) const override;
51 size_t decodedYUVWidthBytes(int component) const override; 49 size_t decodedYUVWidthBytes(int component) const override;
52 bool canDecodeToYUV() override; 50 bool canDecodeToYUV() override;
(...skipping 21 matching lines...) Expand all
74 void decode(bool onlySize); 72 void decode(bool onlySize);
75 73
76 std::unique_ptr<JPEGImageReader> m_reader; 74 std::unique_ptr<JPEGImageReader> m_reader;
77 std::unique_ptr<ImagePlanes> m_imagePlanes; 75 std::unique_ptr<ImagePlanes> m_imagePlanes;
78 IntSize m_decodedSize; 76 IntSize m_decodedSize;
79 }; 77 };
80 78
81 } // namespace blink 79 } // namespace blink
82 80
83 #endif 81 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698