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

Side by Side Diff: third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 23 matching lines...) Expand all
34 #include "webp/decode.h" 34 #include "webp/decode.h"
35 #include "webp/demux.h" 35 #include "webp/demux.h"
36 #include "wtf/RefPtr.h" 36 #include "wtf/RefPtr.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class PLATFORM_EXPORT WEBPImageDecoder final : public ImageDecoder { 40 class PLATFORM_EXPORT WEBPImageDecoder final : public ImageDecoder {
41 WTF_MAKE_NONCOPYABLE(WEBPImageDecoder); 41 WTF_MAKE_NONCOPYABLE(WEBPImageDecoder);
42 42
43 public: 43 public:
44 WEBPImageDecoder(AlphaOption, ColorSpaceOption, size_t maxDecodedBytes); 44 WEBPImageDecoder(AlphaOption,
45 ColorSpaceOption,
46 sk_sp<SkColorSpace>,
47 size_t maxDecodedBytes);
45 ~WEBPImageDecoder() override; 48 ~WEBPImageDecoder() override;
46 49
47 // ImageDecoder: 50 // ImageDecoder:
48 String filenameExtension() const override { return "webp"; } 51 String filenameExtension() const override { return "webp"; }
49 void onSetData(SegmentReader* data) override; 52 void onSetData(SegmentReader* data) override;
50 int repetitionCount() const override; 53 int repetitionCount() const override;
51 bool frameIsCompleteAtIndex(size_t) const override; 54 bool frameIsCompleteAtIndex(size_t) const override;
52 float frameDurationAtIndex(size_t) const override; 55 float frameDurationAtIndex(size_t) const override;
53 size_t clearCacheExceptFrame(size_t) override; 56 size_t clearCacheExceptFrame(size_t) override;
54 57
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 void clearDecoder(); 100 void clearDecoder();
98 101
99 // FIXME: Update libwebp's API so it does not require copying the data on each 102 // FIXME: Update libwebp's API so it does not require copying the data on each
100 // update. 103 // update.
101 sk_sp<SkData> m_consolidatedData; 104 sk_sp<SkData> m_consolidatedData;
102 }; 105 };
103 106
104 } // namespace blink 107 } // namespace blink
105 108
106 #endif 109 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698