Flutter Engine
The Flutter Engine
third_party
skia
src
codec
SkJpegUtility.h
Go to the documentation of this file.
1
/*
2
* Copyright 2015 Google Inc.
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_codec_DEFINED
10
#define SkJpegUtility_codec_DEFINED
11
12
#include <cstdint>
13
14
extern
"C"
{
15
// We need to include stdio.h before jpeg because jpeg does not include it, but uses FILE
16
// See https://github.com/libjpeg-turbo/libjpeg-turbo/issues/17
17
#include <
stdio.h
>
// IWYU pragma: keep
18
#include "jpeglib.h"
// NO_G3_REWRITE
19
}
20
21
class
SkStream
;
22
23
/*
24
* Error handling function
25
*/
26
void
skjpeg_err_exit
(j_common_ptr cinfo);
27
28
/*
29
* Source handling struct for that allows libjpeg to use our stream object
30
*/
31
struct
skjpeg_source_mgr
: jpeg_source_mgr {
32
skjpeg_source_mgr
(
SkStream
*
stream
);
33
34
SkStream
*
fStream
;
// unowned
35
enum
{
36
// TODO (msarett): Experiment with different buffer sizes.
37
// This size was chosen because it matches SkImageDecoder.
38
kBufferSize
= 1024
39
};
40
uint8_t
fBuffer
[
kBufferSize
];
41
};
42
43
#endif
skjpeg_err_exit
void skjpeg_err_exit(j_common_ptr cinfo)
Definition:
SkJpegUtility.cpp:25
SkStream
Definition:
SkStream.h:29
dart_profiler_symbols.stream
stream
Definition:
dart_profiler_symbols.py:81
stdio.h
skjpeg_source_mgr
Definition:
SkJpegUtility.h:31
skjpeg_source_mgr::skjpeg_source_mgr
skjpeg_source_mgr(SkStream *stream)
Definition:
SkJpegUtility.cpp:134
skjpeg_source_mgr::fStream
SkStream * fStream
Definition:
SkJpegUtility.h:34
skjpeg_source_mgr::kBufferSize
@ kBufferSize
Definition:
SkJpegUtility.h:38
skjpeg_source_mgr::fBuffer
uint8_t fBuffer[kBufferSize]
Definition:
SkJpegUtility.h:40
Generated on Sun Jun 23 2024 21:56:09 for Flutter Engine by
1.9.4