Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Public Attributes | List of all members
skjpeg_source_mgr Struct Reference

#include <SkJpegUtility.h>

Inheritance diagram for skjpeg_source_mgr:

Public Types

enum  { kBufferSize = 1024 }
 

Public Member Functions

 skjpeg_source_mgr (SkStream *stream)
 

Public Attributes

SkStreamfStream
 
uint8_t fBuffer [kBufferSize]
 

Detailed Description

Definition at line 31 of file SkJpegUtility.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kBufferSize 

Definition at line 35 of file SkJpegUtility.h.

35 {
36 // TODO (msarett): Experiment with different buffer sizes.
37 // This size was chosen because it matches SkImageDecoder.
38 kBufferSize = 1024
39 };

Constructor & Destructor Documentation

◆ skjpeg_source_mgr()

skjpeg_source_mgr::skjpeg_source_mgr ( SkStream stream)

Definition at line 134 of file SkJpegUtility.cpp.

135 : fStream(stream)
136{
137 if (stream->hasLength() && stream->getMemoryBase()) {
138 init_source = sk_init_mem_source;
139 fill_input_buffer = sk_fill_mem_input_buffer;
140 skip_input_data = sk_skip_mem_input_data;
141 resync_to_restart = jpeg_resync_to_restart;
142 term_source = sk_term_source;
143 bytes_in_buffer = static_cast<size_t>(stream->getLength());
144 next_input_byte = static_cast<const JOCTET*>(stream->getMemoryBase());
145 } else {
146 init_source = sk_init_buffered_source;
147 fill_input_buffer = sk_fill_buffered_input_buffer;
148 skip_input_data = sk_skip_buffered_input_data;
149 resync_to_restart = jpeg_resync_to_restart;
150 term_source = sk_term_source;
151 }
152}
static void sk_init_buffered_source(j_decompress_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)
SkStream * fStream
Definition: SkJpegUtility.h:34

Member Data Documentation

◆ fBuffer

uint8_t skjpeg_source_mgr::fBuffer[kBufferSize]

Definition at line 40 of file SkJpegUtility.h.

◆ fStream

SkStream* skjpeg_source_mgr::fStream

Definition at line 34 of file SkJpegUtility.h.


The documentation for this struct was generated from the following files: