Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/ports/SkImageDecoder_empty.cpp

Issue 1507123002: default SkPixelSerializer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-12-10 (Thursday) 13:15:57 EST Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/images/SkImageEncoder.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "SkImageDecoder.h"
12 #include "SkImageEncoder.h" 12 #include "SkImageEncoder.h"
13 #include "SkMovie.h" 13 #include "SkMovie.h"
14 #include "SkPixelSerializer.h"
14 #include "SkStream.h" 15 #include "SkStream.h"
15 16
16 class SkColorTable; 17 class SkColorTable;
17 class SkPngChunkReader; 18 class SkPngChunkReader;
18 19
19 // Empty implementations for SkImageDecoder. 20 // Empty implementations for SkImageDecoder.
20 21
21 SkImageDecoder::SkImageDecoder() {} 22 SkImageDecoder::SkImageDecoder() {}
22 23
23 SkImageDecoder::~SkImageDecoder() {} 24 SkImageDecoder::~SkImageDecoder() {}
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 102
102 SkData* SkImageEncoder::EncodeData(const SkBitmap&, Type, int quality) { 103 SkData* SkImageEncoder::EncodeData(const SkBitmap&, Type, int quality) {
103 return nullptr; 104 return nullptr;
104 } 105 }
105 106
106 SkData* SkImageEncoder::EncodeData(const SkImageInfo&, const void* pixels, size_ t rowBytes, 107 SkData* SkImageEncoder::EncodeData(const SkImageInfo&, const void* pixels, size_ t rowBytes,
107 Type, int quality) { 108 Type, int quality) {
108 return nullptr; 109 return nullptr;
109 } 110 }
110 111
112 SkData* SkImageEncoder::EncodeData(const SkPixmap&, Type, int) {
113 return nullptr;
114 }
115
111 bool SkImageEncoder::encodeStream(SkWStream*, const SkBitmap&, int) { 116 bool SkImageEncoder::encodeStream(SkWStream*, const SkBitmap&, int) {
112 return false; 117 return false;
113 } 118 }
114 119
115 SkData* SkImageEncoder::encodeData(const SkBitmap&, int) { 120 SkData* SkImageEncoder::encodeData(const SkBitmap&, int) {
116 return nullptr; 121 return nullptr;
117 } 122 }
118 123
119 bool SkImageEncoder::encodeFile(const char file[], const SkBitmap& bm, int quali ty) { 124 bool SkImageEncoder::encodeFile(const char file[], const SkBitmap& bm, int quali ty) {
120 return false; 125 return false;
121 } 126 }
127
128 namespace {
129 class ImageEncoderPixelSerializer final : public SkPixelSerializer {
130 protected:
131 bool onUseEncodedData(const void*, size_t) override { return true; }
132 SkData* onEncode(const SkPixmap&) override { return nullptr; }
133 };
134 } // namespace
135
136 SkPixelSerializer* SkImageEncoder::CreatePixelSerializer() {
137 return new ImageEncoderPixelSerializer;
138 }
139
122 ///////////////////////////////////////////////////////////////////////// 140 /////////////////////////////////////////////////////////////////////////
OLDNEW
« no previous file with comments | « src/images/SkImageEncoder.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698