blob: e5ad6da6eb979782541a5adbe8f7ac9081612760 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
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
scroggo@google.com7def5e12013-05-31 14:00:10 +00009#include "SkBitmap.h"
scroggo@google.com7def5e12013-05-31 14:00:10 +000010#include "SkImage.h"
reed@android.com6efdc472008-12-19 18:24:35 +000011#include "SkImageDecoder.h"
scroggo@google.com5a7c6be2012-10-04 21:46:08 +000012#include "SkImageEncoder.h"
reed@android.com6efdc472008-12-19 18:24:35 +000013#include "SkMovie.h"
scroggoa1193e42015-01-21 12:09:53 -080014#include "SkStream.h"
reed@android.com6efdc472008-12-19 18:24:35 +000015
scroggo@google.com7def5e12013-05-31 14:00:10 +000016class SkColorTable;
reed@android.com6efdc472008-12-19 18:24:35 +000017
scroggo@google.com7def5e12013-05-31 14:00:10 +000018// Empty implementations for SkImageDecoder.
19
scroggo@google.come5c9c492013-10-01 19:54:42 +000020SkImageDecoder::SkImageDecoder() {}
21
22SkImageDecoder::~SkImageDecoder() {}
23
scroggo@google.comb5571b32013-09-25 21:34:24 +000024SkImageDecoder* SkImageDecoder::Factory(SkStreamRewindable*) {
reed@android.com6efdc472008-12-19 18:24:35 +000025 return NULL;
26}
27
scroggo@google.com468142b2013-07-09 15:48:24 +000028void SkImageDecoder::copyFieldsToOther(SkImageDecoder* ) {}
29
reedbfefc7c2014-06-12 17:40:00 -070030bool SkImageDecoder::DecodeFile(const char[], SkBitmap*, SkColorType, Mode, Format*) {
scroggo@google.com5a7c6be2012-10-04 21:46:08 +000031 return false;
32}
33
scroggo2a120802014-10-22 12:07:00 -070034SkImageDecoder::Result SkImageDecoder::decode(SkStream*, SkBitmap*, SkColorType, Mode) {
35 return kFailure;
scroggo@google.com5a7c6be2012-10-04 21:46:08 +000036}
37
reedbfefc7c2014-06-12 17:40:00 -070038bool SkImageDecoder::DecodeStream(SkStreamRewindable*, SkBitmap*, SkColorType, Mode, Format*) {
scroggo@google.com5a7c6be2012-10-04 21:46:08 +000039 return false;
40}
41
reedbfefc7c2014-06-12 17:40:00 -070042bool SkImageDecoder::DecodeMemory(const void*, size_t, SkBitmap*, SkColorType, Mode, Format*) {
scroggo@google.com5a7c6be2012-10-04 21:46:08 +000043 return false;
44}
45
scroggo@google.comb5571b32013-09-25 21:34:24 +000046bool SkImageDecoder::buildTileIndex(SkStreamRewindable*, int *width, int *height) {
scroggo@google.com7def5e12013-05-31 14:00:10 +000047 return false;
48}
49
scroggoa1193e42015-01-21 12:09:53 -080050bool SkImageDecoder::onBuildTileIndex(SkStreamRewindable* stream,
51 int* /*width*/, int* /*height*/) {
52 SkDELETE(stream);
53 return false;
54}
55
56
reedbfefc7c2014-06-12 17:40:00 -070057bool SkImageDecoder::decodeSubset(SkBitmap*, const SkIRect&, SkColorType) {
scroggo@google.com7def5e12013-05-31 14:00:10 +000058 return false;
59}
60
61SkImageDecoder::Format SkImageDecoder::getFormat() const {
62 return kUnknown_Format;
63}
64
scroggo@google.comb5571b32013-09-25 21:34:24 +000065SkImageDecoder::Format SkImageDecoder::GetStreamFormat(SkStreamRewindable*) {
scroggo@google.com7def5e12013-05-31 14:00:10 +000066 return kUnknown_Format;
67}
68
69const char* SkImageDecoder::GetFormatName(Format) {
scroggo@google.com5a7c6be2012-10-04 21:46:08 +000070 return NULL;
71}
scroggo@google.com7def5e12013-05-31 14:00:10 +000072
73SkImageDecoder::Peeker* SkImageDecoder::setPeeker(Peeker*) {
74 return NULL;
75}
76
scroggo@google.com7def5e12013-05-31 14:00:10 +000077SkBitmap::Allocator* SkImageDecoder::setAllocator(SkBitmap::Allocator*) {
78 return NULL;
79}
80
81void SkImageDecoder::setSampleSize(int) {}
82
scroggo@google.com7def5e12013-05-31 14:00:10 +000083bool SkImageDecoder::cropBitmap(SkBitmap*, SkBitmap*, int, int, int, int, int,
84 int, int) {
85 return false;
86}
87
scroggo@google.com7def5e12013-05-31 14:00:10 +000088bool SkImageDecoder::allocPixelRef(SkBitmap*, SkColorTable*) const {
89 return false;
90}
91
scroggo@google.com5a7c6be2012-10-04 21:46:08 +000092/////////////////////////////////////////////////////////////////////////
93
scroggo@google.com7def5e12013-05-31 14:00:10 +000094// Empty implementation for SkMovie.
95
scroggo@google.comb5571b32013-09-25 21:34:24 +000096SkMovie* SkMovie::DecodeStream(SkStreamRewindable* stream) {
scroggo@google.com5a7c6be2012-10-04 21:46:08 +000097 return NULL;
98}
99
100/////////////////////////////////////////////////////////////////////////
101
scroggo@google.com7def5e12013-05-31 14:00:10 +0000102// Empty implementations for SkImageEncoder.
103
scroggo@google.com5a7c6be2012-10-04 21:46:08 +0000104SkImageEncoder* SkImageEncoder::Create(Type t) {
105 return NULL;
106}
107
108bool SkImageEncoder::EncodeFile(const char file[], const SkBitmap&, Type, int quality) {
109 return false;
110}
111
112bool SkImageEncoder::EncodeStream(SkWStream*, const SkBitmap&, SkImageEncoder::Type, int) {
113 return false;
114}
115
scroggo@google.com7def5e12013-05-31 14:00:10 +0000116SkData* SkImageEncoder::EncodeData(const SkBitmap&, Type, int quality) {
117 return NULL;
118}
119
scroggo@google.com5a7c6be2012-10-04 21:46:08 +0000120bool SkImageEncoder::encodeStream(SkWStream*, const SkBitmap&, int) {
reed@android.com6efdc472008-12-19 18:24:35 +0000121 return false;
122}
123
scroggo@google.com7def5e12013-05-31 14:00:10 +0000124SkData* SkImageEncoder::encodeData(const SkBitmap&, int) {
125 return NULL;
126}
127
128bool SkImageEncoder::encodeFile(const char file[], const SkBitmap& bm, int quality) {
129 return false;
130}
reed@android.com6efdc472008-12-19 18:24:35 +0000131/////////////////////////////////////////////////////////////////////////