Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
SkJpegDecoderMgr.cpp File Reference
#include "src/codec/SkJpegDecoderMgr.h"
#include "include/core/SkTypes.h"
#include "src/codec/SkCodecPriv.h"
#include "src/codec/SkJpegSourceMgr.h"
#include "src/codec/SkJpegUtility.h"
#include <cstddef>
#include <utility>

Go to the source code of this file.

Functions

static void print_message (const j_common_ptr info, const char caller[])
 
static void output_message (j_common_ptr info)
 
static void progress_monitor (j_common_ptr info)
 

Function Documentation

◆ output_message()

static void output_message ( j_common_ptr  info)
static

Definition at line 35 of file SkJpegDecoderMgr.cpp.

35 {
36 print_message(info, "output_message");
37}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition DM.cpp:213
static void print_message(const j_common_ptr info, const char caller[])

◆ print_message()

static void print_message ( const j_common_ptr  info,
const char  caller[] 
)
static

Definition at line 26 of file SkJpegDecoderMgr.cpp.

26 {
27 char buffer[JMSG_LENGTH_MAX];
28 info->err->format_message(info, buffer);
29 SkCodecPrintf("libjpeg error %d <%s> from %s\n", info->err->msg_code, buffer, caller);
30}
#define SkCodecPrintf(...)
Definition SkCodecPriv.h:23
static const uint8_t buffer[]

◆ progress_monitor()

static void progress_monitor ( j_common_ptr  info)
static

Definition at line 39 of file SkJpegDecoderMgr.cpp.

39 {
40 int scan = ((j_decompress_ptr)info)->input_scan_number;
41 // Progressive images with a very large number of scans can cause the
42 // decoder to hang. Here we use the progress monitor to abort on
43 // a very large number of scans. 100 is arbitrary, but much larger
44 // than the number of scans we might expect in a normal image.
45 if (scan >= 100) {
47 }
48}
void skjpeg_err_exit(j_common_ptr dinfo)