Go to the source code of this file.
|
bool | sk_select_xform_format (SkColorType colorType, bool forColorTable, skcms_PixelFormat *outFormat) |
|
static float | get_scale_from_sample_size (int sampleSize) |
|
static bool | is_valid_subset (const SkIRect &subset, const SkISize &imageDims) |
|
static int | get_scaled_dimension (int srcDimension, int sampleSize) |
|
static int | get_start_coord (int sampleFactor) |
|
static int | get_dst_coord (int srcCoord, int sampleFactor) |
|
static bool | is_coord_necessary (int srcCoord, int sampleFactor, int scaledDim) |
|
static bool | valid_alpha (SkAlphaType dstAlpha, bool srcIsOpaque) |
|
static const SkPMColor * | get_color_ptr (SkColorPalette *colorTable) |
|
static size_t | compute_row_bytes_ppb (int width, uint32_t pixelsPerByte) |
|
static size_t | compute_row_bytes_bpp (int width, uint32_t bytesPerPixel) |
|
static size_t | compute_row_bytes (int width, uint32_t bitsPerPixel) |
|
static uint8_t | get_byte (const uint8_t *buffer, uint32_t i) |
|
static uint16_t | get_short (const uint8_t *buffer, uint32_t i) |
|
static uint32_t | get_int (const uint8_t *buffer, uint32_t i) |
|
static bool | is_valid_endian_marker (const uint8_t *data, bool *isLittleEndian) |
|
static uint16_t | get_endian_short (const uint8_t *data, bool littleEndian) |
|
static uint32_t | get_endian_int (const uint8_t *data, bool littleEndian) |
|
static SkPMColor | premultiply_argb_as_rgba (U8CPU a, U8CPU r, U8CPU g, U8CPU b) |
|
static SkPMColor | premultiply_argb_as_bgra (U8CPU a, U8CPU r, U8CPU g, U8CPU b) |
|
static bool | is_rgba (SkColorType colorType) |
|
static PackColorProc | choose_pack_color_proc (bool isPremul, SkColorType colorType) |
|
bool | SkCodecs::HasDecoder (std::string_view id) |
|
◆ SkCodecPrintf
#define SkCodecPrintf |
( |
|
... | ) |
|
◆ PackColorProc
◆ choose_pack_color_proc()
Definition at line 241 of file SkCodecPriv.h.
241 {
243 if (isPremul) {
244 if (isRGBA) {
246 } else {
248 }
249 } else {
250 if (isRGBA) {
252 } else {
254 }
255 }
256}
static SkPMColor premultiply_argb_as_rgba(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
static SkPMColor premultiply_argb_as_bgra(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
static bool is_rgba(SkColorType colorType)
static uint32_t SkPackARGB_as_RGBA(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
static uint32_t SkPackARGB_as_BGRA(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
◆ compute_row_bytes()
static size_t compute_row_bytes |
( |
int |
width, |
|
|
uint32_t |
bitsPerPixel |
|
) |
| |
|
inlinestatic |
Definition at line 130 of file SkCodecPriv.h.
130 {
131 if (bitsPerPixel < 16) {
133 const uint32_t pixelsPerByte = 8 / bitsPerPixel;
135 } else {
137 const uint32_t bytesPerPixel = bitsPerPixel / 8;
139 }
140}
static size_t compute_row_bytes_bpp(int width, uint32_t bytesPerPixel)
static size_t compute_row_bytes_ppb(int width, uint32_t pixelsPerByte)
◆ compute_row_bytes_bpp()
static size_t compute_row_bytes_bpp |
( |
int |
width, |
|
|
uint32_t |
bytesPerPixel |
|
) |
| |
|
inlinestatic |
◆ compute_row_bytes_ppb()
static size_t compute_row_bytes_ppb |
( |
int |
width, |
|
|
uint32_t |
pixelsPerByte |
|
) |
| |
|
inlinestatic |
Definition at line 116 of file SkCodecPriv.h.
116 {
117 return (
width + pixelsPerByte - 1) / pixelsPerByte;
118}
◆ get_byte()
static uint8_t get_byte |
( |
const uint8_t * |
buffer, |
|
|
uint32_t |
i |
|
) |
| |
|
inlinestatic |
Definition at line 146 of file SkCodecPriv.h.
146 {
148}
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
◆ get_color_ptr()
Definition at line 109 of file SkCodecPriv.h.
109 {
110 return nullptr != colorTable ? colorTable->
readColors() :
nullptr;
111}
const SkPMColor * readColors() const
◆ get_dst_coord()
static int get_dst_coord |
( |
int |
srcCoord, |
|
|
int |
sampleFactor |
|
) |
| |
|
inlinestatic |
Definition at line 67 of file SkCodecPriv.h.
67{ return srcCoord / sampleFactor; }
◆ get_endian_int()
static uint32_t get_endian_int |
( |
const uint8_t * |
data, |
|
|
bool |
littleEndian |
|
) |
| |
|
inlinestatic |
Definition at line 202 of file SkCodecPriv.h.
202 {
203 if (littleEndian) {
205 }
206
208}
std::shared_ptr< const fml::Mapping > data
◆ get_endian_short()
static uint16_t get_endian_short |
( |
const uint8_t * |
data, |
|
|
bool |
littleEndian |
|
) |
| |
|
inlinestatic |
Definition at line 194 of file SkCodecPriv.h.
194 {
195 if (littleEndian) {
197 }
198
200}
◆ get_int()
static uint32_t get_int |
( |
const uint8_t * |
buffer, |
|
|
uint32_t |
i |
|
) |
| |
|
inlinestatic |
Definition at line 168 of file SkCodecPriv.h.
168 {
171#ifdef SK_CPU_BENDIAN
173#else
175#endif
176}
static constexpr uint32_t SkEndianSwap32(uint32_t value)
◆ get_scale_from_sample_size()
static float get_scale_from_sample_size |
( |
int |
sampleSize | ) |
|
|
inlinestatic |
◆ get_scaled_dimension()
static int get_scaled_dimension |
( |
int |
srcDimension, |
|
|
int |
sampleSize |
|
) |
| |
|
inlinestatic |
Definition at line 44 of file SkCodecPriv.h.
44 {
45 if (sampleSize > srcDimension) {
46 return 1;
47 }
48 return srcDimension / sampleSize;
49}
◆ get_short()
static uint16_t get_short |
( |
const uint8_t * |
buffer, |
|
|
uint32_t |
i |
|
) |
| |
|
inlinestatic |
Definition at line 154 of file SkCodecPriv.h.
154 {
157#ifdef SK_CPU_BENDIAN
159#else
161#endif
162}
static uint16_t SkEndianSwap16(uint16_t value)
◆ get_start_coord()
static int get_start_coord |
( |
int |
sampleFactor | ) |
|
|
inlinestatic |
Definition at line 57 of file SkCodecPriv.h.
57{ return sampleFactor / 2; }
◆ is_coord_necessary()
static bool is_coord_necessary |
( |
int |
srcCoord, |
|
|
int |
sampleFactor, |
|
|
int |
scaledDim |
|
) |
| |
|
inlinestatic |
Definition at line 77 of file SkCodecPriv.h.
77 {
78
80
81
82 if (srcCoord < startCoord ||
get_dst_coord(srcCoord, sampleFactor) >= scaledDim) {
83 return false;
84 }
85
86
87 return ((srcCoord - startCoord) % sampleFactor) == 0;
88}
static int get_dst_coord(int srcCoord, int sampleFactor)
static int get_start_coord(int sampleFactor)
◆ is_rgba()
Definition at line 230 of file SkCodecPriv.h.
230 {
231#ifdef SK_PMCOLOR_IS_RGBA
233#else
235#endif
236}
@ kBGRA_8888_SkColorType
pixel with 8 bits for blue, green, red, alpha; in 32-bit word
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
◆ is_valid_endian_marker()
static bool is_valid_endian_marker |
( |
const uint8_t * |
data, |
|
|
bool * |
isLittleEndian |
|
) |
| |
|
inlinestatic |
Definition at line 184 of file SkCodecPriv.h.
184 {
185
186 if ((
'I' !=
data[0] ||
'I' !=
data[1]) && (
'M' !=
data[0] ||
'M' !=
data[1])) {
187 return false;
188 }
189
190 *isLittleEndian = (
'I' ==
data[0]);
191 return true;
192}
◆ is_valid_subset()
static bool is_valid_subset |
( |
const SkIRect & |
subset, |
|
|
const SkISize & |
imageDims |
|
) |
| |
|
inlinestatic |
Definition at line 35 of file SkCodecPriv.h.
35 {
37}
static constexpr SkIRect MakeSize(const SkISize &size)
bool contains(int32_t x, int32_t y) const
◆ premultiply_argb_as_bgra()
Definition at line 220 of file SkCodecPriv.h.
220 {
225 }
226
228}
static U8CPU SkMulDiv255Round(U16CPU a, U16CPU b)
◆ premultiply_argb_as_rgba()
◆ sk_select_xform_format()
Definition at line 767 of file SkCodec.cpp.
768 {
770
774 break;
777 break;
779 if (forColorTable) {
780#if defined(SK_PMCOLOR_IS_RGBA)
782#else
784#endif
785 break;
786 }
788 break;
791 break;
794 break;
797 break;
798 default:
799 return false;
800 }
801 return true;
802}
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
@ kBGR_101010x_XR_SkColorType
pixel with 10 bits each for blue, green, red; in 32-bit word, extended range
@ skcms_PixelFormat_BGR_101010x_XR
@ skcms_PixelFormat_BGRA_8888
@ skcms_PixelFormat_RGBA_hhhh
@ skcms_PixelFormat_RGBA_8888
@ skcms_PixelFormat_BGR_565
◆ valid_alpha()
static bool valid_alpha |
( |
SkAlphaType |
dstAlpha, |
|
|
bool |
srcIsOpaque |
|
) |
| |
|
inlinestatic |
Definition at line 90 of file SkCodecPriv.h.
90 {
92 return false;
93 }
94
95 if (srcIsOpaque) {
97 SkCodecPrintf(
"Warning: an opaque image should be decoded as opaque "
98 "- it is being decoded as non-opaque, which will draw slower\n");
99 }
100 return true;
101 }
102
104}
@ kUnknown_SkAlphaType
uninitialized
@ kOpaque_SkAlphaType
pixel is opaque
#define SkCodecPrintf(...)