emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 8 | #include "SkCodec.h" |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 9 | #include "SkCodecPriv.h" |
scroggo | 501b734 | 2015-11-03 07:55:11 -0800 | [diff] [blame] | 10 | #include "SkMath.h" |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 11 | #include "SkSampledCodec.h" |
scroggo | 565901d | 2015-12-10 10:44:13 -0800 | [diff] [blame^] | 12 | #include "SkTemplates.h" |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 13 | |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 14 | SkSampledCodec::SkSampledCodec(SkCodec* codec) |
| 15 | : INHERITED(codec->getInfo()) |
scroggo | 46c5747 | 2015-09-30 08:57:13 -0700 | [diff] [blame] | 16 | , fCodec(codec) |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 17 | {} |
| 18 | |
scroggo | 501b734 | 2015-11-03 07:55:11 -0800 | [diff] [blame] | 19 | SkISize SkSampledCodec::accountForNativeScaling(int* sampleSizePtr, int* nativeSampleSize) const { |
| 20 | SkISize preSampledSize = fCodec->getInfo().dimensions(); |
| 21 | int sampleSize = *sampleSizePtr; |
| 22 | SkASSERT(sampleSize > 1); |
| 23 | |
| 24 | if (nativeSampleSize) { |
| 25 | *nativeSampleSize = 1; |
| 26 | } |
| 27 | |
| 28 | // Only JPEG supports native downsampling. |
| 29 | if (fCodec->getEncodedFormat() == kJPEG_SkEncodedFormat) { |
| 30 | // See if libjpeg supports this scale directly |
| 31 | switch (sampleSize) { |
| 32 | case 2: |
| 33 | case 4: |
| 34 | case 8: |
| 35 | // This class does not need to do any sampling. |
| 36 | *sampleSizePtr = 1; |
| 37 | return fCodec->getScaledDimensions(get_scale_from_sample_size(sampleSize)); |
| 38 | default: |
| 39 | break; |
| 40 | } |
| 41 | |
| 42 | // Check if sampleSize is a multiple of something libjpeg can support. |
| 43 | int remainder; |
| 44 | const int sampleSizes[] = { 8, 4, 2 }; |
| 45 | for (int supportedSampleSize : sampleSizes) { |
| 46 | int actualSampleSize; |
| 47 | SkTDivMod(sampleSize, supportedSampleSize, &actualSampleSize, &remainder); |
| 48 | if (0 == remainder) { |
| 49 | float scale = get_scale_from_sample_size(supportedSampleSize); |
| 50 | |
| 51 | // fCodec will scale to this size. |
| 52 | preSampledSize = fCodec->getScaledDimensions(scale); |
| 53 | |
| 54 | // And then this class will sample it. |
| 55 | *sampleSizePtr = actualSampleSize; |
| 56 | if (nativeSampleSize) { |
| 57 | *nativeSampleSize = supportedSampleSize; |
| 58 | } |
| 59 | break; |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | return preSampledSize; |
| 65 | } |
| 66 | |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 67 | SkISize SkSampledCodec::onGetSampledDimensions(int sampleSize) const { |
scroggo | 501b734 | 2015-11-03 07:55:11 -0800 | [diff] [blame] | 68 | const SkISize size = this->accountForNativeScaling(&sampleSize); |
| 69 | return SkISize::Make(get_scaled_dimension(size.width(), sampleSize), |
| 70 | get_scaled_dimension(size.height(), sampleSize)); |
msarett | a83593b | 2015-08-18 08:03:58 -0700 | [diff] [blame] | 71 | } |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 72 | |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 73 | SkCodec::Result SkSampledCodec::onGetAndroidPixels(const SkImageInfo& info, void* pixels, |
scroggo | e95a068 | 2015-11-04 04:31:12 -0800 | [diff] [blame] | 74 | size_t rowBytes, const AndroidOptions& options) { |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 75 | // Create an Options struct for the codec. |
| 76 | SkCodec::Options codecOptions; |
| 77 | codecOptions.fZeroInitialized = options.fZeroInitialized; |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 78 | |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 79 | SkIRect* subset = options.fSubset; |
| 80 | if (!subset || subset->size() == fCodec->getInfo().dimensions()) { |
| 81 | if (fCodec->dimensionsSupported(info.dimensions())) { |
| 82 | return fCodec->getPixels(info, pixels, rowBytes, &codecOptions, options.fColorPtr, |
| 83 | options.fColorCount); |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 84 | } |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 85 | |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 86 | // If the native codec does not support the requested scale, scale by sampling. |
| 87 | return this->sampledDecode(info, pixels, rowBytes, options); |
scroggo | e7fc14b | 2015-10-02 13:14:46 -0700 | [diff] [blame] | 88 | } |
| 89 | |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 90 | // We are performing a subset decode. |
| 91 | int sampleSize = options.fSampleSize; |
scroggo | 501b734 | 2015-11-03 07:55:11 -0800 | [diff] [blame] | 92 | SkISize scaledSize = this->getSampledDimensions(sampleSize); |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 93 | if (!fCodec->dimensionsSupported(scaledSize)) { |
| 94 | // If the native codec does not support the requested scale, scale by sampling. |
| 95 | return this->sampledDecode(info, pixels, rowBytes, options); |
| 96 | } |
scroggo | e7fc14b | 2015-10-02 13:14:46 -0700 | [diff] [blame] | 97 | |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 98 | // Calculate the scaled subset bounds. |
| 99 | int scaledSubsetX = subset->x() / sampleSize; |
| 100 | int scaledSubsetY = subset->y() / sampleSize; |
| 101 | int scaledSubsetWidth = info.width(); |
| 102 | int scaledSubsetHeight = info.height(); |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 103 | |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 104 | // Start the scanline decode. |
| 105 | SkIRect scanlineSubset = SkIRect::MakeXYWH(scaledSubsetX, 0, scaledSubsetWidth, |
| 106 | scaledSize.height()); |
| 107 | codecOptions.fSubset = &scanlineSubset; |
| 108 | SkCodec::Result result = fCodec->startScanlineDecode(info.makeWH(scaledSize.width(), |
| 109 | scaledSize.height()), &codecOptions, options.fColorPtr, options.fColorCount); |
| 110 | if (SkCodec::kSuccess != result) { |
| 111 | return result; |
| 112 | } |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 113 | |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 114 | // At this point, we are only concerned with subsetting. Either no scale was |
| 115 | // requested, or the fCodec is handling the scale. |
| 116 | switch (fCodec->getScanlineOrder()) { |
| 117 | case SkCodec::kTopDown_SkScanlineOrder: |
| 118 | case SkCodec::kNone_SkScanlineOrder: { |
| 119 | if (!fCodec->skipScanlines(scaledSubsetY)) { |
| 120 | fCodec->fillIncompleteImage(info, pixels, rowBytes, options.fZeroInitialized, |
| 121 | scaledSubsetHeight, 0); |
| 122 | return SkCodec::kIncompleteInput; |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 123 | } |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 124 | |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 125 | int decodedLines = fCodec->getScanlines(pixels, scaledSubsetHeight, rowBytes); |
| 126 | if (decodedLines != scaledSubsetHeight) { |
| 127 | return SkCodec::kIncompleteInput; |
| 128 | } |
| 129 | return SkCodec::kSuccess; |
| 130 | } |
| 131 | default: |
| 132 | SkASSERT(false); |
| 133 | return SkCodec::kUnimplemented; |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 134 | } |
| 135 | } |
| 136 | |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 137 | |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 138 | SkCodec::Result SkSampledCodec::sampledDecode(const SkImageInfo& info, void* pixels, |
scroggo | e95a068 | 2015-11-04 04:31:12 -0800 | [diff] [blame] | 139 | size_t rowBytes, const AndroidOptions& options) { |
scroggo | 501b734 | 2015-11-03 07:55:11 -0800 | [diff] [blame] | 140 | // We should only call this function when sampling. |
| 141 | SkASSERT(options.fSampleSize > 1); |
| 142 | |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 143 | // Create options struct for the codec. |
| 144 | SkCodec::Options sampledOptions; |
| 145 | sampledOptions.fZeroInitialized = options.fZeroInitialized; |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 146 | |
scroggo | 501b734 | 2015-11-03 07:55:11 -0800 | [diff] [blame] | 147 | // FIXME: This was already called by onGetAndroidPixels. Can we reduce that? |
| 148 | int sampleSize = options.fSampleSize; |
| 149 | int nativeSampleSize; |
| 150 | SkISize nativeSize = this->accountForNativeScaling(&sampleSize, &nativeSampleSize); |
| 151 | |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 152 | // Check if there is a subset. |
| 153 | SkIRect subset; |
| 154 | int subsetY = 0; |
scroggo | 501b734 | 2015-11-03 07:55:11 -0800 | [diff] [blame] | 155 | int subsetWidth = nativeSize.width(); |
| 156 | int subsetHeight = nativeSize.height(); |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 157 | if (options.fSubset) { |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 158 | // We will need to know about subsetting in the y-dimension in order to use the |
| 159 | // scanline decoder. |
scroggo | 501b734 | 2015-11-03 07:55:11 -0800 | [diff] [blame] | 160 | // Update the subset to account for scaling done by fCodec. |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 161 | SkIRect* subsetPtr = options.fSubset; |
scroggo | 501b734 | 2015-11-03 07:55:11 -0800 | [diff] [blame] | 162 | |
| 163 | // Do the divide ourselves, instead of calling get_scaled_dimension. If |
| 164 | // X and Y are 0, they should remain 0, rather than being upgraded to 1 |
| 165 | // due to being smaller than the sampleSize. |
| 166 | const int subsetX = subsetPtr->x() / nativeSampleSize; |
| 167 | subsetY = subsetPtr->y() / nativeSampleSize; |
| 168 | |
| 169 | subsetWidth = get_scaled_dimension(subsetPtr->width(), nativeSampleSize); |
| 170 | subsetHeight = get_scaled_dimension(subsetPtr->height(), nativeSampleSize); |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 171 | |
| 172 | // The scanline decoder only needs to be aware of subsetting in the x-dimension. |
scroggo | 501b734 | 2015-11-03 07:55:11 -0800 | [diff] [blame] | 173 | subset.setXYWH(subsetX, 0, subsetWidth, nativeSize.height()); |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 174 | sampledOptions.fSubset = ⊂ |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 175 | } |
| 176 | |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 177 | // Start the scanline decode. |
| 178 | SkCodec::Result result = fCodec->startScanlineDecode( |
scroggo | 501b734 | 2015-11-03 07:55:11 -0800 | [diff] [blame] | 179 | info.makeWH(nativeSize.width(), nativeSize.height()), &sampledOptions, |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 180 | options.fColorPtr, options.fColorCount); |
| 181 | if (SkCodec::kSuccess != result) { |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 182 | return result; |
| 183 | } |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 184 | |
msarett | e6dd004 | 2015-10-09 11:07:34 -0700 | [diff] [blame] | 185 | SkSampler* sampler = fCodec->getSampler(true); |
scroggo | e7fc14b | 2015-10-02 13:14:46 -0700 | [diff] [blame] | 186 | if (!sampler) { |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 187 | return SkCodec::kUnimplemented; |
scroggo | e7fc14b | 2015-10-02 13:14:46 -0700 | [diff] [blame] | 188 | } |
| 189 | |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 190 | // Since we guarantee that output dimensions are always at least one (even if the sampleSize |
| 191 | // is greater than a given dimension), the input sampleSize is not always the sampleSize that |
| 192 | // we use in practice. |
| 193 | const int sampleX = subsetWidth / info.width(); |
| 194 | const int sampleY = subsetHeight / info.height(); |
| 195 | if (sampler->setSampleX(sampleX) != info.width()) { |
| 196 | return SkCodec::kInvalidScale; |
| 197 | } |
| 198 | if (get_scaled_dimension(subsetHeight, sampleY) != info.height()) { |
| 199 | return SkCodec::kInvalidScale; |
scroggo | e7fc14b | 2015-10-02 13:14:46 -0700 | [diff] [blame] | 200 | } |
| 201 | |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 202 | const int samplingOffsetY = get_start_coord(sampleY); |
| 203 | const int startY = samplingOffsetY + subsetY; |
| 204 | int dstHeight = info.height(); |
scroggo | 46c5747 | 2015-09-30 08:57:13 -0700 | [diff] [blame] | 205 | switch(fCodec->getScanlineOrder()) { |
| 206 | case SkCodec::kTopDown_SkScanlineOrder: { |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 207 | if (!fCodec->skipScanlines(startY)) { |
| 208 | fCodec->fillIncompleteImage(info, pixels, rowBytes, options.fZeroInitialized, |
| 209 | dstHeight, 0); |
| 210 | return SkCodec::kIncompleteInput; |
msarett | 5406d6f | 2015-08-31 06:55:13 -0700 | [diff] [blame] | 211 | } |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 212 | void* pixelPtr = pixels; |
msarett | 5406d6f | 2015-08-31 06:55:13 -0700 | [diff] [blame] | 213 | for (int y = 0; y < dstHeight; y++) { |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 214 | if (1 != fCodec->getScanlines(pixelPtr, 1, rowBytes)) { |
| 215 | fCodec->fillIncompleteImage(info, pixels, rowBytes, options.fZeroInitialized, |
| 216 | dstHeight, y + 1); |
| 217 | return SkCodec::kIncompleteInput; |
msarett | 5406d6f | 2015-08-31 06:55:13 -0700 | [diff] [blame] | 218 | } |
msarett | 691ad76 | 2015-11-05 11:19:29 -0800 | [diff] [blame] | 219 | if (y < dstHeight - 1) { |
| 220 | if (!fCodec->skipScanlines(sampleY - 1)) { |
| 221 | fCodec->fillIncompleteImage(info, pixels, rowBytes, |
| 222 | options.fZeroInitialized, dstHeight, y + 1); |
| 223 | return SkCodec::kIncompleteInput; |
| 224 | } |
msarett | 5406d6f | 2015-08-31 06:55:13 -0700 | [diff] [blame] | 225 | } |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 226 | pixelPtr = SkTAddOffset<void>(pixelPtr, rowBytes); |
msarett | 5406d6f | 2015-08-31 06:55:13 -0700 | [diff] [blame] | 227 | } |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 228 | return SkCodec::kSuccess; |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 229 | } |
msarett | 5af4e0b | 2015-11-17 11:18:03 -0800 | [diff] [blame] | 230 | case SkCodec::kOutOfOrder_SkScanlineOrder: |
msarett | 887e18e | 2015-11-17 08:46:02 -0800 | [diff] [blame] | 231 | case SkCodec::kBottomUp_SkScanlineOrder: { |
msarett | 5af4e0b | 2015-11-17 11:18:03 -0800 | [diff] [blame] | 232 | // Note that these modes do not support subsetting. |
msarett | 887e18e | 2015-11-17 08:46:02 -0800 | [diff] [blame] | 233 | SkASSERT(0 == subsetY && nativeSize.height() == subsetHeight); |
| 234 | int y; |
| 235 | for (y = 0; y < nativeSize.height(); y++) { |
| 236 | int srcY = fCodec->nextScanline(); |
| 237 | if (is_coord_necessary(srcY, sampleY, dstHeight)) { |
| 238 | void* pixelPtr = SkTAddOffset<void>(pixels, |
| 239 | rowBytes * get_dst_coord(srcY, sampleY)); |
| 240 | if (1 != fCodec->getScanlines(pixelPtr, 1, rowBytes)) { |
| 241 | break; |
| 242 | } |
| 243 | } else { |
| 244 | if (!fCodec->skipScanlines(1)) { |
| 245 | break; |
| 246 | } |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | if (nativeSize.height() == y) { |
| 251 | return SkCodec::kSuccess; |
| 252 | } |
| 253 | |
| 254 | // We handle filling uninitialized memory here instead of using fCodec. |
| 255 | // fCodec does not know that we are sampling. |
| 256 | const uint32_t fillValue = fCodec->getFillValue(info.colorType(), info.alphaType()); |
| 257 | const SkImageInfo fillInfo = info.makeWH(info.width(), 1); |
| 258 | for (; y < nativeSize.height(); y++) { |
| 259 | int srcY = fCodec->outputScanline(y); |
| 260 | if (!is_coord_necessary(srcY, sampleY, dstHeight)) { |
| 261 | continue; |
| 262 | } |
| 263 | |
| 264 | void* rowPtr = SkTAddOffset<void>(pixels, rowBytes * get_dst_coord(srcY, sampleY)); |
| 265 | SkSampler::Fill(fillInfo, rowPtr, rowBytes, fillValue, options.fZeroInitialized); |
| 266 | } |
| 267 | return SkCodec::kIncompleteInput; |
| 268 | } |
scroggo | 46c5747 | 2015-09-30 08:57:13 -0700 | [diff] [blame] | 269 | case SkCodec::kNone_SkScanlineOrder: { |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 270 | const int linesNeeded = subsetHeight - samplingOffsetY; |
scroggo | 565901d | 2015-12-10 10:44:13 -0800 | [diff] [blame^] | 271 | SkAutoTMalloc<uint8_t> storage(linesNeeded * rowBytes); |
| 272 | uint8_t* storagePtr = storage.get(); |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 273 | |
| 274 | if (!fCodec->skipScanlines(startY)) { |
| 275 | fCodec->fillIncompleteImage(info, pixels, rowBytes, options.fZeroInitialized, |
| 276 | dstHeight, 0); |
| 277 | return SkCodec::kIncompleteInput; |
| 278 | } |
| 279 | int scanlines = fCodec->getScanlines(storagePtr, linesNeeded, rowBytes); |
| 280 | |
| 281 | for (int y = 0; y < dstHeight; y++) { |
| 282 | memcpy(pixels, storagePtr, info.minRowBytes()); |
msarett | 5406d6f | 2015-08-31 06:55:13 -0700 | [diff] [blame] | 283 | storagePtr += sampleY * rowBytes; |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 284 | pixels = SkTAddOffset<void>(pixels, rowBytes); |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 285 | } |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 286 | |
| 287 | if (scanlines < dstHeight) { |
msarett | e6dd004 | 2015-10-09 11:07:34 -0700 | [diff] [blame] | 288 | // fCodec has already handled filling uninitialized memory. |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 289 | return SkCodec::kIncompleteInput; |
msarett | e6dd004 | 2015-10-09 11:07:34 -0700 | [diff] [blame] | 290 | } |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 291 | return SkCodec::kSuccess; |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 292 | } |
msarett | 5406d6f | 2015-08-31 06:55:13 -0700 | [diff] [blame] | 293 | default: |
| 294 | SkASSERT(false); |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 295 | return SkCodec::kUnimplemented; |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 296 | } |
emmaleer | 8f4ba76 | 2015-08-14 07:44:46 -0700 | [diff] [blame] | 297 | } |