1/*
2 * Copyright 2010 The Android Open Source Project
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
8
9#ifndef SkJpegUtility_DEFINED
10#define SkJpegUtility_DEFINED
11
12#include "include/core/SkStream.h"
13#include "src/codec/SkJpegPriv.h"
14
15extern "C" {
16 #include "jpeglib.h"
17 #include "jerror.h"
18}
19
20#include <setjmp.h>
21
22void skjpeg_error_exit(j_common_ptr cinfo);
23
24/////////////////////////////////////////////////////////////////////////////
25/* Our destination struct for directing decompressed pixels to our stream
26 * object.
27 */
28struct SK_SPI skjpeg_destination_mgr : jpeg_destination_mgr {
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
40