OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
10 #include "SkImage.h" | 10 #include "SkImage.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 101 |
102 SkData* SkImageEncoder::EncodeData(const SkBitmap&, Type, int quality) { | 102 SkData* SkImageEncoder::EncodeData(const SkBitmap&, Type, int quality) { |
103 return nullptr; | 103 return nullptr; |
104 } | 104 } |
105 | 105 |
106 SkData* SkImageEncoder::EncodeData(const SkImageInfo&, const void* pixels, size_
t rowBytes, | 106 SkData* SkImageEncoder::EncodeData(const SkImageInfo&, const void* pixels, size_
t rowBytes, |
107 Type, int quality) { | 107 Type, int quality) { |
108 return nullptr; | 108 return nullptr; |
109 } | 109 } |
110 | 110 |
111 static SkData* SkImageEncoder::EncodeData(const SkPixmap&, Type, int) { | |
112 return nullptr; | |
113 } | |
114 | |
115 bool SkImageEncoder::encodeStream(SkWStream*, const SkBitmap&, int) { | 111 bool SkImageEncoder::encodeStream(SkWStream*, const SkBitmap&, int) { |
116 return false; | 112 return false; |
117 } | 113 } |
118 | 114 |
119 SkData* SkImageEncoder::encodeData(const SkBitmap&, int) { | 115 SkData* SkImageEncoder::encodeData(const SkBitmap&, int) { |
120 return nullptr; | 116 return nullptr; |
121 } | 117 } |
122 | 118 |
123 bool SkImageEncoder::encodeFile(const char file[], const SkBitmap& bm, int quali
ty) { | 119 bool SkImageEncoder::encodeFile(const char file[], const SkBitmap& bm, int quali
ty) { |
124 return false; | 120 return false; |
125 } | 121 } |
126 | |
127 namespace { | |
128 class ImageEncoderPixelSerializer final : public SkPixelSerializer { | |
129 protected: | |
130 bool onUseEncodedData(const void*, size_t) override { return true; } | |
131 SkData* onEncode(const SkPixmap& pmap) override { return nullptr; } | |
132 }; | |
133 } // namespace | |
134 | |
135 SkPixelSerializer* SkImageEncoder::CreatePixelSerializer() { | |
136 return new ImageEncoderPixelSerializer; | |
137 } | |
138 | |
139 ///////////////////////////////////////////////////////////////////////// | 122 ///////////////////////////////////////////////////////////////////////// |
OLD | NEW |