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 "SkCodec.h" | 8 #include "SkCodec.h" |
9 #include "SkMSAN.h" | 9 #include "SkMSAN.h" |
10 #include "SkJpegCodec.h" | 10 #include "SkJpegCodec.h" |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 | 495 |
496 if (fSwizzler) { | 496 if (fSwizzler) { |
497 // use swizzler to sample row | 497 // use swizzler to sample row |
498 fSwizzler->swizzle(dst, dstRow); | 498 fSwizzler->swizzle(dst, dstRow); |
499 dst = SkTAddOffset<JSAMPLE>(dst, dstRowBytes); | 499 dst = SkTAddOffset<JSAMPLE>(dst, dstRowBytes); |
500 } else { | 500 } else { |
501 dstRow = SkTAddOffset<JSAMPLE>(dstRow, dstRowBytes); | 501 dstRow = SkTAddOffset<JSAMPLE>(dstRow, dstRowBytes); |
502 } | 502 } |
503 } | 503 } |
504 | 504 |
505 return kSuccess; | 505 return kUnimplemented; |
506 } | 506 } |
507 | 507 |
508 void SkJpegCodec::initializeSwizzler(const SkImageInfo& dstInfo, const Options&
options) { | 508 void SkJpegCodec::initializeSwizzler(const SkImageInfo& dstInfo, const Options&
options) { |
509 SkSwizzler::SrcConfig srcConfig = SkSwizzler::kUnknown; | 509 SkSwizzler::SrcConfig srcConfig = SkSwizzler::kUnknown; |
510 if (JCS_CMYK == fDecoderMgr->dinfo()->out_color_space) { | 510 if (JCS_CMYK == fDecoderMgr->dinfo()->out_color_space) { |
511 srcConfig = SkSwizzler::kCMYK; | 511 srcConfig = SkSwizzler::kCMYK; |
512 } else { | 512 } else { |
513 // If the out_color_space is not CMYK, the only reason we would need a s
wizzler is | 513 // If the out_color_space is not CMYK, the only reason we would need a s
wizzler is |
514 // for sampling and/or subsetting. | 514 // for sampling and/or subsetting. |
515 switch (dstInfo.colorType()) { | 515 switch (dstInfo.colorType()) { |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 | 889 |
890 JDIMENSION linesRead = jpeg_read_raw_data(dinfo, yuv, numRowsPerBlock); | 890 JDIMENSION linesRead = jpeg_read_raw_data(dinfo, yuv, numRowsPerBlock); |
891 if (linesRead < remainingRows) { | 891 if (linesRead < remainingRows) { |
892 // FIXME: Handle incomplete YUV decodes without signalling an error. | 892 // FIXME: Handle incomplete YUV decodes without signalling an error. |
893 return kInvalidInput; | 893 return kInvalidInput; |
894 } | 894 } |
895 } | 895 } |
896 | 896 |
897 return kSuccess; | 897 return kSuccess; |
898 } | 898 } |
OLD | NEW |