Index: src/ports/SkImageDecoder_empty.cpp |
diff --git a/src/ports/SkImageDecoder_empty.cpp b/src/ports/SkImageDecoder_empty.cpp |
index 11c3db1afc519bb0639abd62c08cb7dae93552f1..f52dada73bc6e1fc09ae3d8bdaa7aaeda6d9c17c 100644 |
--- a/src/ports/SkImageDecoder_empty.cpp |
+++ b/src/ports/SkImageDecoder_empty.cpp |
@@ -11,6 +11,7 @@ |
#include "SkImageDecoder.h" |
#include "SkImageEncoder.h" |
#include "SkMovie.h" |
+#include "SkPixelSerializer.h" |
#include "SkStream.h" |
class SkColorTable; |
@@ -108,6 +109,10 @@ SkData* SkImageEncoder::EncodeData(const SkImageInfo&, const void* pixels, size_ |
return nullptr; |
} |
+SkData* SkImageEncoder::EncodeData(const SkPixmap&, Type, int) { |
+ return nullptr; |
+} |
+ |
bool SkImageEncoder::encodeStream(SkWStream*, const SkBitmap&, int) { |
return false; |
} |
@@ -119,4 +124,17 @@ SkData* SkImageEncoder::encodeData(const SkBitmap&, int) { |
bool SkImageEncoder::encodeFile(const char file[], const SkBitmap& bm, int quality) { |
return false; |
} |
+ |
+namespace { |
+class ImageEncoderPixelSerializer final : public SkPixelSerializer { |
+protected: |
+ bool onUseEncodedData(const void*, size_t) override { return true; } |
+ SkData* onEncode(const SkPixmap&) override { return nullptr; } |
+}; |
+} // namespace |
+ |
+SkPixelSerializer* SkImageEncoder::CreatePixelSerializer() { |
+ return new ImageEncoderPixelSerializer; |
+} |
+ |
///////////////////////////////////////////////////////////////////////// |