reed@android.com | 6f59815 | 2010-01-21 15:34:19 +0000 | [diff] [blame] | 1 | /* |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 2 | * Copyright 2010 The Android Open Source Project |
reed@android.com | 6f59815 | 2010-01-21 15:34:19 +0000 | [diff] [blame] | 3 | * |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
reed@android.com | 6f59815 | 2010-01-21 15:34:19 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 8 | |
reed@android.com | 6f59815 | 2010-01-21 15:34:19 +0000 | [diff] [blame] | 9 | #ifndef SkJpegUtility_DEFINED |
| 10 | #define SkJpegUtility_DEFINED |
| 11 | |
Matt Sarett | 5df93de | 2017-03-22 21:52:47 +0000 | [diff] [blame] | 12 | #include "SkJpegPriv.h" |
reed@android.com | 6f59815 | 2010-01-21 15:34:19 +0000 | [diff] [blame] | 13 | #include "SkStream.h" |
| 14 | |
| 15 | extern "C" { |
| 16 | #include "jpeglib.h" |
| 17 | #include "jerror.h" |
| 18 | } |
| 19 | |
| 20 | #include <setjmp.h> |
| 21 | |
Derek Sollenberger | 2fbf1bc | 2017-09-20 15:51:08 -0400 | [diff] [blame] | 22 | void SK_API skjpeg_error_exit(j_common_ptr cinfo); |
reed@android.com | 6f59815 | 2010-01-21 15:34:19 +0000 | [diff] [blame] | 23 | |
reed@android.com | 6f59815 | 2010-01-21 15:34:19 +0000 | [diff] [blame] | 24 | ///////////////////////////////////////////////////////////////////////////// |
| 25 | /* Our destination struct for directing decompressed pixels to our stream |
| 26 | * object. |
| 27 | */ |
Derek Sollenberger | 2fbf1bc | 2017-09-20 15:51:08 -0400 | [diff] [blame] | 28 | struct SK_API skjpeg_destination_mgr : jpeg_destination_mgr { |
reed@android.com | 6f59815 | 2010-01-21 15:34:19 +0000 | [diff] [blame] | 29 | skjpeg_destination_mgr(SkWStream* stream); |
| 30 | |
| 31 | SkWStream* fStream; |
| 32 | |
| 33 | enum { |
| 34 | kBufferSize = 1024 |
| 35 | }; |
| 36 | uint8_t fBuffer[kBufferSize]; |
| 37 | }; |
| 38 | |
| 39 | #endif |