14#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
27 char buffer[JMSG_LENGTH_MAX];
40 int scan = ((j_decompress_ptr)
info)->input_scan_number;
64 switch (fDInfo.jpeg_color_space) {
72#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
73 SkAndroidFrameworkUtils::SafetyNetLog(
"118372692");
89 return fSrcMgr.fSourceMgr.get();
95 fDInfo.err = jpeg_std_error(&fErrorMgr);
100 jpeg_create_decompress(&fDInfo);
102 fDInfo.src = &fSrcMgr;
104 fDInfo.progress = &fProgressMgr;
110 jpeg_destroy_decompress(&fDInfo);
118void JpegDecoderMgr::SourceMgr::InitSource(j_decompress_ptr dinfo) {
119 JpegDecoderMgr::SourceMgr*
src = (JpegDecoderMgr::SourceMgr*)dinfo->src;
120 src->fSourceMgr->initSource(
src->next_input_byte,
src->bytes_in_buffer);
124void JpegDecoderMgr::SourceMgr::SkipInputData(j_decompress_ptr dinfo,
long num_bytes_long) {
125 JpegDecoderMgr::SourceMgr*
src = (JpegDecoderMgr::SourceMgr*)dinfo->src;
126 size_t num_bytes =
static_cast<size_t>(num_bytes_long);
127 if (!
src->fSourceMgr->skipInputBytes(num_bytes,
src->next_input_byte,
src->bytes_in_buffer)) {
129 src->next_input_byte =
nullptr;
130 src->bytes_in_buffer = 0;
131 dinfo->err->error_exit((j_common_ptr)dinfo);
136boolean JpegDecoderMgr::SourceMgr::FillInputBuffer(j_decompress_ptr dinfo) {
137 JpegDecoderMgr::SourceMgr*
src = (JpegDecoderMgr::SourceMgr*)dinfo->src;
138 if (!
src->fSourceMgr->fillInputBuffer(
src->next_input_byte,
src->bytes_in_buffer)) {
140 src->next_input_byte =
nullptr;
141 src->bytes_in_buffer = 0;
148void JpegDecoderMgr::SourceMgr::TermSource(j_decompress_ptr dinfo) {}
150JpegDecoderMgr::SourceMgr::SourceMgr(std::unique_ptr<SkJpegSourceMgr> sourceMgr)
151 : fSourceMgr(
std::
move(sourceMgr)) {
152 init_source = JpegDecoderMgr::SourceMgr::InitSource;
153 fill_input_buffer = JpegDecoderMgr::SourceMgr::FillInputBuffer;
154 skip_input_data = JpegDecoderMgr::SourceMgr::SkipInputData;
155 resync_to_restart = jpeg_resync_to_restart;
156 term_source = JpegDecoderMgr::SourceMgr::TermSource;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
#define SkCodecPrintf(...)
static void output_message(j_common_ptr info)
static void progress_monitor(j_common_ptr info)
static void print_message(const j_common_ptr info, const char caller[])
void skjpeg_err_exit(j_common_ptr dinfo)
SkJpegSourceMgr * getSourceMgr()
JpegDecoderMgr(SkStream *stream)
SkCodec::Result returnFailure(const char caller[], SkCodec::Result result)
bool returnFalse(const char caller[])
bool getEncodedColor(SkEncodedInfo::Color *outColor)
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer