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" |
| 11 #include "SkImageDecoder.h" |
11 #include "SkImageEncoder.h" | 12 #include "SkImageEncoder.h" |
12 #include "SkMovie.h" | 13 #include "SkMovie.h" |
13 #include "SkPixelSerializer.h" | 14 #include "SkPixelSerializer.h" |
14 #include "SkStream.h" | 15 #include "SkStream.h" |
15 | 16 |
| 17 class SkColorTable; |
| 18 class SkPngChunkReader; |
| 19 |
| 20 // Empty implementations for SkImageDecoder. |
| 21 |
| 22 SkImageDecoder::SkImageDecoder() {} |
| 23 |
| 24 SkImageDecoder::~SkImageDecoder() {} |
| 25 |
| 26 SkImageDecoder* SkImageDecoder::Factory(SkStreamRewindable*) { |
| 27 return nullptr; |
| 28 } |
| 29 |
| 30 void SkImageDecoder::copyFieldsToOther(SkImageDecoder* ) {} |
| 31 |
| 32 bool SkImageDecoder::DecodeFile(const char[], SkBitmap*, SkColorType, Mode, Form
at*) { |
| 33 return false; |
| 34 } |
| 35 |
| 36 SkImageDecoder::Result SkImageDecoder::decode(SkStream*, SkBitmap*, SkColorType,
Mode) { |
| 37 return kFailure; |
| 38 } |
| 39 |
| 40 bool SkImageDecoder::DecodeStream(SkStreamRewindable*, SkBitmap*, SkColorType, M
ode, Format*) { |
| 41 return false; |
| 42 } |
| 43 |
| 44 bool SkImageDecoder::DecodeMemory(const void*, size_t, SkBitmap*, SkColorType, M
ode, Format*) { |
| 45 return false; |
| 46 } |
| 47 |
| 48 bool SkImageDecoder::decodeYUV8Planes(SkStream*, SkISize[3], void*[3], |
| 49 size_t[3], SkYUVColorSpace*) { |
| 50 return false; |
| 51 } |
| 52 |
| 53 SkImageDecoder::Format SkImageDecoder::getFormat() const { |
| 54 return kUnknown_Format; |
| 55 } |
| 56 |
| 57 SkImageDecoder::Format SkImageDecoder::GetStreamFormat(SkStreamRewindable*) { |
| 58 return kUnknown_Format; |
| 59 } |
| 60 |
| 61 const char* SkImageDecoder::GetFormatName(Format) { |
| 62 return nullptr; |
| 63 } |
| 64 |
| 65 SkPngChunkReader* SkImageDecoder::setPeeker(SkPngChunkReader*) { |
| 66 return nullptr; |
| 67 } |
| 68 |
| 69 SkBitmap::Allocator* SkImageDecoder::setAllocator(SkBitmap::Allocator*) { |
| 70 return nullptr; |
| 71 } |
| 72 |
| 73 void SkImageDecoder::setSampleSize(int) {} |
| 74 |
| 75 bool SkImageDecoder::allocPixelRef(SkBitmap*, SkColorTable*) const { |
| 76 return false; |
| 77 } |
| 78 |
16 ///////////////////////////////////////////////////////////////////////// | 79 ///////////////////////////////////////////////////////////////////////// |
17 | 80 |
18 // Empty implementation for SkMovie. | 81 // Empty implementation for SkMovie. |
19 | 82 |
20 SkMovie* SkMovie::DecodeStream(SkStreamRewindable* stream) { | 83 SkMovie* SkMovie::DecodeStream(SkStreamRewindable* stream) { |
21 return nullptr; | 84 return nullptr; |
22 } | 85 } |
23 | 86 |
24 ///////////////////////////////////////////////////////////////////////// | 87 ///////////////////////////////////////////////////////////////////////// |
25 | 88 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 bool onUseEncodedData(const void*, size_t) override { return true; } | 131 bool onUseEncodedData(const void*, size_t) override { return true; } |
69 SkData* onEncode(const SkPixmap&) override { return nullptr; } | 132 SkData* onEncode(const SkPixmap&) override { return nullptr; } |
70 }; | 133 }; |
71 } // namespace | 134 } // namespace |
72 | 135 |
73 SkPixelSerializer* SkImageEncoder::CreatePixelSerializer() { | 136 SkPixelSerializer* SkImageEncoder::CreatePixelSerializer() { |
74 return new ImageEncoderPixelSerializer; | 137 return new ImageEncoderPixelSerializer; |
75 } | 138 } |
76 | 139 |
77 ///////////////////////////////////////////////////////////////////////// | 140 ///////////////////////////////////////////////////////////////////////// |
OLD | NEW |