OLD | NEW |
| (Empty) |
1 | |
2 /* | |
3 * Copyright 2006 The Android Open Source Project | |
4 * | |
5 * Use of this source code is governed by a BSD-style license that can be | |
6 * found in the LICENSE file. | |
7 */ | |
8 | |
9 #include "SkBitmap.h" | |
10 #include "SkImage.h" | |
11 #include "SkImageEncoder.h" | |
12 #include "SkMovie.h" | |
13 #include "SkPixelSerializer.h" | |
14 #include "SkStream.h" | |
15 | |
16 ///////////////////////////////////////////////////////////////////////// | |
17 | |
18 // Empty implementation for SkMovie. | |
19 | |
20 SkMovie* SkMovie::DecodeStream(SkStreamRewindable* stream) { | |
21 return nullptr; | |
22 } | |
23 | |
24 ///////////////////////////////////////////////////////////////////////// | |
25 | |
26 // Empty implementations for SkImageEncoder. | |
27 | |
28 SkImageEncoder* SkImageEncoder::Create(Type t) { | |
29 return nullptr; | |
30 } | |
31 | |
32 bool SkImageEncoder::EncodeFile(const char file[], const SkBitmap&, Type, int qu
ality) { | |
33 return false; | |
34 } | |
35 | |
36 bool SkImageEncoder::EncodeStream(SkWStream*, const SkBitmap&, SkImageEncoder::T
ype, int) { | |
37 return false; | |
38 } | |
39 | |
40 SkData* SkImageEncoder::EncodeData(const SkBitmap&, Type, int quality) { | |
41 return nullptr; | |
42 } | |
43 | |
44 SkData* SkImageEncoder::EncodeData(const SkImageInfo&, const void* pixels, size_
t rowBytes, | |
45 Type, int quality) { | |
46 return nullptr; | |
47 } | |
48 | |
49 SkData* SkImageEncoder::EncodeData(const SkPixmap&, Type, int) { | |
50 return nullptr; | |
51 } | |
52 | |
53 bool SkImageEncoder::encodeStream(SkWStream*, const SkBitmap&, int) { | |
54 return false; | |
55 } | |
56 | |
57 SkData* SkImageEncoder::encodeData(const SkBitmap&, int) { | |
58 return nullptr; | |
59 } | |
60 | |
61 bool SkImageEncoder::encodeFile(const char file[], const SkBitmap& bm, int quali
ty) { | |
62 return false; | |
63 } | |
64 | |
65 namespace { | |
66 class ImageEncoderPixelSerializer final : public SkPixelSerializer { | |
67 protected: | |
68 bool onUseEncodedData(const void*, size_t) override { return true; } | |
69 SkData* onEncode(const SkPixmap&) override { return nullptr; } | |
70 }; | |
71 } // namespace | |
72 | |
73 SkPixelSerializer* SkImageEncoder::CreatePixelSerializer() { | |
74 return new ImageEncoderPixelSerializer; | |
75 } | |
76 | |
77 ///////////////////////////////////////////////////////////////////////// | |
OLD | NEW |