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

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

Issue 2523943002: Explicitly specify target color space to ImageDecoder at creation (Closed)
Patch Set: Rebase 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, ColorSpaceOption, size_t maxDecodedBytes); 47 ICOImageDecoder(AlphaOption,
48 ColorSpaceOption,
49 sk_sp<SkColorSpace>,
50 size_t maxDecodedBytes);
48 ~ICOImageDecoder() override; 51 ~ICOImageDecoder() override;
49 52
50 // ImageDecoder: 53 // ImageDecoder:
51 String filenameExtension() const override { return "ico"; } 54 String filenameExtension() const override { return "ico"; }
52 void onSetData(SegmentReader*) override; 55 void onSetData(SegmentReader*) override;
53 IntSize size() const override; 56 IntSize size() const override;
54 IntSize frameSizeAtIndex(size_t) const override; 57 IntSize frameSizeAtIndex(size_t) const override;
55 bool setSize(unsigned width, unsigned height) override; 58 bool setSize(unsigned width, unsigned height) override;
56 bool frameIsCompleteAtIndex(size_t) const override; 59 bool frameIsCompleteAtIndex(size_t) const override;
57 // CAUTION: setFailed() deletes all readers and decoders. Be careful to 60 // CAUTION: setFailed() deletes all readers and decoders. Be careful to
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // for the particular entry being decoded. 180 // for the particular entry being decoded.
178 IntSize m_frameSize; 181 IntSize m_frameSize;
179 182
180 // Used to pass on to an internally created PNG decoder. 183 // Used to pass on to an internally created PNG decoder.
181 const ColorSpaceOption m_colorSpaceOption; 184 const ColorSpaceOption m_colorSpaceOption;
182 }; 185 };
183 186
184 } // namespace blink 187 } // namespace blink
185 188
186 #endif 189 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698