29 (*
error->output_message)(dinfo);
30 if (
error->fStack[0] ==
nullptr) {
31 SK_ABORT(
"JPEG error with no jmp_buf set.");
33 longjmp(*
error->fStack[0], 1);
43 src->next_input_byte = (
const JOCTET*)
src->fBuffer;
44 src->bytes_in_buffer = 0;
57 src->next_input_byte =
nullptr;
58 src->bytes_in_buffer = 0;
62 src->next_input_byte = (
const JOCTET*)
src->fBuffer;
63 src->bytes_in_buffer = bytes;
72 size_t bytes = (
size_t) numBytes;
74 if (bytes >
src->bytes_in_buffer) {
75 size_t bytesToSkip = bytes -
src->bytes_in_buffer;
76 if (bytesToSkip !=
src->fStream->skip(bytesToSkip)) {
78 dinfo->err->error_exit((j_common_ptr) dinfo);
82 src->next_input_byte = (
const JOCTET*)
src->fBuffer;
83 src->bytes_in_buffer = 0;
85 src->next_input_byte += numBytes;
86 src->bytes_in_buffer -= numBytes;
111 jpeg_source_mgr*
src = cinfo->src;
112 size_t bytes =
static_cast<size_t>(num_bytes);
113 if(bytes >
src->bytes_in_buffer) {
114 src->next_input_byte =
nullptr;
115 src->bytes_in_buffer = 0;
117 src->next_input_byte += bytes;
118 src->bytes_in_buffer -= bytes;
141 resync_to_restart = jpeg_resync_to_restart;
143 bytes_in_buffer =
static_cast<size_t>(
stream->getLength());
144 next_input_byte =
static_cast<const JOCTET*
>(
stream->getMemoryBase());
149 resync_to_restart = jpeg_resync_to_restart;
#define SK_ABORT(message,...)
#define SkCodecPrintf(...)
static void sk_init_buffered_source(j_decompress_ptr dinfo)
void skjpeg_err_exit(j_common_ptr dinfo)
static void sk_skip_mem_input_data(j_decompress_ptr cinfo, long num_bytes)
static boolean sk_fill_mem_input_buffer(j_decompress_ptr cinfo)
static void sk_term_source(j_decompress_ptr dinfo)
static void sk_init_mem_source(j_decompress_ptr dinfo)
static void sk_skip_buffered_input_data(j_decompress_ptr dinfo, long numBytes)
static boolean sk_fill_buffered_input_buffer(j_decompress_ptr dinfo)
const uint8_t uint32_t uint32_t GError ** error
skjpeg_source_mgr(SkStream *stream)