Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
SkJPEGWriteUtility.cpp File Reference
#include "src/encode/SkJPEGWriteUtility.h"
#include "include/core/SkStream.h"
#include "src/codec/SkJpegPriv.h"
#include <csetjmp>
#include <cstddef>
#include "jerror.h"
#include "jpeglib.h"

Go to the source code of this file.

Functions

static void sk_init_destination (j_compress_ptr cinfo)
 
static boolean sk_empty_output_buffer (j_compress_ptr cinfo)
 
static void sk_term_destination (j_compress_ptr cinfo)
 
void skjpeg_error_exit (j_common_ptr cinfo)
 

Function Documentation

◆ sk_empty_output_buffer()

static boolean sk_empty_output_buffer ( j_compress_ptr  cinfo)
static

Definition at line 31 of file SkJPEGWriteUtility.cpp.

31 {
33
34// if (!dest->fStream->write(dest->fBuffer, skjpeg_destination_mgr::kBufferSize - dest->free_in_buffer))
35 if (!dest->fStream->write(dest->fBuffer,
37 ERREXIT(cinfo, JERR_FILE_WRITE);
38 return FALSE;
39 }
40
41 dest->next_output_byte = dest->fBuffer;
43 return TRUE;
44}
return FALSE
dest
Definition zip.py:79

◆ sk_init_destination()

static void sk_init_destination ( j_compress_ptr  cinfo)
static

Definition at line 24 of file SkJPEGWriteUtility.cpp.

24 {
26
27 dest->next_output_byte = dest->fBuffer;
29}

◆ sk_term_destination()

static void sk_term_destination ( j_compress_ptr  cinfo)
static

Definition at line 46 of file SkJPEGWriteUtility.cpp.

46 {
48
49 size_t size = skjpeg_destination_mgr::kBufferSize - dest->free_in_buffer;
50 if (size > 0) {
51 if (!dest->fStream->write(dest->fBuffer, size)) {
52 ERREXIT(cinfo, JERR_FILE_WRITE);
53 return;
54 }
55 }
56
57 dest->fStream->flush();
58}
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition switches.h:259

◆ skjpeg_error_exit()

void skjpeg_error_exit ( j_common_ptr  cinfo)

Definition at line 66 of file SkJPEGWriteUtility.cpp.

66 {
68
69 (*error->output_message) (cinfo);
70
71 /* Let the memory manager delete any temp files before we die */
72 jpeg_destroy(cinfo);
73
74 if (error->fStack[0] == nullptr) {
75 SK_ABORT("JPEG error with no jmp_buf set.");
76 }
77 longjmp(*error->fStack[0], -1);
78}
#define SK_ABORT(message,...)
Definition SkAssert.h:70
const uint8_t uint32_t uint32_t GError ** error