| 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 "SkJpegCodec.h" | 9 #include "SkJpegCodec.h" |
| 10 #include "SkJpegDecoderMgr.h" | 10 #include "SkJpegDecoderMgr.h" |
| 11 #include "SkJpegUtility_codec.h" | 11 #include "SkJpegUtility_codec.h" |
| 12 #include "SkCodecPriv.h" | 12 #include "SkCodecPriv.h" |
| 13 #include "SkColorPriv.h" | 13 #include "SkColorPriv.h" |
| 14 #include "SkScaledCodec.h" | |
| 15 #include "SkStream.h" | 14 #include "SkStream.h" |
| 16 #include "SkTemplates.h" | 15 #include "SkTemplates.h" |
| 17 #include "SkTypes.h" | 16 #include "SkTypes.h" |
| 18 | 17 |
| 19 // stdio is needed for libjpeg-turbo | 18 // stdio is needed for libjpeg-turbo |
| 20 #include <stdio.h> | 19 #include <stdio.h> |
| 21 | 20 |
| 22 extern "C" { | 21 extern "C" { |
| 23 #include "jerror.h" | 22 #include "jerror.h" |
| 24 #include "jpeglib.h" | 23 #include "jpeglib.h" |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 #endif | 516 #endif |
| 518 | 517 |
| 519 bool SkJpegCodec::onSkipScanlines(int count) { | 518 bool SkJpegCodec::onSkipScanlines(int count) { |
| 520 // Set the jump location for libjpeg errors | 519 // Set the jump location for libjpeg errors |
| 521 if (setjmp(fDecoderMgr->getJmpBuf())) { | 520 if (setjmp(fDecoderMgr->getJmpBuf())) { |
| 522 return fDecoderMgr->returnFalse("setjmp"); | 521 return fDecoderMgr->returnFalse("setjmp"); |
| 523 } | 522 } |
| 524 | 523 |
| 525 return (uint32_t) count == jpeg_skip_scanlines(fDecoderMgr->dinfo(), count); | 524 return (uint32_t) count == jpeg_skip_scanlines(fDecoderMgr->dinfo(), count); |
| 526 } | 525 } |
| OLD | NEW |