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

Side by Side Diff: third_party/WebKit/Source/platform/image-decoders/ico/ICOImageDecoder.h

Issue 2556723003: Merge color options into ColorBehavior (Closed)
Patch Set: Feedback Created 4 years 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) 2008, 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2008, 2009, Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 26 matching lines...) Expand all
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class PNGImageDecoder; 40 class PNGImageDecoder;
41 41
42 // This class decodes the ICO and CUR image formats. 42 // This class decodes the ICO and CUR image formats.
43 class PLATFORM_EXPORT ICOImageDecoder final : public ImageDecoder { 43 class PLATFORM_EXPORT ICOImageDecoder final : public ImageDecoder {
44 WTF_MAKE_NONCOPYABLE(ICOImageDecoder); 44 WTF_MAKE_NONCOPYABLE(ICOImageDecoder);
45 45
46 public: 46 public:
47 ICOImageDecoder(AlphaOption, 47 ICOImageDecoder(AlphaOption, const ColorBehavior&, size_t maxDecodedBytes);
48 ColorSpaceOption,
49 sk_sp<SkColorSpace>,
50 size_t maxDecodedBytes);
51 ~ICOImageDecoder() override; 48 ~ICOImageDecoder() override;
52 49
53 // ImageDecoder: 50 // ImageDecoder:
54 String filenameExtension() const override { return "ico"; } 51 String filenameExtension() const override { return "ico"; }
55 void onSetData(SegmentReader*) override; 52 void onSetData(SegmentReader*) override;
56 IntSize size() const override; 53 IntSize size() const override;
57 IntSize frameSizeAtIndex(size_t) const override; 54 IntSize frameSizeAtIndex(size_t) const override;
58 bool setSize(unsigned width, unsigned height) override; 55 bool setSize(unsigned width, unsigned height) override;
59 bool frameIsCompleteAtIndex(size_t) const override; 56 bool frameIsCompleteAtIndex(size_t) const override;
60 // CAUTION: setFailed() deletes all readers and decoders. Be careful to 57 // CAUTION: setFailed() deletes all readers and decoders. Be careful to
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 typedef Vector<std::unique_ptr<BMPImageReader>> BMPReaders; 171 typedef Vector<std::unique_ptr<BMPImageReader>> BMPReaders;
175 BMPReaders m_bmpReaders; 172 BMPReaders m_bmpReaders;
176 typedef Vector<std::unique_ptr<PNGImageDecoder>> PNGDecoders; 173 typedef Vector<std::unique_ptr<PNGImageDecoder>> PNGDecoders;
177 PNGDecoders m_pngDecoders; 174 PNGDecoders m_pngDecoders;
178 175
179 // Valid only while a BMPImageReader is decoding, this holds the size 176 // Valid only while a BMPImageReader is decoding, this holds the size
180 // for the particular entry being decoded. 177 // for the particular entry being decoded.
181 IntSize m_frameSize; 178 IntSize m_frameSize;
182 179
183 // Used to pass on to an internally created PNG decoder. 180 // Used to pass on to an internally created PNG decoder.
184 const ColorSpaceOption m_colorSpaceOption; 181 const ColorBehavior m_colorBehavior;
185 }; 182 };
186 183
187 } // namespace blink 184 } // namespace blink
188 185
189 #endif 186 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698