| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "SkBmpCodec.h" | 8 #include "SkBmpCodec.h" |
| 9 #include "SkCodec.h" | 9 #include "SkCodec.h" |
| 10 #include "SkData.h" | 10 #include "SkData.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 } | 133 } |
| 134 | 134 |
| 135 SkCodec::Result SkCodec::getPixels(const SkImageInfo& info, void* pixels, size_t
rowBytes) { | 135 SkCodec::Result SkCodec::getPixels(const SkImageInfo& info, void* pixels, size_t
rowBytes) { |
| 136 SkASSERT(kIndex_8_SkColorType != info.colorType()); | 136 SkASSERT(kIndex_8_SkColorType != info.colorType()); |
| 137 if (kIndex_8_SkColorType == info.colorType()) { | 137 if (kIndex_8_SkColorType == info.colorType()) { |
| 138 return kInvalidConversion; | 138 return kInvalidConversion; |
| 139 } | 139 } |
| 140 return this->getPixels(info, pixels, rowBytes, NULL, NULL, NULL); | 140 return this->getPixels(info, pixels, rowBytes, NULL, NULL, NULL); |
| 141 } | 141 } |
| 142 | 142 |
| 143 SkScanlineDecoder* SkCodec::getScanlineDecoder(const SkImageInfo& dstInfo, const
Options* options, | |
| 144 SkPMColor ctable[], int* ctableCount) { | |
| 145 | |
| 146 // Set options. | |
| 147 Options optsStorage; | |
| 148 if (NULL == options) { | |
| 149 options = &optsStorage; | |
| 150 } | |
| 151 | |
| 152 return this->onGetScanlineDecoder(dstInfo, *options, ctable, ctableCount); | |
| 153 } | |
| 154 | |
| 155 SkScanlineDecoder* SkCodec::getScanlineDecoder(const SkImageInfo& dstInfo) { | |
| 156 SkASSERT(kIndex_8_SkColorType != dstInfo.colorType()); | |
| 157 if (kIndex_8_SkColorType == dstInfo.colorType()) { | |
| 158 return NULL; | |
| 159 } | |
| 160 return this->getScanlineDecoder(dstInfo, NULL, NULL, NULL); | |
| 161 } | |
| OLD | NEW |