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 | 9 #include "SkBitmap.h" |
| 10 #include "SkBitmapFactory.h" |
| 11 #include "SkImage.h" |
10 #include "SkImageDecoder.h" | 12 #include "SkImageDecoder.h" |
11 #include "SkImageEncoder.h" | 13 #include "SkImageEncoder.h" |
12 #include "SkMovie.h" | 14 #include "SkMovie.h" |
13 | 15 |
14 class SkBitmap; | 16 class SkColorTable; |
15 class SkStream; | 17 class SkStream; |
16 | 18 |
17 SkImageDecoder* SkImageDecoder::Factory(SkStream* stream) { | 19 // Empty implementations for SkImageDecoder. |
| 20 |
| 21 SkImageDecoder* SkImageDecoder::Factory(SkStream*) { |
18 return NULL; | 22 return NULL; |
19 } | 23 } |
20 | 24 |
21 bool SkImageDecoder::DecodeFile(const char file[], SkBitmap*, SkBitmap::Config, | 25 bool SkImageDecoder::DecodeFile(const char[], SkBitmap*, SkBitmap::Config, |
22 SkImageDecoder::Mode, SkImageDecoder::Format*) { | 26 SkImageDecoder::Mode, SkImageDecoder::Format*) { |
23 return false; | 27 return false; |
24 } | 28 } |
25 | 29 |
26 bool SkImageDecoder::decode(SkStream*, SkBitmap*, SkBitmap::Config, Mode, bool)
{ | 30 bool SkImageDecoder::decode(SkStream*, SkBitmap*, SkBitmap::Config, Mode, bool)
{ |
27 return false; | 31 return false; |
28 } | 32 } |
29 | 33 |
30 bool SkImageDecoder::DecodeStream(SkStream*, SkBitmap*, SkBitmap::Config, SkImag
eDecoder::Mode, | 34 bool SkImageDecoder::DecodeStream(SkStream*, SkBitmap*, SkBitmap::Config, |
| 35 SkImageDecoder::Mode, |
31 SkImageDecoder::Format*) { | 36 SkImageDecoder::Format*) { |
32 return false; | 37 return false; |
33 } | 38 } |
34 | 39 |
35 bool SkImageDecoder::DecodeMemory(const void*, size_t, SkBitmap*, SkBitmap::Conf
ig, | 40 bool SkImageDecoder::DecodeMemory(const void*, size_t, SkBitmap*, |
36 SkImageDecoder::Mode, SkImageDecoder::Format*)
{ | 41 SkBitmap::Config, SkImageDecoder::Mode, |
| 42 SkImageDecoder::Format*) { |
37 return false; | 43 return false; |
38 } | 44 } |
39 | 45 |
40 SkImageDecoder* CreateJPEGImageDecoder() { | 46 bool SkImageDecoder::buildTileIndex(SkStream*, int *width, int *height) { |
| 47 return false; |
| 48 } |
| 49 |
| 50 bool SkImageDecoder::decodeSubset(SkBitmap*, const SkIRect&, SkBitmap::Config) { |
| 51 return false; |
| 52 } |
| 53 |
| 54 SkImageDecoder::Format SkImageDecoder::getFormat() const { |
| 55 return kUnknown_Format; |
| 56 } |
| 57 |
| 58 SkImageDecoder::Format SkImageDecoder::GetStreamFormat(SkStream*) { |
| 59 return kUnknown_Format; |
| 60 } |
| 61 |
| 62 const char* SkImageDecoder::GetFormatName(Format) { |
41 return NULL; | 63 return NULL; |
42 } | 64 } |
| 65 |
| 66 SkImageDecoder::Peeker* SkImageDecoder::setPeeker(Peeker*) { |
| 67 return NULL; |
| 68 } |
| 69 |
| 70 SkImageDecoder::Chooser* SkImageDecoder::setChooser(Chooser*) { |
| 71 return NULL; |
| 72 } |
| 73 |
| 74 SkBitmap::Allocator* SkImageDecoder::setAllocator(SkBitmap::Allocator*) { |
| 75 return NULL; |
| 76 } |
| 77 |
| 78 void SkImageDecoder::setSampleSize(int) {} |
| 79 |
| 80 bool SkImageDecoder::DecodeMemoryToTarget(const void*, size_t, SkImage::Info*, |
| 81 const SkBitmapFactory::Target*) { |
| 82 return false; |
| 83 } |
| 84 |
| 85 SkBitmap::Config SkImageDecoder::GetDeviceConfig() { |
| 86 return SkBitmap::kNo_Config; |
| 87 } |
| 88 |
| 89 void SkImageDecoder::SetDeviceConfig(SkBitmap::Config) {} |
| 90 |
| 91 bool SkImageDecoder::cropBitmap(SkBitmap*, SkBitmap*, int, int, int, int, int, |
| 92 int, int) { |
| 93 return false; |
| 94 } |
| 95 |
| 96 bool SkImageDecoder::chooseFromOneChoice(SkBitmap::Config, int, int) const { |
| 97 return false; |
| 98 } |
| 99 |
| 100 bool SkImageDecoder::allocPixelRef(SkBitmap*, SkColorTable*) const { |
| 101 return false; |
| 102 } |
| 103 |
| 104 SkBitmap::Config SkImageDecoder::getPrefConfig(SrcDepth, bool) const { |
| 105 return SkBitmap::kNo_Config; |
| 106 } |
| 107 |
| 108 |
43 ///////////////////////////////////////////////////////////////////////// | 109 ///////////////////////////////////////////////////////////////////////// |
44 | 110 |
| 111 // Empty implementation for SkMovie. |
| 112 |
45 SkMovie* SkMovie::DecodeStream(SkStream* stream) { | 113 SkMovie* SkMovie::DecodeStream(SkStream* stream) { |
46 return NULL; | 114 return NULL; |
47 } | 115 } |
48 | 116 |
49 ///////////////////////////////////////////////////////////////////////// | 117 ///////////////////////////////////////////////////////////////////////// |
50 | 118 |
| 119 // Empty implementations for SkImageEncoder. |
| 120 |
51 SkImageEncoder* SkImageEncoder::Create(Type t) { | 121 SkImageEncoder* SkImageEncoder::Create(Type t) { |
52 return NULL; | 122 return NULL; |
53 } | 123 } |
54 | 124 |
55 bool SkImageEncoder::EncodeFile(const char file[], const SkBitmap&, Type, int qu
ality) { | 125 bool SkImageEncoder::EncodeFile(const char file[], const SkBitmap&, Type, int qu
ality) { |
56 return false; | 126 return false; |
57 } | 127 } |
58 | 128 |
59 bool SkImageEncoder::EncodeStream(SkWStream*, const SkBitmap&, SkImageEncoder::T
ype, int) { | 129 bool SkImageEncoder::EncodeStream(SkWStream*, const SkBitmap&, SkImageEncoder::T
ype, int) { |
60 return false; | 130 return false; |
61 } | 131 } |
62 | 132 |
| 133 SkData* SkImageEncoder::EncodeData(const SkBitmap&, Type, int quality) { |
| 134 return NULL; |
| 135 } |
| 136 |
63 bool SkImageEncoder::encodeStream(SkWStream*, const SkBitmap&, int) { | 137 bool SkImageEncoder::encodeStream(SkWStream*, const SkBitmap&, int) { |
64 return false; | 138 return false; |
65 } | 139 } |
66 | 140 |
| 141 SkData* SkImageEncoder::encodeData(const SkBitmap&, int) { |
| 142 return NULL; |
| 143 } |
| 144 |
| 145 bool SkImageEncoder::encodeFile(const char file[], const SkBitmap& bm, int quali
ty) { |
| 146 return false; |
| 147 } |
67 ///////////////////////////////////////////////////////////////////////// | 148 ///////////////////////////////////////////////////////////////////////// |
68 | 149 |
| 150 // Empty implementation for SkImages. |
| 151 |
69 #include "SkImages.h" | 152 #include "SkImages.h" |
70 | 153 |
71 void SkImages::InitializeFlattenables() {} | 154 void SkImages::InitializeFlattenables() {} |
OLD | NEW |