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

Side by Side Diff: src/core/SkImageGenerator.cpp

Issue 1123473004: remove dead code behind BOOL_ONGETINFO (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 months 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/codec/SkCodec.cpp ('k') | src/images/SkDecodingImageGenerator.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 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkImageGenerator.h" 8 #include "SkImageGenerator.h"
9 9
10 #ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
11 SkImageInfo SkImageGenerator::getInfo() {
12 SkImageInfo info;
13 if (!this->onGetInfo(&info)) {
14 info = SkImageInfo::MakeUnknown(0, 0);
15 }
16 return info;
17 }
18 #endif
19
20 SkImageGenerator::Result SkImageGenerator::getPixels(const SkImageInfo& info, vo id* pixels, 10 SkImageGenerator::Result SkImageGenerator::getPixels(const SkImageInfo& info, vo id* pixels,
21 size_t rowBytes, const Opti ons* options, 11 size_t rowBytes, const Opti ons* options,
22 SkPMColor ctable[], int* ct ableCount) { 12 SkPMColor ctable[], int* ct ableCount) {
23 if (kUnknown_SkColorType == info.colorType()) { 13 if (kUnknown_SkColorType == info.colorType()) {
24 return kInvalidConversion; 14 return kInvalidConversion;
25 } 15 }
26 if (NULL == pixels) { 16 if (NULL == pixels) {
27 return kInvalidParameters; 17 return kInvalidParameters;
28 } 18 }
29 if (rowBytes < info.minRowBytes()) { 19 if (rowBytes < info.minRowBytes()) {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 105 }
116 return this->onGetYUV8Planes(sizes, planes, rowBytes); 106 return this->onGetYUV8Planes(sizes, planes, rowBytes);
117 } 107 }
118 108
119 //////////////////////////////////////////////////////////////////////////////// ///////////// 109 //////////////////////////////////////////////////////////////////////////////// /////////////
120 110
121 SkData* SkImageGenerator::onRefEncodedData() { 111 SkData* SkImageGenerator::onRefEncodedData() {
122 return NULL; 112 return NULL;
123 } 113 }
124 114
125 #ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
126 bool SkImageGenerator::onGetInfo(SkImageInfo* info) {
127 if (info) {
128 *info = fInfo;
129 }
130 return true;
131 }
132 #endif
133
134 #ifdef SK_SUPPORT_LEGACY_OPTIONLESS_GET_PIXELS 115 #ifdef SK_SUPPORT_LEGACY_OPTIONLESS_GET_PIXELS
135 SkImageGenerator::Result SkImageGenerator::onGetPixels(const SkImageInfo&, void* , size_t, 116 SkImageGenerator::Result SkImageGenerator::onGetPixels(const SkImageInfo&, void* , size_t,
136 SkPMColor*, int*) { 117 SkPMColor*, int*) {
137 return kUnimplemented; 118 return kUnimplemented;
138 } 119 }
139 #endif 120 #endif
140 121
141 SkImageGenerator::Result SkImageGenerator::onGetPixels(const SkImageInfo& info, void* dst, 122 SkImageGenerator::Result SkImageGenerator::onGetPixels(const SkImageInfo& info, void* dst,
142 size_t rb, const Options& options, 123 size_t rb, const Options& options,
143 SkPMColor* colors, int* c olorCount) { 124 SkPMColor* colors, int* c olorCount) {
144 #ifdef SK_SUPPORT_LEGACY_OPTIONLESS_GET_PIXELS 125 #ifdef SK_SUPPORT_LEGACY_OPTIONLESS_GET_PIXELS
145 return this->onGetPixels(info, dst, rb, colors, colorCount); 126 return this->onGetPixels(info, dst, rb, colors, colorCount);
146 #else 127 #else
147 return kUnimplemented; 128 return kUnimplemented;
148 #endif 129 #endif
149 } 130 }
OLDNEW
« no previous file with comments | « src/codec/SkCodec.cpp ('k') | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698