Flutter Engine
The Flutter Engine
SkJPEGWriteUtility.h
Go to the documentation of this file.
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
13
14#include <cstdint>
15
16extern "C" {
17 // We need to include stdio.h before jpeg because jpeg does not include it, but uses FILE
18 // See https://github.com/libjpeg-turbo/libjpeg-turbo/issues/17
19 #include <stdio.h> // IWYU pragma: keep
20 #include "jpeglib.h" // NO_G3_REWRITE
21}
22
23class SkWStream;
24
25void skjpeg_error_exit(j_common_ptr cinfo);
26
27/////////////////////////////////////////////////////////////////////////////
28/* Our destination struct for directing decompressed pixels to our stream
29 * object.
30 */
31struct SK_SPI skjpeg_destination_mgr : jpeg_destination_mgr {
33
35
36 enum {
37 kBufferSize = 1024
38 };
39 uint8_t fBuffer[kBufferSize];
40};
41
42#endif
#define SK_SPI
Definition: SkAPI.h:41
void skjpeg_error_exit(j_common_ptr cinfo)
static const size_t kBufferSize
Definition: SkString.cpp:27
SkWStream *const fStream