• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "SkStream.h"
15 
16 class SkColorTable;
17 
18 // Empty implementations for SkImageDecoder.
19 
SkImageDecoder()20 SkImageDecoder::SkImageDecoder() {}
21 
~SkImageDecoder()22 SkImageDecoder::~SkImageDecoder() {}
23 
Factory(SkStreamRewindable *)24 SkImageDecoder* SkImageDecoder::Factory(SkStreamRewindable*) {
25     return NULL;
26 }
27 
copyFieldsToOther(SkImageDecoder *)28 void SkImageDecoder::copyFieldsToOther(SkImageDecoder* ) {}
29 
DecodeFile(const char[],SkBitmap *,SkColorType,Mode,Format *)30 bool SkImageDecoder::DecodeFile(const char[], SkBitmap*, SkColorType, Mode, Format*) {
31     return false;
32 }
33 
decode(SkStream *,SkBitmap *,SkColorType,Mode)34 SkImageDecoder::Result SkImageDecoder::decode(SkStream*, SkBitmap*, SkColorType, Mode) {
35     return kFailure;
36 }
37 
DecodeStream(SkStreamRewindable *,SkBitmap *,SkColorType,Mode,Format *)38 bool SkImageDecoder::DecodeStream(SkStreamRewindable*, SkBitmap*, SkColorType, Mode, Format*) {
39     return false;
40 }
41 
DecodeMemory(const void *,size_t,SkBitmap *,SkColorType,Mode,Format *)42 bool SkImageDecoder::DecodeMemory(const void*, size_t, SkBitmap*, SkColorType, Mode, Format*) {
43     return false;
44 }
45 
buildTileIndex(SkStreamRewindable *,int * width,int * height)46 bool SkImageDecoder::buildTileIndex(SkStreamRewindable*, int *width, int *height) {
47     return false;
48 }
49 
onBuildTileIndex(SkStreamRewindable * stream,int *,int *)50 bool SkImageDecoder::onBuildTileIndex(SkStreamRewindable* stream,
51                                       int* /*width*/, int* /*height*/) {
52     SkDELETE(stream);
53     return false;
54 }
55 
56 
decodeSubset(SkBitmap *,const SkIRect &,SkColorType)57 bool SkImageDecoder::decodeSubset(SkBitmap*, const SkIRect&, SkColorType) {
58     return false;
59 }
60 
getFormat() const61 SkImageDecoder::Format SkImageDecoder::getFormat() const {
62     return kUnknown_Format;
63 }
64 
GetStreamFormat(SkStreamRewindable *)65 SkImageDecoder::Format SkImageDecoder::GetStreamFormat(SkStreamRewindable*) {
66     return kUnknown_Format;
67 }
68 
GetFormatName(Format)69 const char* SkImageDecoder::GetFormatName(Format) {
70     return NULL;
71 }
72 
setPeeker(Peeker *)73 SkImageDecoder::Peeker* SkImageDecoder::setPeeker(Peeker*) {
74     return NULL;
75 }
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 
allocPixelRef(SkBitmap *,SkColorTable *) const88 bool SkImageDecoder::allocPixelRef(SkBitmap*, SkColorTable*) const {
89     return false;
90 }
91 
92 /////////////////////////////////////////////////////////////////////////
93 
94 // Empty implementation for SkMovie.
95 
DecodeStream(SkStreamRewindable * stream)96 SkMovie* SkMovie::DecodeStream(SkStreamRewindable* stream) {
97     return NULL;
98 }
99 
100 /////////////////////////////////////////////////////////////////////////
101 
102 // Empty implementations for SkImageEncoder.
103 
Create(Type t)104 SkImageEncoder* SkImageEncoder::Create(Type t) {
105     return NULL;
106 }
107 
EncodeFile(const char file[],const SkBitmap &,Type,int quality)108 bool SkImageEncoder::EncodeFile(const char file[], const SkBitmap&, Type, int quality) {
109     return false;
110 }
111 
EncodeStream(SkWStream *,const SkBitmap &,SkImageEncoder::Type,int)112 bool SkImageEncoder::EncodeStream(SkWStream*, const SkBitmap&, SkImageEncoder::Type, int) {
113     return false;
114 }
115 
EncodeData(const SkBitmap &,Type,int quality)116 SkData* SkImageEncoder::EncodeData(const SkBitmap&, Type, int quality) {
117     return NULL;
118 }
119 
encodeStream(SkWStream *,const SkBitmap &,int)120 bool SkImageEncoder::encodeStream(SkWStream*, const SkBitmap&, int) {
121     return false;
122 }
123 
encodeData(const SkBitmap &,int)124 SkData* SkImageEncoder::encodeData(const SkBitmap&, int) {
125     return NULL;
126 }
127 
encodeFile(const char file[],const SkBitmap & bm,int quality)128 bool SkImageEncoder::encodeFile(const char file[], const SkBitmap& bm, int quality) {
129     return false;
130 }
131 /////////////////////////////////////////////////////////////////////////
132