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 "SkImageDecoder.h"
12 #include "SkImageEncoder.h"
13 #include "SkMovie.h"
14
15 class SkColorTable;
16 class SkStream;
17 class SkStreamRewindable;
18
19 // Empty implementations for SkImageDecoder.
20
SkImageDecoder()21 SkImageDecoder::SkImageDecoder() {}
22
~SkImageDecoder()23 SkImageDecoder::~SkImageDecoder() {}
24
Factory(SkStreamRewindable *)25 SkImageDecoder* SkImageDecoder::Factory(SkStreamRewindable*) {
26 return NULL;
27 }
28
copyFieldsToOther(SkImageDecoder *)29 void SkImageDecoder::copyFieldsToOther(SkImageDecoder* ) {}
30
DecodeFile(const char[],SkBitmap *,SkColorType,Mode,Format *)31 bool SkImageDecoder::DecodeFile(const char[], SkBitmap*, SkColorType, Mode, Format*) {
32 return false;
33 }
34
decode(SkStream *,SkBitmap *,SkColorType,Mode)35 bool SkImageDecoder::decode(SkStream*, SkBitmap*, SkColorType, Mode) {
36 return false;
37 }
38
DecodeStream(SkStreamRewindable *,SkBitmap *,SkColorType,Mode,Format *)39 bool SkImageDecoder::DecodeStream(SkStreamRewindable*, SkBitmap*, SkColorType, Mode, Format*) {
40 return false;
41 }
42
DecodeMemory(const void *,size_t,SkBitmap *,SkColorType,Mode,Format *)43 bool SkImageDecoder::DecodeMemory(const void*, size_t, SkBitmap*, SkColorType, Mode, Format*) {
44 return false;
45 }
46
buildTileIndex(SkStreamRewindable *,int * width,int * height)47 bool SkImageDecoder::buildTileIndex(SkStreamRewindable*, int *width, int *height) {
48 return false;
49 }
50
decodeSubset(SkBitmap *,const SkIRect &,SkColorType)51 bool SkImageDecoder::decodeSubset(SkBitmap*, const SkIRect&, SkColorType) {
52 return false;
53 }
54
getFormat() const55 SkImageDecoder::Format SkImageDecoder::getFormat() const {
56 return kUnknown_Format;
57 }
58
GetStreamFormat(SkStreamRewindable *)59 SkImageDecoder::Format SkImageDecoder::GetStreamFormat(SkStreamRewindable*) {
60 return kUnknown_Format;
61 }
62
GetFormatName(Format)63 const char* SkImageDecoder::GetFormatName(Format) {
64 return NULL;
65 }
66
setPeeker(Peeker *)67 SkImageDecoder::Peeker* SkImageDecoder::setPeeker(Peeker*) {
68 return NULL;
69 }
70
71 #ifdef SK_SUPPORT_LEGACY_IMAGEDECODER_CHOOSER
setChooser(Chooser *)72 SkImageDecoder::Chooser* SkImageDecoder::setChooser(Chooser*) {
73 return NULL;
74 }
75 #endif
76
setAllocator(SkBitmap::Allocator *)77 SkBitmap::Allocator* SkImageDecoder::setAllocator(SkBitmap::Allocator*) {
78 return NULL;
79 }
80
setSampleSize(int)81 void SkImageDecoder::setSampleSize(int) {}
82
cropBitmap(SkBitmap *,SkBitmap *,int,int,int,int,int,int,int)83 bool SkImageDecoder::cropBitmap(SkBitmap*, SkBitmap*, int, int, int, int, int,
84 int, int) {
85 return false;
86 }
87
88 #ifdef SK_SUPPORT_LEGACY_IMAGEDECODER_CHOOSER
chooseFromOneChoice(SkColorType,int,int) const89 bool SkImageDecoder::chooseFromOneChoice(SkColorType, int, int) const {
90 return false;
91 }
92 #endif
93
allocPixelRef(SkBitmap *,SkColorTable *) const94 bool SkImageDecoder::allocPixelRef(SkBitmap*, SkColorTable*) const {
95 return false;
96 }
97
98 /////////////////////////////////////////////////////////////////////////
99
100 // Empty implementation for SkMovie.
101
DecodeStream(SkStreamRewindable * stream)102 SkMovie* SkMovie::DecodeStream(SkStreamRewindable* stream) {
103 return NULL;
104 }
105
106 /////////////////////////////////////////////////////////////////////////
107
108 // Empty implementations for SkImageEncoder.
109
Create(Type t)110 SkImageEncoder* SkImageEncoder::Create(Type t) {
111 return NULL;
112 }
113
EncodeFile(const char file[],const SkBitmap &,Type,int quality)114 bool SkImageEncoder::EncodeFile(const char file[], const SkBitmap&, Type, int quality) {
115 return false;
116 }
117
EncodeStream(SkWStream *,const SkBitmap &,SkImageEncoder::Type,int)118 bool SkImageEncoder::EncodeStream(SkWStream*, const SkBitmap&, SkImageEncoder::Type, int) {
119 return false;
120 }
121
EncodeData(const SkBitmap &,Type,int quality)122 SkData* SkImageEncoder::EncodeData(const SkBitmap&, Type, int quality) {
123 return NULL;
124 }
125
encodeStream(SkWStream *,const SkBitmap &,int)126 bool SkImageEncoder::encodeStream(SkWStream*, const SkBitmap&, int) {
127 return false;
128 }
129
encodeData(const SkBitmap &,int)130 SkData* SkImageEncoder::encodeData(const SkBitmap&, int) {
131 return NULL;
132 }
133
encodeFile(const char file[],const SkBitmap & bm,int quality)134 bool SkImageEncoder::encodeFile(const char file[], const SkBitmap& bm, int quality) {
135 return false;
136 }
137 /////////////////////////////////////////////////////////////////////////
138