OLD | NEW |
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 Loading... |
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, ColorSpaceOption, size_t maxDecodedBytes); | 40 JPEGImageDecoder(AlphaOption, |
| 41 ColorSpaceOption, |
| 42 sk_sp<SkColorSpace>, |
| 43 size_t maxDecodedBytes); |
41 ~JPEGImageDecoder() override; | 44 ~JPEGImageDecoder() override; |
42 | 45 |
43 // ImageDecoder: | 46 // ImageDecoder: |
44 String filenameExtension() const override { return "jpg"; } | 47 String filenameExtension() const override { return "jpg"; } |
45 void onSetData(SegmentReader* data) override; | 48 void onSetData(SegmentReader* data) override; |
46 IntSize decodedSize() const override { return m_decodedSize; } | 49 IntSize decodedSize() const override { return m_decodedSize; } |
47 bool setSize(unsigned width, unsigned height) override; | 50 bool setSize(unsigned width, unsigned height) override; |
48 IntSize decodedYUVSize(int component) const override; | 51 IntSize decodedYUVSize(int component) const override; |
49 size_t decodedYUVWidthBytes(int component) const override; | 52 size_t decodedYUVWidthBytes(int component) const override; |
50 bool canDecodeToYUV() override; | 53 bool canDecodeToYUV() override; |
(...skipping 21 matching lines...) Expand all Loading... |
72 void decode(bool onlySize); | 75 void decode(bool onlySize); |
73 | 76 |
74 std::unique_ptr<JPEGImageReader> m_reader; | 77 std::unique_ptr<JPEGImageReader> m_reader; |
75 std::unique_ptr<ImagePlanes> m_imagePlanes; | 78 std::unique_ptr<ImagePlanes> m_imagePlanes; |
76 IntSize m_decodedSize; | 79 IntSize m_decodedSize; |
77 }; | 80 }; |
78 | 81 |
79 } // namespace blink | 82 } // namespace blink |
80 | 83 |
81 #endif | 84 #endif |
OLD | NEW |